diff --git a/.cargo/config.toml b/.cargo/config.toml
index e29275804bd85..4796a2c26965c 100644
--- a/.cargo/config.toml
+++ b/.cargo/config.toml
@@ -29,5 +29,5 @@ rustflags = [
"-Aclippy::needless_option_as_deref", # false positives
"-Aclippy::derivable_impls", # false positives
"-Aclippy::stable_sort_primitive", # prefer stable sort
- "-Aclippy::extra-unused-type-parameters" # stylistic
+ "-Aclippy::extra-unused-type-parameters", # stylistic
]
diff --git a/.github/workflows/burnin-label-notification.yml b/.github/workflows/burnin-label-notification.yml
index 22f15c0ec35ee..f45455d31db1e 100644
--- a/.github/workflows/burnin-label-notification.yml
+++ b/.github/workflows/burnin-label-notification.yml
@@ -6,12 +6,19 @@ on:
jobs:
notify-devops:
runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ channel:
+ - name: 'Team: DevOps'
+ room: '!lUslSijLMgNcEKcAiE:parity.io'
+
steps:
- name: Notify devops
- if: github.event.label.name == 'A1-needsburnin'
- uses: s3krit/matrix-message-action@v0.0.3
+ if: startsWith(github.event.label.name, 'A1-')
+ uses: s3krit/matrix-message-action@70ad3fb812ee0e45ff8999d6af11cafad11a6ecf # v0.0.3
with:
- room_id: ${{ secrets.POLKADOT_DEVOPS_MATRIX_ROOM_ID }}
- access_token: ${{ secrets.POLKADOT_DEVOPS_MATRIX_ACCESS_TOKEN }}
- message: "@room Burn-in request received for [${{ github.event.pull_request.title }}](${{ github.event.pull_request.html_url }})"
- server: "matrix.parity.io"
+ room_id: ${{ matrix.channel.room }}
+ access_token: ${{ secrets.RELEASENOTES_MATRIX_V2_ACCESS_TOKEN }}
+ server: "m.parity.io"
+ message: |
+ @room Burn-in request received for [${{ github.event.pull_request.title }}](${{ github.event.pull_request.html_url }})
diff --git a/.github/workflows/monthly-tag.yml b/.github/workflows/monthly-tag.yml
index 6bec03d27e7be..055207d85a4dd 100644
--- a/.github/workflows/monthly-tag.yml
+++ b/.github/workflows/monthly-tag.yml
@@ -13,8 +13,8 @@ jobs:
- name: Get the tags by date
id: tags
run: |
- echo "::set-output name=new::$(date +'monthly-%Y-%m')"
- echo "::set-output name=old::$(date -d'1 month ago' +'monthly-%Y-%m')"
+ echo "new=$(date +'monthly-%Y-%m')" >> $GITHUB_OUTPUT
+ echo "old=$(date -d'1 month ago' +'monthly-%Y-%m')" >> $GITHUB_OUTPUT
- name: Checkout branch "master"
uses: actions/checkout@v3
with:
diff --git a/.github/workflows/release-bot.yml b/.github/workflows/release-bot.yml
index ed0a8e5435b9c..05bea32abc697 100644
--- a/.github/workflows/release-bot.yml
+++ b/.github/workflows/release-bot.yml
@@ -8,11 +8,24 @@ on:
jobs:
ping_matrix:
runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ channel:
+ - name: 'General: Rust, Polkadot, Substrate'
+ room: '!aJymqQYtCjjqImFLSb:parity.io'
+ pre-release: false
+
steps:
- name: send message
- uses: s3krit/matrix-message-action@v0.0.3
+ uses: s3krit/matrix-message-action@70ad3fb812ee0e45ff8999d6af11cafad11a6ecf # v0.0.3
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"
+ room_id: ${{ matrix.channel.room }}
+ access_token: ${{ secrets.RELEASENOTES_MATRIX_V2_ACCESS_TOKEN }}
+ server: "m.parity.io"
+ 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}})
+
+ -----
+
+ ${{github.event.release.body}}
diff --git a/.github/workflows/release-tagging.yml b/.github/workflows/release-tagging.yml
index f7fa913c69709..1862582f40eba 100644
--- a/.github/workflows/release-tagging.yml
+++ b/.github/workflows/release-tagging.yml
@@ -14,7 +14,7 @@ jobs:
- name: Set Git tag
uses: s3krit/walking-tag-action@d04f7a53b72ceda4e20283736ce3627011275178 # latest version from master
with:
- TAG_NAME: release
- TAG_MESSAGE: Latest release
+ tag-name: release
+ tag-message: Latest release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index fe70d3532a9b1..f00836528973e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -48,7 +48,7 @@ variables:
CARGO_INCREMENTAL: 0
DOCKER_OS: "debian:bullseye"
ARCH: "x86_64"
- CI_IMAGE: "paritytech/ci-linux:production"
+ CI_IMAGE: !reference [.ci-unified, variables, CI_IMAGE]
BUILDAH_IMAGE: "quay.io/buildah/stable:v1.29"
BUILDAH_COMMAND: "buildah --storage-driver overlay2"
RELENG_SCRIPTS_BRANCH: "master"
@@ -61,7 +61,7 @@ variables:
NEXTEST_FAILURE_OUTPUT: immediate-final
NEXTEST_SUCCESS_OUTPUT: final
- ZOMBIENET_IMAGE: "docker.io/paritytech/zombienet:v1.3.52"
+ ZOMBIENET_IMAGE: "docker.io/paritytech/zombienet:v1.3.55"
default:
retry:
@@ -301,8 +301,12 @@ include:
# completion, because the publishing jobs depends on them AS INTENDED: crates should not be
# published before their source code is checked.
- project: parity/infrastructure/ci_cd/shared
- ref: v0.2
+ ref: main
file: /common/timestamp.yml
+ - project: parity/infrastructure/ci_cd/shared
+ ref: main
+ file: /common/ci-unified.yml
+
#### stage: notify
diff --git a/.maintain/frame-weight-template.hbs b/.maintain/frame-weight-template.hbs
index 38bb4de26362f..ecd384a514563 100644
--- a/.maintain/frame-weight-template.hbs
+++ b/.maintain/frame-weight-template.hbs
@@ -1,11 +1,11 @@
{{header}}
-//! Autogenerated weights for {{pallet}}
+//! Autogenerated weights for `{{pallet}}`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION {{version}}
//! DATE: {{date}}, STEPS: `{{cmd.steps}}`, REPEAT: `{{cmd.repeat}}`, LOW RANGE: `{{cmd.lowest_range_values}}`, HIGH RANGE: `{{cmd.highest_range_values}}`
//! WORST CASE MAP SIZE: `{{cmd.worst_case_map_values}}`
//! HOSTNAME: `{{hostname}}`, CPU: `{{cpuname}}`
-//! EXECUTION: {{cmd.execution}}, WASM-EXECUTION: {{cmd.wasm_execution}}, CHAIN: {{cmd.chain}}, DB CACHE: {{cmd.db_cache}}
+//! WASM-EXECUTION: `{{cmd.wasm_execution}}`, CHAIN: `{{cmd.chain}}`, DB CACHE: `{{cmd.db_cache}}`
// Executed Command:
{{#each args as |arg|}}
@@ -20,7 +20,7 @@
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
use core::marker::PhantomData;
-/// Weight functions needed for {{pallet}}.
+/// Weight functions needed for `{{pallet}}`.
pub trait WeightInfo {
{{#each benchmarks as |benchmark|}}
fn {{benchmark.name~}}
@@ -31,7 +31,7 @@ pub trait WeightInfo {
{{/each}}
}
-/// Weights for {{pallet}} using the Substrate node and recommended hardware.
+/// Weights for `{{pallet}}` using the Substrate node and recommended hardware.
pub struct SubstrateWeight(PhantomData);
{{#if (eq pallet "frame_system")}}
impl WeightInfo for SubstrateWeight {
@@ -78,7 +78,7 @@ impl WeightInfo for SubstrateWeight {
{{/each}}
}
-// For backwards compatibility and tests
+// For backwards compatibility and tests.
impl WeightInfo for () {
{{#each benchmarks as |benchmark|}}
{{#each benchmark.comments as |comment|}}
diff --git a/Cargo.lock b/Cargo.lock
index b29ed95b87766..6cca0a018ca72 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -12,22 +12,13 @@ dependencies = [
"regex",
]
-[[package]]
-name = "addr2line"
-version = "0.17.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b9ecd88a8c8378ca913a680cd98f0f13ac67383d35993f86c90a70e3f137816b"
-dependencies = [
- "gimli 0.26.2",
-]
-
[[package]]
name = "addr2line"
version = "0.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97"
dependencies = [
- "gimli 0.27.2",
+ "gimli",
]
[[package]]
@@ -115,9 +106,9 @@ dependencies = [
[[package]]
name = "aes-gcm"
-version = "0.10.1"
+version = "0.10.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "82e1366e0c69c9f927b1fa5ce2c7bf9eafc8f9268c0b9800729e8b267612447c"
+checksum = "209b47e8954a928e1d72e86eca7000ebb6655fe1436d33eefc2201cad027e237"
dependencies = [
"aead 0.5.2",
"aes 0.8.2",
@@ -181,13 +172,19 @@ dependencies = [
[[package]]
name = "aho-corasick"
-version = "1.0.1"
+version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "67fc08ce920c31afb70f013dcce1bfc3a3195de6a228474e45e1f145b36f8d04"
+checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41"
dependencies = [
"memchr",
]
+[[package]]
+name = "android-tzdata"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0"
+
[[package]]
name = "android_system_properties"
version = "0.1.5"
@@ -276,6 +273,20 @@ dependencies = [
"num-traits",
]
+[[package]]
+name = "aquamarine"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "df752953c49ce90719c7bf1fc587bc8227aed04732ea0c0f85e5397d7fdbd1a1"
+dependencies = [
+ "include_dir",
+ "itertools",
+ "proc-macro-error",
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
+
[[package]]
name = "arbitrary"
version = "1.3.0"
@@ -288,6 +299,26 @@ version = "1.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6"
+[[package]]
+name = "ark-algebra-test-templates"
+version = "0.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "400bd3a79c741b1832f1416d4373ae077ef82ca14a8b4cee1248a2f11c8b9172"
+dependencies = [
+ "ark-ec",
+ "ark-ff",
+ "ark-serialize",
+ "ark-std",
+ "hex",
+ "num-bigint",
+ "num-integer",
+ "num-traits",
+ "serde",
+ "serde_derive",
+ "serde_json",
+ "sha2 0.10.7",
+]
+
[[package]]
name = "ark-bls12-377"
version = "0.4.0"
@@ -311,6 +342,18 @@ dependencies = [
"ark-std",
]
+[[package]]
+name = "ark-bw6-761"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2e0605daf0cc5aa2034b78d008aaf159f56901d92a52ee4f6ecdfdac4f426700"
+dependencies = [
+ "ark-bls12-377",
+ "ark-ec",
+ "ark-ff",
+ "ark-std",
+]
+
[[package]]
name = "ark-ec"
version = "0.4.2"
@@ -328,6 +371,30 @@ dependencies = [
"zeroize",
]
+[[package]]
+name = "ark-ed-on-bls12-377"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b10d901b9ac4b38f9c32beacedfadcdd64e46f8d7f8e88c1ae1060022cf6f6c6"
+dependencies = [
+ "ark-bls12-377",
+ "ark-ec",
+ "ark-ff",
+ "ark-std",
+]
+
+[[package]]
+name = "ark-ed-on-bls12-381-bandersnatch"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f9cde0f2aa063a2a5c28d39b47761aa102bda7c13c84fc118a61b87c7b2f785c"
+dependencies = [
+ "ark-bls12-381",
+ "ark-ec",
+ "ark-ff",
+ "ark-std",
+]
+
[[package]]
name = "ark-ff"
version = "0.4.2"
@@ -339,7 +406,7 @@ dependencies = [
"ark-serialize",
"ark-std",
"derivative",
- "digest 0.10.6",
+ "digest 0.10.7",
"itertools",
"num-bigint",
"num-traits",
@@ -384,6 +451,62 @@ dependencies = [
"hashbrown 0.13.2",
]
+[[package]]
+name = "ark-r1cs-std"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "de1d1472e5cb020cb3405ce2567c91c8d43f21b674aef37b0202f5c3304761db"
+dependencies = [
+ "ark-ec",
+ "ark-ff",
+ "ark-relations",
+ "ark-std",
+ "derivative",
+ "num-bigint",
+ "num-integer",
+ "num-traits",
+ "tracing",
+]
+
+[[package]]
+name = "ark-relations"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "00796b6efc05a3f48225e59cb6a2cda78881e7c390872d5786aaf112f31fb4f0"
+dependencies = [
+ "ark-ff",
+ "ark-std",
+ "tracing",
+ "tracing-subscriber",
+]
+
+[[package]]
+name = "ark-scale"
+version = "0.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4d028cd1025d002fa88c10cd644d29028a7b40806579b608c6ba843b937bbb23"
+dependencies = [
+ "ark-ec",
+ "ark-serialize",
+ "ark-std",
+ "parity-scale-codec",
+]
+
+[[package]]
+name = "ark-secret-scalar"
+version = "0.0.2"
+source = "git+https://github.com/w3f/ring-vrf?rev=c86ebd4#c86ebd4114d3165d05f9ce28c1d9e8d7a9a4e801"
+dependencies = [
+ "ark-ec",
+ "ark-ff",
+ "ark-serialize",
+ "ark-std",
+ "ark-transcript",
+ "digest 0.10.7",
+ "rand_core 0.6.4",
+ "zeroize",
+]
+
[[package]]
name = "ark-serialize"
version = "0.4.2"
@@ -392,7 +515,7 @@ checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5"
dependencies = [
"ark-serialize-derive",
"ark-std",
- "digest 0.10.6",
+ "digest 0.10.7",
"num-bigint",
]
@@ -418,10 +541,17 @@ dependencies = [
]
[[package]]
-name = "array-bytes"
-version = "4.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f52f63c5c1316a16a4b35eaac8b76a98248961a533f061684cb2a7cb0eafb6c6"
+name = "ark-transcript"
+version = "0.0.2"
+source = "git+https://github.com/w3f/ring-vrf?rev=c86ebd4#c86ebd4114d3165d05f9ce28c1d9e8d7a9a4e801"
+dependencies = [
+ "ark-ff",
+ "ark-serialize",
+ "ark-std",
+ "digest 0.10.7",
+ "rand_core 0.6.4",
+ "sha3",
+]
[[package]]
name = "array-bytes"
@@ -583,7 +713,7 @@ checksum = "0e97ce7de6cf12de5d7226c73f5ba9811622f4db3a5b91b55c53e987e5f91cba"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.15",
+ "syn 2.0.18",
]
[[package]]
@@ -605,7 +735,7 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.15",
+ "syn 2.0.18",
]
[[package]]
@@ -616,7 +746,7 @@ checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.15",
+ "syn 2.0.18",
]
[[package]]
@@ -661,15 +791,36 @@ version = "0.3.67"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "233d376d6d185f2a3093e58f283f60f880315b6c60075b01f36b3b85154564ca"
dependencies = [
- "addr2line 0.19.0",
+ "addr2line",
"cc",
"cfg-if",
"libc",
"miniz_oxide 0.6.2",
- "object 0.30.3",
+ "object",
"rustc-demangle",
]
+[[package]]
+name = "bandersnatch_vrfs"
+version = "0.0.1"
+source = "git+https://github.com/w3f/ring-vrf?rev=c86ebd4#c86ebd4114d3165d05f9ce28c1d9e8d7a9a4e801"
+dependencies = [
+ "ark-bls12-381",
+ "ark-ec",
+ "ark-ed-on-bls12-381-bandersnatch",
+ "ark-ff",
+ "ark-serialize",
+ "ark-std",
+ "dleq_vrf",
+ "fflonk",
+ "merlin 3.0.0",
+ "rand_chacha 0.3.1",
+ "rand_core 0.6.4",
+ "ring 0.1.0",
+ "sha2 0.10.7",
+ "zeroize",
+]
+
[[package]]
name = "base-x"
version = "0.2.11"
@@ -696,9 +847,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8"
[[package]]
name = "base64"
-version = "0.21.0"
+version = "0.21.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a"
+checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d"
[[package]]
name = "base64ct"
@@ -728,7 +879,7 @@ dependencies = [
name = "binary-merkle-tree"
version = "4.0.0-dev"
dependencies = [
- "array-bytes 4.2.0",
+ "array-bytes",
"env_logger 0.9.3",
"hash-db",
"log",
@@ -757,13 +908,13 @@ dependencies = [
"lazy_static",
"lazycell",
"peeking_take_while",
- "prettyplease 0.2.4",
+ "prettyplease 0.2.6",
"proc-macro2",
"quote",
"regex",
"rustc-hash",
"shlex",
- "syn 2.0.15",
+ "syn 2.0.18",
]
[[package]]
@@ -790,7 +941,7 @@ version = "0.10.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe"
dependencies = [
- "digest 0.10.6",
+ "digest 0.10.7",
]
[[package]]
@@ -885,9 +1036,9 @@ checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae"
[[package]]
name = "bounded-collections"
-version = "0.1.6"
+version = "0.1.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e3888522b497857eb606bf51695988dba7096941822c1bcf676e3a929a9ae7a0"
+checksum = "eb5b05133427c07c4776906f673ccf36c21b102c9829c641a5b56bd151d44fd6"
dependencies = [
"log",
"parity-scale-codec",
@@ -903,9 +1054,9 @@ checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3"
[[package]]
name = "bstr"
-version = "1.4.0"
+version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c3d4260bcc2e8fc9df1eac4919a720effeb63a3f0952f5bf4944adfa18897f09"
+checksum = "a246e68bb43f6cd9db24bea052a53e40405417c5fb372e3d1a8a7f770a564ef5"
dependencies = [
"memchr",
"once_cell",
@@ -924,9 +1075,9 @@ dependencies = [
[[package]]
name = "bumpalo"
-version = "3.12.1"
+version = "3.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9b1ce199063694f33ffb7dd4e0ee620741495c32833cde5aa08f02a0bf96f0c8"
+checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1"
[[package]]
name = "byte-slice-cast"
@@ -1038,9 +1189,9 @@ dependencies = [
[[package]]
name = "cfg-expr"
-version = "0.15.1"
+version = "0.15.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c8790cf1286da485c72cf5fc7aeba308438800036ec67d89425924c4807268c9"
+checksum = "e70d3ad08698a0568b0562f22710fe6bfc1f4a61a367c77d0398c562eadd453a"
dependencies = [
"smallvec",
]
@@ -1087,7 +1238,7 @@ name = "chain-spec-builder"
version = "2.0.0"
dependencies = [
"ansi_term",
- "clap 4.2.7",
+ "clap 4.3.2",
"node-cli",
"rand 0.8.5",
"sc-chain-spec",
@@ -1098,13 +1249,13 @@ dependencies = [
[[package]]
name = "chrono"
-version = "0.4.24"
+version = "0.4.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4e3c5919066adf22df73762e50cffcde3a758f2a848b113b586d1f86728b673b"
+checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5"
dependencies = [
+ "android-tzdata",
"iana-time-zone",
"js-sys",
- "num-integer",
"num-traits",
"time 0.1.45",
"wasm-bindgen",
@@ -1140,13 +1291,13 @@ dependencies = [
[[package]]
name = "cid"
-version = "0.8.6"
+version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f6ed9c8b2d17acb8110c46f1da5bf4a696d745e1474a16db0cd2b49cd0249bf2"
+checksum = "b9b68e3193982cd54187d71afdb2a271ad4cf8af157858e9cb911b91321de143"
dependencies = [
"core2",
"multibase",
- "multihash 0.16.3",
+ "multihash",
"serde",
"unsigned-varint",
]
@@ -1213,9 +1364,9 @@ dependencies = [
[[package]]
name = "clap"
-version = "4.2.7"
+version = "4.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "34d21f9bf1b425d2968943631ec91202fe5e837264063503708b83013f8fc938"
+checksum = "401a4694d2bf92537b6867d94de48c4842089645fdcdf6c71865b175d836e9c2"
dependencies = [
"clap_builder",
"clap_derive",
@@ -1224,36 +1375,36 @@ dependencies = [
[[package]]
name = "clap_builder"
-version = "4.2.7"
+version = "4.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "914c8c79fb560f238ef6429439a30023c862f7a28e688c58f7203f12b29970bd"
+checksum = "72394f3339a76daf211e57d4bcb374410f3965dcc606dd0e03738c7888766980"
dependencies = [
"anstream",
"anstyle",
"bitflags",
- "clap_lex 0.4.1",
+ "clap_lex 0.5.0",
"strsim",
]
[[package]]
name = "clap_complete"
-version = "4.2.1"
+version = "4.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1a19591b2ab0e3c04b588a0e04ddde7b9eaa423646d1b4a8092879216bf47473"
+checksum = "7f6b5c519bab3ea61843a7923d074b04245624bb84a64a8c150f5deb014e388b"
dependencies = [
- "clap 4.2.7",
+ "clap 4.3.2",
]
[[package]]
name = "clap_derive"
-version = "4.2.0"
+version = "4.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3f9644cd56d6b87dbe899ef8b053e331c0637664e9e21a33dfcdc36093f5c5c4"
+checksum = "b8cd2b2a819ad6eec39e8f1d6b53001af1e5469f8c177579cdaeb313115b825f"
dependencies = [
"heck",
"proc-macro2",
"quote",
- "syn 2.0.15",
+ "syn 2.0.18",
]
[[package]]
@@ -1267,9 +1418,9 @@ dependencies = [
[[package]]
name = "clap_lex"
-version = "0.4.1"
+version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8a2dd5a6fe8c6e3502f568a6353e5273bbb15193ad9a89e457b9970798efbea1"
+checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b"
[[package]]
name = "codespan-reporting"
@@ -1289,15 +1440,35 @@ checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7"
[[package]]
name = "comfy-table"
-version = "6.1.4"
+version = "7.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6e7b787b0dc42e8111badfdbe4c3059158ccb2db8780352fa1b01e8ccf45cc4d"
+checksum = "f9e1f7e5d046697d34b593bdba8ee31f4649366e452a2ccabb3baf3511e503d1"
dependencies = [
"strum",
"strum_macros",
"unicode-width",
]
+[[package]]
+name = "common"
+version = "0.1.0"
+source = "git+https://github.com/w3f/ring-proof#0e948f3c28cbacecdd3020403c4841c0eb339213"
+dependencies = [
+ "ark-ec",
+ "ark-ff",
+ "ark-poly",
+ "ark-serialize",
+ "ark-std",
+ "fflonk",
+ "merlin 3.0.0",
+]
+
+[[package]]
+name = "common-path"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2382f75942f4b3be3690fe4f86365e9c853c1587d6ee58212cebf6e2a9ccd101"
+
[[package]]
name = "concurrent-queue"
version = "2.2.0"
@@ -1309,15 +1480,15 @@ dependencies = [
[[package]]
name = "console"
-version = "0.15.5"
+version = "0.15.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c3d79fbe8970a77e3e34151cc13d3b3e248aa0faaecb9f6091fa07ebefe5ad60"
+checksum = "c926e00cc70edefdc64d3a5ff31cc65bb97a3460097762bd23afb4d8145fccf8"
dependencies = [
"encode_unicode",
"lazy_static",
"libc",
"unicode-width",
- "windows-sys 0.42.0",
+ "windows-sys 0.45.0",
]
[[package]]
@@ -1326,6 +1497,28 @@ version = "0.9.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "520fbf3c07483f94e3e3ca9d0cfd913d7718ef2483d2cfd91c0d9e91474ab913"
+[[package]]
+name = "const-random"
+version = "0.1.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "368a7a772ead6ce7e1de82bfb04c485f3db8ec744f72925af5735e29a22cc18e"
+dependencies = [
+ "const-random-macro",
+ "proc-macro-hack",
+]
+
+[[package]]
+name = "const-random-macro"
+version = "0.1.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9d7d6ab3c3a2282db210df5f02c4dab6e0a7057af0fb7ebd4070f30fe05c0ddb"
+dependencies = [
+ "getrandom 0.2.9",
+ "once_cell",
+ "proc-macro-hack",
+ "tiny-keccak",
+]
+
[[package]]
name = "constant_time_eq"
version = "0.2.5"
@@ -1383,28 +1576,27 @@ dependencies = [
[[package]]
name = "cranelift-bforest"
-version = "0.93.2"
+version = "0.95.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2bc42ba2e232e5b20ff7dc299a812d53337dadce9a7e39a238e6a5cb82d2e57b"
+checksum = "1277fbfa94bc82c8ec4af2ded3e639d49ca5f7f3c7eeab2c66accd135ece4e70"
dependencies = [
"cranelift-entity",
]
[[package]]
name = "cranelift-codegen"
-version = "0.93.2"
+version = "0.95.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "253531aca9b6f56103c9420369db3263e784df39aa1c90685a1f69cfbba0623e"
+checksum = "c6e8c31ad3b2270e9aeec38723888fe1b0ace3bea2b06b3f749ccf46661d3220"
dependencies = [
- "arrayvec 0.7.2",
"bumpalo",
"cranelift-bforest",
"cranelift-codegen-meta",
"cranelift-codegen-shared",
"cranelift-entity",
"cranelift-isle",
- "gimli 0.26.2",
- "hashbrown 0.12.3",
+ "gimli",
+ "hashbrown 0.13.2",
"log",
"regalloc2",
"smallvec",
@@ -1413,33 +1605,33 @@ dependencies = [
[[package]]
name = "cranelift-codegen-meta"
-version = "0.93.2"
+version = "0.95.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "72f2154365e2bff1b1b8537a7181591fdff50d8e27fa6e40d5c69c3bad0ca7c8"
+checksum = "c8ac5ac30d62b2d66f12651f6b606dbdfd9c2cfd0908de6b387560a277c5c9da"
dependencies = [
"cranelift-codegen-shared",
]
[[package]]
name = "cranelift-codegen-shared"
-version = "0.93.2"
+version = "0.95.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "687e14e3f5775248930e0d5a84195abef8b829958e9794bf8d525104993612b4"
+checksum = "dd82b8b376247834b59ed9bdc0ddeb50f517452827d4a11bccf5937b213748b8"
[[package]]
name = "cranelift-entity"
-version = "0.93.2"
+version = "0.95.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f42ea692c7b450ad18b8c9889661505d51c09ec4380cf1c2d278dbb2da22cae1"
+checksum = "40099d38061b37e505e63f89bab52199037a72b931ad4868d9089ff7268660b0"
dependencies = [
"serde",
]
[[package]]
name = "cranelift-frontend"
-version = "0.93.2"
+version = "0.95.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8483c2db6f45fe9ace984e5adc5d058102227e4c62e5aa2054e16b0275fd3a6e"
+checksum = "64a25d9d0a0ae3079c463c34115ec59507b4707175454f0eee0891e83e30e82d"
dependencies = [
"cranelift-codegen",
"log",
@@ -1449,15 +1641,15 @@ dependencies = [
[[package]]
name = "cranelift-isle"
-version = "0.93.2"
+version = "0.95.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e9793158837678902446c411741d87b43f57dadfb944f2440db4287cda8cbd59"
+checksum = "80de6a7d0486e4acbd5f9f87ec49912bf4c8fb6aea00087b989685460d4469ba"
[[package]]
name = "cranelift-native"
-version = "0.93.2"
+version = "0.95.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "72668c7755f2b880665cb422c8ad2d56db58a88b9bebfef0b73edc2277c13c49"
+checksum = "bb6b03e0e03801c4b3fd8ce0758a94750c07a44e7944cc0ffbf0d3f2e7c79b00"
dependencies = [
"cranelift-codegen",
"libc",
@@ -1466,9 +1658,9 @@ dependencies = [
[[package]]
name = "cranelift-wasm"
-version = "0.93.2"
+version = "0.95.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3852ce4b088b44ac4e29459573943009a70d1b192c8d77ef949b4e814f656fc1"
+checksum = "ff3220489a3d928ad91e59dd7aeaa8b3de18afb554a6211213673a71c90737ac"
dependencies = [
"cranelift-codegen",
"cranelift-entity",
@@ -1709,16 +1901,16 @@ dependencies = [
"cfg-if",
"fiat-crypto",
"packed_simd_2",
- "platforms 3.0.2",
+ "platforms",
"subtle",
"zeroize",
]
[[package]]
name = "cxx"
-version = "1.0.94"
+version = "1.0.95"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f61f1b6389c3fe1c316bf8a4dccc90a38208354b330925bce1f74a6c4756eb93"
+checksum = "109308c20e8445959c2792e81871054c6a17e6976489a93d2769641a2ba5839c"
dependencies = [
"cc",
"cxxbridge-flags",
@@ -1728,9 +1920,9 @@ dependencies = [
[[package]]
name = "cxx-build"
-version = "1.0.94"
+version = "1.0.95"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "12cee708e8962df2aeb38f594aae5d827c022b6460ac71a7a3e2c3c2aae5a07b"
+checksum = "daf4c6755cdf10798b97510e0e2b3edb9573032bd9379de8fffa59d68165494f"
dependencies = [
"cc",
"codespan-reporting",
@@ -1738,24 +1930,24 @@ dependencies = [
"proc-macro2",
"quote",
"scratch",
- "syn 2.0.15",
+ "syn 2.0.18",
]
[[package]]
name = "cxxbridge-flags"
-version = "1.0.94"
+version = "1.0.95"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7944172ae7e4068c533afbb984114a56c46e9ccddda550499caa222902c7f7bb"
+checksum = "882074421238e84fe3b4c65d0081de34e5b323bf64555d3e61991f76eb64a7bb"
[[package]]
name = "cxxbridge-macro"
-version = "1.0.94"
+version = "1.0.95"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2345488264226bf682893e25de0769f3360aac9957980ec49361b083ddaa5bc5"
+checksum = "4a076022ece33e7686fb76513518e219cca4fce5750a8ae6d1ce6c0f48fd1af9"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.15",
+ "syn 2.0.18",
]
[[package]]
@@ -1795,15 +1987,15 @@ dependencies = [
[[package]]
name = "data-encoding"
-version = "2.3.3"
+version = "2.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "23d8666cb01533c39dde32bcbab8e227b4ed6679b2c925eba05feabea39508fb"
+checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308"
[[package]]
name = "data-encoding-macro"
-version = "0.1.12"
+version = "0.1.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "86927b7cd2fe88fa698b87404b287ab98d1a0063a34071d92e575b72d3029aca"
+checksum = "c904b33cc60130e1aeea4956ab803d08a3f4a0ca82d64ed757afac3891f2bb99"
dependencies = [
"data-encoding",
"data-encoding-macro-internal",
@@ -1811,9 +2003,9 @@ dependencies = [
[[package]]
name = "data-encoding-macro-internal"
-version = "0.1.10"
+version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a5bbed42daaa95e780b60a50546aa345b8413a1e46f9a40a12907d3598f038db"
+checksum = "8fdf3fce3ce863539ec1d7fd1b6dcc3c645663376b43ed376bbf887733e4f772"
dependencies = [
"data-encoding",
"syn 1.0.109",
@@ -1832,9 +2024,9 @@ dependencies = [
[[package]]
name = "der"
-version = "0.7.5"
+version = "0.7.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "05e58dffcdcc8ee7b22f0c1f71a69243d7c2d9ad87b5a14361f2424a1565c219"
+checksum = "56acb310e15652100da43d130af8d97b509e95af61aab1c5a7939ef24337ee17"
dependencies = [
"const-oid",
"zeroize",
@@ -1964,9 +2156,9 @@ dependencies = [
[[package]]
name = "digest"
-version = "0.10.6"
+version = "0.10.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f"
+checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
dependencies = [
"block-buffer 0.10.4",
"const-oid",
@@ -2023,7 +2215,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.15",
+ "syn 2.0.18",
]
[[package]]
@@ -2032,12 +2224,55 @@ version = "1.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "210ec60ae7d710bed8683e333e9d2855a8a56a3e9892b38bad3bb0d4d29b0d5e"
+[[package]]
+name = "dleq_vrf"
+version = "0.0.2"
+source = "git+https://github.com/w3f/ring-vrf?rev=c86ebd4#c86ebd4114d3165d05f9ce28c1d9e8d7a9a4e801"
+dependencies = [
+ "ark-ec",
+ "ark-ff",
+ "ark-secret-scalar",
+ "ark-serialize",
+ "ark-std",
+ "ark-transcript",
+ "arrayvec 0.7.2",
+ "rand_core 0.6.4",
+ "zeroize",
+]
+
[[package]]
name = "doc-comment"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10"
+[[package]]
+name = "docify"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "029de870d175d11969524d91a3fb2cbf6d488b853bff99d41cf65e533ac7d9d2"
+dependencies = [
+ "docify_macros",
+]
+
+[[package]]
+name = "docify_macros"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cac43324656a1b05eb0186deb51f27d2d891c704c37f34de281ef6297ba193e5"
+dependencies = [
+ "common-path",
+ "derive-syn-parse",
+ "once_cell",
+ "proc-macro2",
+ "quote",
+ "regex",
+ "syn 2.0.18",
+ "termcolor",
+ "toml 0.7.4",
+ "walkdir",
+]
+
[[package]]
name = "downcast"
version = "0.11.0"
@@ -2097,15 +2332,16 @@ dependencies = [
[[package]]
name = "ecdsa"
-version = "0.16.6"
+version = "0.16.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a48e5d537b8a30c0b023116d981b16334be1485af7ca68db3a2b7024cbc957fd"
+checksum = "0997c976637b606099b9985693efa3581e84e41f5c11ba5255f88711058ad428"
dependencies = [
- "der 0.7.5",
- "digest 0.10.6",
- "elliptic-curve 0.13.4",
+ "der 0.7.6",
+ "digest 0.10.7",
+ "elliptic-curve 0.13.5",
"rfc6979 0.4.0",
"signature 2.1.0",
+ "spki 0.7.2",
]
[[package]]
@@ -2160,7 +2396,7 @@ dependencies = [
"base16ct 0.1.1",
"crypto-bigint 0.4.9",
"der 0.6.1",
- "digest 0.10.6",
+ "digest 0.10.7",
"ff 0.12.1",
"generic-array 0.14.7",
"group 0.12.1",
@@ -2175,13 +2411,13 @@ dependencies = [
[[package]]
name = "elliptic-curve"
-version = "0.13.4"
+version = "0.13.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "75c71eaa367f2e5d556414a8eea812bc62985c879748d6403edabd9cb03f16e7"
+checksum = "968405c8fdc9b3bf4df0a6638858cc0b52462836ab6b1c87377785dd09cf1c0b"
dependencies = [
"base16ct 0.2.0",
"crypto-bigint 0.5.2",
- "digest 0.10.6",
+ "digest 0.10.7",
"ff 0.13.0",
"generic-array 0.14.7",
"group 0.13.0",
@@ -2227,7 +2463,7 @@ checksum = "5e9a1f9f7d83e59740248a6e14ecf93929ade55027844dfcea78beafccc15745"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.15",
+ "syn 2.0.18",
]
[[package]]
@@ -2300,15 +2536,15 @@ dependencies = [
[[package]]
name = "expander"
-version = "1.0.0"
+version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f360349150728553f92e4c997a16af8915f418d3a0f21b440d34c5632f16ed84"
+checksum = "5f86a749cf851891866c10515ef6c299b5c69661465e9c3bbe7e07a2b77fb0f7"
dependencies = [
"blake2",
"fs-err",
"proc-macro2",
"quote",
- "syn 1.0.109",
+ "syn 2.0.18",
]
[[package]]
@@ -2361,6 +2597,19 @@ dependencies = [
"subtle",
]
+[[package]]
+name = "fflonk"
+version = "0.1.0"
+source = "git+https://github.com/w3f/fflonk#26a5045b24e169cffc1f9328ca83d71061145c40"
+dependencies = [
+ "ark-ec",
+ "ark-ff",
+ "ark-poly",
+ "ark-serialize",
+ "ark-std",
+ "merlin 3.0.0",
+]
+
[[package]]
name = "fiat-crypto"
version = "0.1.20"
@@ -2459,9 +2708,9 @@ dependencies = [
[[package]]
name = "form_urlencoded"
-version = "1.1.0"
+version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8"
+checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652"
dependencies = [
"percent-encoding",
]
@@ -2486,7 +2735,7 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa"
name = "frame-benchmarking"
version = "4.0.0-dev"
dependencies = [
- "array-bytes 4.2.0",
+ "array-bytes",
"frame-support",
"frame-support-procedural",
"frame-system",
@@ -2514,9 +2763,9 @@ name = "frame-benchmarking-cli"
version = "4.0.0-dev"
dependencies = [
"Inflector",
- "array-bytes 4.2.0",
+ "array-bytes",
"chrono",
- "clap 4.2.7",
+ "clap 4.3.2",
"comfy-table",
"frame-benchmarking",
"frame-support",
@@ -2545,12 +2794,13 @@ dependencies = [
"sp-database",
"sp-externalities",
"sp-inherents",
+ "sp-io",
"sp-keystore",
"sp-runtime",
"sp-state-machine",
- "sp-std",
"sp-storage",
"sp-trie",
+ "sp-wasm-interface",
"thiserror",
"thousands",
]
@@ -2581,7 +2831,7 @@ dependencies = [
"quote",
"scale-info",
"sp-arithmetic",
- "syn 2.0.15",
+ "syn 2.0.18",
"trybuild",
]
@@ -2607,7 +2857,7 @@ dependencies = [
name = "frame-election-solution-type-fuzzer"
version = "2.0.0-alpha.5"
dependencies = [
- "clap 4.2.7",
+ "clap 4.3.2",
"frame-election-provider-solution-type",
"frame-election-provider-support",
"frame-support",
@@ -2624,7 +2874,7 @@ dependencies = [
name = "frame-executive"
version = "4.0.0-dev"
dependencies = [
- "array-bytes 4.2.0",
+ "array-bytes",
"frame-support",
"frame-system",
"frame-try-runtime",
@@ -2643,9 +2893,9 @@ dependencies = [
[[package]]
name = "frame-metadata"
-version = "15.1.0"
+version = "16.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "878babb0b136e731cc77ec2fd883ff02745ff21e6fb662729953d44923df009c"
+checksum = "87cf1549fba25a6fcac22785b61698317d958e96cac72a59102ea45b9ae64692"
dependencies = [
"cfg-if",
"parity-scale-codec",
@@ -2658,30 +2908,32 @@ name = "frame-remote-externalities"
version = "0.10.0-dev"
dependencies = [
"async-recursion",
- "frame-support",
"futures",
"indicatif",
"jsonrpsee",
"log",
- "pallet-elections-phragmen",
"parity-scale-codec",
"serde",
"sp-core",
"sp-io",
"sp-runtime",
+ "sp-state-machine",
+ "sp-tracing",
"spinners",
"substrate-rpc-client",
"tokio",
"tokio-retry",
- "tracing-subscriber 0.3.17",
]
[[package]]
name = "frame-support"
version = "4.0.0-dev"
dependencies = [
+ "aquamarine",
+ "array-bytes",
"assert_matches",
"bitflags",
+ "docify",
"environmental",
"frame-metadata",
"frame-support-procedural",
@@ -2689,7 +2941,7 @@ dependencies = [
"impl-trait-for-tuples",
"k256",
"log",
- "once_cell",
+ "macro_magic",
"parity-scale-codec",
"paste",
"pretty_assertions",
@@ -2702,6 +2954,7 @@ dependencies = [
"sp-core",
"sp-core-hashing-proc-macro",
"sp-debug-derive",
+ "sp-genesis-builder",
"sp-inherents",
"sp-io",
"sp-runtime",
@@ -2720,12 +2973,14 @@ dependencies = [
"Inflector",
"cfg-expr",
"derive-syn-parse",
+ "expander",
"frame-support-procedural-tools",
"itertools",
+ "macro_magic",
"proc-macro-warning",
"proc-macro2",
"quote",
- "syn 2.0.15",
+ "syn 2.0.18",
]
[[package]]
@@ -2736,7 +2991,7 @@ dependencies = [
"proc-macro-crate",
"proc-macro2",
"quote",
- "syn 2.0.15",
+ "syn 2.0.18",
]
[[package]]
@@ -2745,7 +3000,7 @@ version = "3.0.0"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.15",
+ "syn 2.0.18",
]
[[package]]
@@ -2770,6 +3025,7 @@ dependencies = [
"sp-state-machine",
"sp-std",
"sp-version",
+ "static_assertions",
"trybuild",
]
@@ -2794,6 +3050,8 @@ dependencies = [
"frame-system",
"parity-scale-codec",
"scale-info",
+ "serde",
+ "sp-runtime",
]
[[package]]
@@ -2871,9 +3129,9 @@ dependencies = [
[[package]]
name = "fs4"
-version = "0.6.4"
+version = "0.6.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a7f5b6908aecca5812a4569056285e58c666588c9573ee59765bf1d3692699e2"
+checksum = "7672706608ecb74ab2e055c68327ffc25ae4cac1e12349204fd5fb0f3487cce2"
dependencies = [
"rustix 0.37.19",
"windows-sys 0.48.0",
@@ -2963,7 +3221,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.15",
+ "syn 2.0.18",
]
[[package]]
@@ -3030,9 +3288,9 @@ dependencies = [
"frame-election-provider-support",
"frame-support",
"frame-system",
- "git2",
"num-format",
"pallet-staking",
+ "sp-staking",
]
[[package]]
@@ -3083,8 +3341,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4"
dependencies = [
"cfg-if",
+ "js-sys",
"libc",
"wasi 0.11.0+wasi-snapshot-preview1",
+ "wasm-bindgen",
]
[[package]]
@@ -3109,9 +3369,9 @@ dependencies = [
[[package]]
name = "gimli"
-version = "0.26.2"
+version = "0.27.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d"
+checksum = "ad0a93d233ebf96623465aad4046a8d3aa4da22d4f4beba5388838c8a434bbb4"
dependencies = [
"fallible-iterator",
"indexmap",
@@ -3119,29 +3379,8 @@ dependencies = [
]
[[package]]
-name = "gimli"
-version = "0.27.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ad0a93d233ebf96623465aad4046a8d3aa4da22d4f4beba5388838c8a434bbb4"
-
-[[package]]
-name = "git2"
-version = "0.16.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ccf7f68c2995f392c49fffb4f95ae2c873297830eb25c6bc4c114ce8f4562acc"
-dependencies = [
- "bitflags",
- "libc",
- "libgit2-sys",
- "log",
- "openssl-probe",
- "openssl-sys",
- "url",
-]
-
-[[package]]
-name = "glob"
-version = "0.3.1"
+name = "glob"
+version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b"
@@ -3182,9 +3421,9 @@ dependencies = [
[[package]]
name = "h2"
-version = "0.3.18"
+version = "0.3.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "17f8a914c2987b688368b5138aa05321db91f4090cf26118185672ad588bce21"
+checksum = "d357c7ae988e7d2182f7d7871d0b963962420b0678b0997ce7de72001aeab782"
dependencies = [
"bytes",
"fnv",
@@ -3207,9 +3446,9 @@ checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7"
[[package]]
name = "handlebars"
-version = "4.3.6"
+version = "4.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "035ef95d03713f2c347a72547b7cd38cbc9af7cd51e6099fb62d586d4a6dee3a"
+checksum = "83c3372087601b532857d332f5957cbae686da52bb7810bf038c3e3c3cc2fa0d"
dependencies = [
"log",
"pest",
@@ -3288,12 +3527,6 @@ version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"
-[[package]]
-name = "hex-literal"
-version = "0.3.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0"
-
[[package]]
name = "hkdf"
version = "0.12.3"
@@ -3329,7 +3562,7 @@ version = "0.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e"
dependencies = [
- "digest 0.10.6",
+ "digest 0.10.7",
]
[[package]]
@@ -3448,10 +3681,25 @@ dependencies = [
"rustls 0.20.8",
"rustls-native-certs",
"tokio",
- "tokio-rustls",
+ "tokio-rustls 0.23.4",
"webpki-roots",
]
+[[package]]
+name = "hyper-rustls"
+version = "0.24.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0646026eb1b3eea4cd9ba47912ea5ce9cc07713d105b1a14698f4e6433d348b7"
+dependencies = [
+ "http",
+ "hyper",
+ "log",
+ "rustls 0.21.1",
+ "rustls-native-certs",
+ "tokio",
+ "tokio-rustls 0.24.0",
+]
+
[[package]]
name = "iana-time-zone"
version = "0.1.56"
@@ -3468,12 +3716,11 @@ dependencies = [
[[package]]
name = "iana-time-zone-haiku"
-version = "0.1.1"
+version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0703ae284fc167426161c2e3f1da3ea71d94b21bedbcc9494e92b28e334e3dca"
+checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f"
dependencies = [
- "cxx",
- "cxx-build",
+ "cc",
]
[[package]]
@@ -3495,9 +3742,9 @@ dependencies = [
[[package]]
name = "idna"
-version = "0.3.0"
+version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6"
+checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c"
dependencies = [
"unicode-bidi",
"unicode-normalization",
@@ -3541,6 +3788,17 @@ dependencies = [
"parity-scale-codec",
]
+[[package]]
+name = "impl-num-traits"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "951641f13f873bff03d4bf19ae8bec531935ac0ac2cc775f84d7edfdcfed3f17"
+dependencies = [
+ "integer-sqrt",
+ "num-traits",
+ "uint",
+]
+
[[package]]
name = "impl-serde"
version = "0.4.0"
@@ -3561,6 +3819,25 @@ dependencies = [
"syn 1.0.109",
]
+[[package]]
+name = "include_dir"
+version = "0.7.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "18762faeff7122e89e0857b02f7ce6fcc0d101d5e9ad2ad7846cc01d61b7f19e"
+dependencies = [
+ "include_dir_macros",
+]
+
+[[package]]
+name = "include_dir_macros"
+version = "0.7.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b139284b5cf57ecfa712bcc66950bb635b31aff41c188e8a4cfc758eca374a3f"
+dependencies = [
+ "proc-macro2",
+ "quote",
+]
+
[[package]]
name = "indexmap"
version = "1.9.3"
@@ -3580,13 +3857,14 @@ checksum = "8e04e2fd2b8188ea827b32ef11de88377086d690286ab35747ef7f9bf3ccb590"
[[package]]
name = "indicatif"
-version = "0.17.3"
+version = "0.17.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cef509aa9bc73864d6756f0d34d35504af3cf0844373afe9b8669a5b8005a729"
+checksum = "8ff8cc23a7393a397ed1d7f56e6365cba772aba9f9912ab968b03043c395d057"
dependencies = [
"console",
+ "instant",
"number_prefix",
- "portable-atomic 0.3.20",
+ "portable-atomic",
"unicode-width",
]
@@ -3636,11 +3914,17 @@ dependencies = [
"webrtc-util",
]
+[[package]]
+name = "intx"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f6f38a50a899dc47a6d0ed5508e7f601a2e34c3a85303514b5d137f3c10a0c75"
+
[[package]]
name = "io-lifetimes"
-version = "1.0.10"
+version = "1.0.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9c66c74d2ae7e79a5a8f7ac924adbe38ee42a859c6539ad869eb51f0b52dc220"
+checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2"
dependencies = [
"hermit-abi 0.3.1",
"libc",
@@ -3709,13 +3993,24 @@ dependencies = [
[[package]]
name = "js-sys"
-version = "0.3.62"
+version = "0.3.63"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "68c16e1bfd491478ab155fd8b4896b86f9ede344949b641e61501e07c2b8b4d5"
+checksum = "2f37a4a5928311ac501dee68b3c7613a1037d0edb30c8e5427bd832d55d1b790"
dependencies = [
"wasm-bindgen",
]
+[[package]]
+name = "json-patch"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1f54898088ccb91df1b492cc80029a6fdf1c48ca0db7c6822a8babad69c94658"
+dependencies = [
+ "serde",
+ "serde_json",
+ "thiserror",
+]
+
[[package]]
name = "jsonrpsee"
version = "0.16.2"
@@ -3746,7 +4041,7 @@ dependencies = [
"soketto",
"thiserror",
"tokio",
- "tokio-rustls",
+ "tokio-rustls 0.23.4",
"tokio-util",
"tracing",
"webpki-roots",
@@ -3788,7 +4083,7 @@ checksum = "cc345b0a43c6bc49b947ebeb936e886a419ee3d894421790c969cc56040542ad"
dependencies = [
"async-trait",
"hyper",
- "hyper-rustls",
+ "hyper-rustls 0.23.2",
"jsonrpsee-core",
"jsonrpsee-types",
"rustc-hash",
@@ -3867,10 +4162,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cadb76004ed8e97623117f3df85b17aaa6626ab0b0831e6573f104df16cd1bcc"
dependencies = [
"cfg-if",
- "ecdsa 0.16.6",
- "elliptic-curve 0.13.4",
+ "ecdsa 0.16.7",
+ "elliptic-curve 0.13.5",
"once_cell",
- "sha2 0.10.6",
+ "sha2 0.10.7",
]
[[package]]
@@ -3909,6 +4204,8 @@ dependencies = [
"log",
"node-primitives",
"pallet-alliance",
+ "pallet-asset-conversion",
+ "pallet-asset-conversion-tx-payment",
"pallet-asset-rate",
"pallet-asset-tx-payment",
"pallet-assets",
@@ -3940,6 +4237,7 @@ dependencies = [
"pallet-message-queue",
"pallet-mmr",
"pallet-multisig",
+ "pallet-nft-fractionalization",
"pallet-nfts",
"pallet-nfts-runtime-api",
"pallet-nis",
@@ -3977,6 +4275,7 @@ dependencies = [
"pallet-vesting",
"pallet-whitelist",
"parity-scale-codec",
+ "primitive-types",
"scale-info",
"sp-api",
"sp-authority-discovery",
@@ -4051,23 +4350,9 @@ checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67"
[[package]]
name = "libc"
-version = "0.2.144"
+version = "0.2.145"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2b00cc1c228a6782d0f076e7b232802e0c5689d41bb5df366f2a6b6621cfdfe1"
-
-[[package]]
-name = "libgit2-sys"
-version = "0.14.2+1.5.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7f3d95f6b51075fe9810a7ae22c7095f12b98005ab364d8544797a825ce946a4"
-dependencies = [
- "cc",
- "libc",
- "libssh2-sys",
- "libz-sys",
- "openssl-sys",
- "pkg-config",
-]
+checksum = "fc86cde3ff845662b8f4ef6cb50ea0e20c524eb3d29ae048287e06a1b3fa6a81"
[[package]]
name = "libloading"
@@ -4087,9 +4372,9 @@ checksum = "7fc7aa29613bd6a620df431842069224d8bc9011086b1db4c0e0cd47fa03ec9a"
[[package]]
name = "libm"
-version = "0.2.6"
+version = "0.2.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "348108ab3fba42ec82ff6e9564fc4ca0247bdccdc68dd8af9764bbc79c3c8ffb"
+checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4"
[[package]]
name = "libp2p"
@@ -4163,7 +4448,7 @@ dependencies = [
"libp2p-identity",
"log",
"multiaddr",
- "multihash 0.17.0",
+ "multihash",
"multistream-select",
"once_cell",
"parking_lot 0.12.1",
@@ -4205,7 +4490,7 @@ dependencies = [
"libp2p-identity",
"libp2p-swarm",
"log",
- "lru 0.10.0",
+ "lru",
"quick-protobuf",
"quick-protobuf-codec",
"smallvec",
@@ -4223,10 +4508,10 @@ dependencies = [
"ed25519-dalek",
"log",
"multiaddr",
- "multihash 0.17.0",
+ "multihash",
"quick-protobuf",
"rand 0.8.5",
- "sha2 0.10.6",
+ "sha2 0.10.7",
"thiserror",
"zeroize",
]
@@ -4251,7 +4536,7 @@ dependencies = [
"log",
"quick-protobuf",
"rand 0.8.5",
- "sha2 0.10.6",
+ "sha2 0.10.7",
"smallvec",
"thiserror",
"uint",
@@ -4309,7 +4594,7 @@ dependencies = [
"once_cell",
"quick-protobuf",
"rand 0.8.5",
- "sha2 0.10.6",
+ "sha2 0.10.7",
"snow",
"static_assertions",
"thiserror",
@@ -4431,7 +4716,7 @@ dependencies = [
"libp2p-core",
"libp2p-identity",
"rcgen 0.10.0",
- "ring",
+ "ring 0.16.20",
"rustls 0.20.8",
"thiserror",
"webpki 0.22.0",
@@ -4470,7 +4755,7 @@ dependencies = [
"libp2p-identity",
"libp2p-noise",
"log",
- "multihash 0.17.0",
+ "multihash",
"quick-protobuf",
"quick-protobuf-codec",
"rand 0.8.5",
@@ -4579,20 +4864,6 @@ dependencies = [
"libsecp256k1-core",
]
-[[package]]
-name = "libssh2-sys"
-version = "0.2.23"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b094a36eb4b8b8c8a7b4b8ae43b2944502be3e59cd87687595cf6b0a71b3f4ca"
-dependencies = [
- "cc",
- "libc",
- "libz-sys",
- "openssl-sys",
- "pkg-config",
- "vcpkg",
-]
-
[[package]]
name = "libz-sys"
version = "1.1.9"
@@ -4600,7 +4871,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "56ee889ecc9568871456d42f603d6a0ce59ff328d291063a45cbdf0036baf6db"
dependencies = [
"cc",
- "libc",
"pkg-config",
"vcpkg",
]
@@ -4646,9 +4916,9 @@ checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4"
[[package]]
name = "linux-raw-sys"
-version = "0.3.7"
+version = "0.3.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ece97ea872ece730aed82664c424eb4c8291e1ff2480247ccf7409044bc6479f"
+checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519"
[[package]]
name = "lite-json"
@@ -4670,9 +4940,9 @@ dependencies = [
[[package]]
name = "lock_api"
-version = "0.4.9"
+version = "0.4.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df"
+checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16"
dependencies = [
"autocfg",
"scopeguard",
@@ -4680,21 +4950,9 @@ dependencies = [
[[package]]
name = "log"
-version = "0.4.17"
+version = "0.4.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e"
-dependencies = [
- "cfg-if",
-]
-
-[[package]]
-name = "lru"
-version = "0.8.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b6e8aaa3f231bb4bd57b84b2d5dc3ae7f350265df8aa96492e0bc394a1571909"
-dependencies = [
- "hashbrown 0.12.3",
-]
+checksum = "518ef76f2f87365916b142844c16d8fefd85039bc5699050210a7778ee1cd1de"
[[package]]
name = "lru"
@@ -4743,6 +5001,54 @@ dependencies = [
"libc",
]
+[[package]]
+name = "macro_magic"
+version = "0.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "aee866bfee30d2d7e83835a4574aad5b45adba4cc807f2a3bbba974e5d4383c9"
+dependencies = [
+ "macro_magic_core",
+ "macro_magic_macros",
+ "quote",
+ "syn 2.0.18",
+]
+
+[[package]]
+name = "macro_magic_core"
+version = "0.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7e766a20fd9c72bab3e1e64ed63f36bd08410e75803813df210d1ce297d7ad00"
+dependencies = [
+ "const-random",
+ "derive-syn-parse",
+ "macro_magic_core_macros",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.18",
+]
+
+[[package]]
+name = "macro_magic_core_macros"
+version = "0.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c12469fc165526520dff2807c2975310ab47cf7190a45b99b49a7dc8befab17b"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.18",
+]
+
+[[package]]
+name = "macro_magic_macros"
+version = "0.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b8fb85ec1620619edf2984a7693497d4ec88a9665d8b87e942856884c92dbf2a"
+dependencies = [
+ "macro_magic_core",
+ "quote",
+ "syn 2.0.18",
+]
+
[[package]]
name = "maplit"
version = "1.0.2"
@@ -4764,15 +5070,6 @@ dependencies = [
"regex-automata",
]
-[[package]]
-name = "matchers"
-version = "0.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558"
-dependencies = [
- "regex-automata",
-]
-
[[package]]
name = "matches"
version = "0.1.10"
@@ -4795,7 +5092,7 @@ version = "0.10.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6365506850d44bff6e2fbcb5176cf63650e48bd45ef2fe2665ae1570e0f4b9ca"
dependencies = [
- "digest 0.10.6",
+ "digest 0.10.7",
]
[[package]]
@@ -4858,12 +5155,6 @@ dependencies = [
"hash-db",
]
-[[package]]
-name = "memory_units"
-version = "0.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3"
-
[[package]]
name = "merlin"
version = "2.0.1"
@@ -4876,6 +5167,18 @@ dependencies = [
"zeroize",
]
+[[package]]
+name = "merlin"
+version = "3.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "58c38e2799fc0978b65dfff8023ec7843e2330bb462f19198840b34b6582397d"
+dependencies = [
+ "byteorder",
+ "keccak",
+ "rand_core 0.6.4",
+ "zeroize",
+]
+
[[package]]
name = "minimal-lexical"
version = "0.2.1"
@@ -4902,14 +5205,13 @@ dependencies = [
[[package]]
name = "mio"
-version = "0.8.6"
+version = "0.8.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5b9d9a46eff5b4ff64b45a9e316a6d1e0bc719ef429cbec4dc630684212bfdf9"
+checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2"
dependencies = [
"libc",
- "log",
"wasi 0.11.0+wasi-snapshot-preview1",
- "windows-sys 0.45.0",
+ "windows-sys 0.48.0",
]
[[package]]
@@ -4989,7 +5291,7 @@ dependencies = [
"data-encoding",
"log",
"multibase",
- "multihash 0.17.0",
+ "multihash",
"percent-encoding",
"serde",
"static_assertions",
@@ -5010,34 +5312,21 @@ dependencies = [
[[package]]
name = "multihash"
-version = "0.16.3"
+version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1c346cf9999c631f002d8f977c4eaeaa0e6386f16007202308d0b3757522c2cc"
+checksum = "835d6ff01d610179fbce3de1694d007e500bf33a7f29689838941d6bf783ae40"
dependencies = [
"blake2b_simd",
"blake2s_simd",
"blake3",
"core2",
- "digest 0.10.6",
+ "digest 0.10.7",
"multihash-derive",
- "sha2 0.10.6",
+ "sha2 0.10.7",
"sha3",
"unsigned-varint",
]
-[[package]]
-name = "multihash"
-version = "0.17.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "835d6ff01d610179fbce3de1694d007e500bf33a7f29689838941d6bf783ae40"
-dependencies = [
- "core2",
- "digest 0.10.6",
- "multihash-derive",
- "sha2 0.10.6",
- "unsigned-varint",
-]
-
[[package]]
name = "multihash-derive"
version = "0.8.1"
@@ -5204,8 +5493,8 @@ dependencies = [
name = "node-bench"
version = "0.9.0-dev"
dependencies = [
- "array-bytes 4.2.0",
- "clap 4.2.7",
+ "array-bytes",
+ "clap 4.3.2",
"derive_more",
"fs_extra",
"futures",
@@ -5240,9 +5529,9 @@ dependencies = [
name = "node-cli"
version = "3.0.0-dev"
dependencies = [
- "array-bytes 4.2.0",
+ "array-bytes",
"assert_cmd",
- "clap 4.2.7",
+ "clap 4.3.2",
"clap_complete",
"criterion",
"frame-benchmarking-cli",
@@ -5257,14 +5546,14 @@ dependencies = [
"node-inspect",
"node-primitives",
"node-rpc",
+ "pallet-asset-conversion-tx-payment",
"pallet-asset-tx-payment",
"pallet-assets",
"pallet-balances",
"pallet-im-online",
"pallet-timestamp",
- "pallet-transaction-payment",
"parity-scale-codec",
- "platforms 2.0.0",
+ "platforms",
"rand 0.8.5",
"regex",
"sc-authority-discovery",
@@ -5285,6 +5574,7 @@ dependencies = [
"sc-network-common",
"sc-network-statement",
"sc-network-sync",
+ "sc-offchain",
"sc-rpc",
"sc-service",
"sc-service-test",
@@ -5310,9 +5600,9 @@ dependencies = [
"sp-keyring",
"sp-keystore",
"sp-runtime",
+ "sp-statement-store",
"sp-timestamp",
"sp-tracing",
- "sp-transaction-pool",
"sp-transaction-storage-proof",
"substrate-build-script-utils",
"substrate-cli-test-utils",
@@ -5367,11 +5657,10 @@ dependencies = [
name = "node-inspect"
version = "0.9.0-dev"
dependencies = [
- "clap 4.2.7",
+ "clap 4.3.2",
"parity-scale-codec",
"sc-cli",
"sc-client-api",
- "sc-executor",
"sc-service",
"sp-blockchain",
"sp-core",
@@ -5383,10 +5672,6 @@ dependencies = [
name = "node-primitives"
version = "2.0.0"
dependencies = [
- "frame-system",
- "parity-scale-codec",
- "scale-info",
- "sp-application-crypto",
"sp-core",
"sp-runtime",
]
@@ -5426,7 +5711,7 @@ dependencies = [
name = "node-runtime-generate-bags"
version = "3.0.0"
dependencies = [
- "clap 4.2.7",
+ "clap 4.3.2",
"generate-bags",
"kitchensink-runtime",
]
@@ -5435,7 +5720,7 @@ dependencies = [
name = "node-template"
version = "4.0.0-dev"
dependencies = [
- "clap 4.2.7",
+ "clap 4.3.2",
"frame-benchmarking",
"frame-benchmarking-cli",
"frame-system",
@@ -5451,19 +5736,16 @@ dependencies = [
"sc-consensus-aura",
"sc-consensus-grandpa",
"sc-executor",
- "sc-keystore",
"sc-network",
- "sc-rpc",
+ "sc-offchain",
"sc-rpc-api",
"sc-service",
- "sc-statement-store",
"sc-telemetry",
"sc-transaction-pool",
"sc-transaction-pool-api",
"sp-api",
"sp-block-builder",
"sp-blockchain",
- "sp-consensus",
"sp-consensus-aura",
"sp-consensus-grandpa",
"sp-core",
@@ -5481,10 +5763,9 @@ dependencies = [
name = "node-template-release"
version = "3.0.0"
dependencies = [
- "clap 4.2.7",
+ "clap 4.3.2",
"flate2",
"fs_extra",
- "git2",
"glob",
"itertools",
"tar",
@@ -5539,9 +5820,10 @@ dependencies = [
"log",
"node-executor",
"node-primitives",
+ "pallet-asset-conversion",
+ "pallet-asset-conversion-tx-payment",
"pallet-asset-tx-payment",
"pallet-assets",
- "pallet-transaction-payment",
"parity-scale-codec",
"sc-block-builder",
"sc-client-api",
@@ -5585,16 +5867,6 @@ version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be"
-[[package]]
-name = "nu-ansi-term"
-version = "0.46.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84"
-dependencies = [
- "overload",
- "winapi",
-]
-
[[package]]
name = "num"
version = "0.4.0"
@@ -5679,7 +5951,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd"
dependencies = [
"autocfg",
- "libm 0.2.6",
+ "libm 0.2.7",
]
[[package]]
@@ -5700,25 +5972,16 @@ checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3"
[[package]]
name = "object"
-version = "0.29.0"
+version = "0.30.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "21158b2c33aa6d4561f1c0a6ea283ca92bc54802a93b263e910746d679a7eb53"
+checksum = "03b4680b86d9cfafba8fc491dc9b6df26b68cf40e9e6cd73909194759a63c385"
dependencies = [
"crc32fast",
- "hashbrown 0.12.3",
+ "hashbrown 0.13.2",
"indexmap",
"memchr",
]
-[[package]]
-name = "object"
-version = "0.30.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ea86265d3d3dcb6a27fc51bd29a4bf387fae9d2986b823079d4986af253eb439"
-dependencies = [
- "memchr",
-]
-
[[package]]
name = "oid-registry"
version = "0.4.0"
@@ -5739,9 +6002,9 @@ dependencies = [
[[package]]
name = "once_cell"
-version = "1.17.1"
+version = "1.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3"
+checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d"
[[package]]
name = "oorandom"
@@ -5767,18 +6030,6 @@ version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf"
-[[package]]
-name = "openssl-sys"
-version = "0.9.87"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8e17f59264b2809d77ae94f0e1ebabc434773f370d6ca667bd223ea10e06cc7e"
-dependencies = [
- "cc",
- "libc",
- "pkg-config",
- "vcpkg",
-]
-
[[package]]
name = "os_str_bytes"
version = "6.5.0"
@@ -5794,12 +6045,6 @@ dependencies = [
"winapi",
]
-[[package]]
-name = "overload"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39"
-
[[package]]
name = "p256"
version = "0.11.1"
@@ -5808,7 +6053,7 @@ checksum = "51f44edd08f51e2ade572f141051021c5af22677e42b7dd28a88155151c33594"
dependencies = [
"ecdsa 0.14.8",
"elliptic-curve 0.12.3",
- "sha2 0.10.6",
+ "sha2 0.10.7",
]
[[package]]
@@ -5819,7 +6064,7 @@ checksum = "dfc8c5bf642dde52bb9e87c0ecd8ca5a76faac2eeed98dedb7c717997e1080aa"
dependencies = [
"ecdsa 0.14.8",
"elliptic-curve 0.12.3",
- "sha2 0.10.6",
+ "sha2 0.10.7",
]
[[package]]
@@ -5836,7 +6081,7 @@ dependencies = [
name = "pallet-alliance"
version = "4.0.0-dev"
dependencies = [
- "array-bytes 4.2.0",
+ "array-bytes",
"frame-benchmarking",
"frame-support",
"frame-system",
@@ -5853,6 +6098,45 @@ dependencies = [
"sp-std",
]
+[[package]]
+name = "pallet-asset-conversion"
+version = "4.0.0-dev"
+dependencies = [
+ "frame-benchmarking",
+ "frame-support",
+ "frame-system",
+ "pallet-assets",
+ "pallet-balances",
+ "parity-scale-codec",
+ "primitive-types",
+ "scale-info",
+ "sp-api",
+ "sp-arithmetic",
+ "sp-core",
+ "sp-io",
+ "sp-runtime",
+ "sp-std",
+]
+
+[[package]]
+name = "pallet-asset-conversion-tx-payment"
+version = "4.0.0-dev"
+dependencies = [
+ "frame-support",
+ "frame-system",
+ "pallet-asset-conversion",
+ "pallet-assets",
+ "pallet-balances",
+ "pallet-transaction-payment",
+ "parity-scale-codec",
+ "scale-info",
+ "sp-core",
+ "sp-io",
+ "sp-runtime",
+ "sp-std",
+ "sp-storage",
+]
+
[[package]]
name = "pallet-asset-rate"
version = "4.0.0-dev"
@@ -6003,6 +6287,8 @@ dependencies = [
name = "pallet-bags-list"
version = "4.0.0-dev"
dependencies = [
+ "aquamarine",
+ "docify",
"frame-benchmarking",
"frame-election-provider-support",
"frame-support",
@@ -6094,7 +6380,7 @@ dependencies = [
name = "pallet-beefy-mmr"
version = "4.0.0-dev"
dependencies = [
- "array-bytes 4.2.0",
+ "array-bytes",
"binary-merkle-tree",
"frame-support",
"frame-system",
@@ -6171,7 +6457,7 @@ dependencies = [
name = "pallet-contracts"
version = "4.0.0-dev"
dependencies = [
- "array-bytes 4.2.0",
+ "array-bytes",
"assert_matches",
"bitflags",
"env_logger 0.9.3",
@@ -6202,14 +6488,13 @@ dependencies = [
"sp-runtime",
"sp-std",
"wasm-instrument 0.4.0",
- "wasmi 0.28.0",
- "wasmparser-nostd",
+ "wasmi",
"wat",
]
[[package]]
name = "pallet-contracts-primitives"
-version = "7.0.0"
+version = "24.0.0"
dependencies = [
"bitflags",
"parity-scale-codec",
@@ -6225,7 +6510,7 @@ version = "4.0.0-dev"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.15",
+ "syn 2.0.18",
]
[[package]]
@@ -6264,6 +6549,20 @@ dependencies = [
"sp-std",
]
+[[package]]
+name = "pallet-default-config-example"
+version = "4.0.0-dev"
+dependencies = [
+ "frame-support",
+ "frame-system",
+ "log",
+ "parity-scale-codec",
+ "scale-info",
+ "sp-io",
+ "sp-runtime",
+ "sp-std",
+]
+
[[package]]
name = "pallet-democracy"
version = "4.0.0-dev"
@@ -6315,6 +6614,7 @@ dependencies = [
"pallet-staking",
"pallet-timestamp",
"parity-scale-codec",
+ "parking_lot 0.12.1",
"scale-info",
"sp-core",
"sp-io",
@@ -6377,6 +6677,7 @@ dependencies = [
"sp-io",
"sp-npos-elections",
"sp-runtime",
+ "sp-staking",
"sp-std",
"sp-tracing",
"substrate-test-utils",
@@ -6399,6 +6700,23 @@ dependencies = [
"sp-std",
]
+[[package]]
+name = "pallet-example-kitchensink"
+version = "4.0.0-dev"
+dependencies = [
+ "frame-benchmarking",
+ "frame-support",
+ "frame-system",
+ "log",
+ "pallet-balances",
+ "parity-scale-codec",
+ "scale-info",
+ "sp-core",
+ "sp-io",
+ "sp-runtime",
+ "sp-std",
+]
+
[[package]]
name = "pallet-example-offchain-worker"
version = "4.0.0-dev"
@@ -6416,10 +6734,38 @@ dependencies = [
"sp-std",
]
+[[package]]
+name = "pallet-example-split"
+version = "4.0.0-dev"
+dependencies = [
+ "frame-benchmarking",
+ "frame-support",
+ "frame-system",
+ "log",
+ "parity-scale-codec",
+ "scale-info",
+ "sp-core",
+ "sp-io",
+ "sp-std",
+]
+
+[[package]]
+name = "pallet-examples"
+version = "4.0.0-dev"
+dependencies = [
+ "pallet-default-config-example",
+ "pallet-dev-mode",
+ "pallet-example-basic",
+ "pallet-example-kitchensink",
+ "pallet-example-offchain-worker",
+ "pallet-example-split",
+]
+
[[package]]
name = "pallet-fast-unstake"
version = "4.0.0-dev"
dependencies = [
+ "docify",
"frame-benchmarking",
"frame-election-provider-support",
"frame-support",
@@ -6616,7 +6962,7 @@ dependencies = [
name = "pallet-mmr"
version = "4.0.0-dev"
dependencies = [
- "array-bytes 4.2.0",
+ "array-bytes",
"env_logger 0.9.3",
"frame-benchmarking",
"frame-support",
@@ -6642,6 +6988,24 @@ dependencies = [
"pallet-balances",
"parity-scale-codec",
"scale-info",
+ "sp-io",
+ "sp-runtime",
+ "sp-std",
+]
+
+[[package]]
+name = "pallet-nft-fractionalization"
+version = "4.0.0-dev"
+dependencies = [
+ "frame-benchmarking",
+ "frame-support",
+ "frame-system",
+ "log",
+ "pallet-assets",
+ "pallet-balances",
+ "pallet-nfts",
+ "parity-scale-codec",
+ "scale-info",
"sp-core",
"sp-io",
"sp-runtime",
@@ -6856,10 +7220,37 @@ dependencies = [
"sp-core",
"sp-io",
"sp-runtime",
- "sp-staking",
+ "sp-staking",
+ "sp-std",
+]
+
+[[package]]
+name = "pallet-paged-list"
+version = "0.1.0"
+dependencies = [
+ "docify",
+ "frame-benchmarking",
+ "frame-support",
+ "frame-system",
+ "parity-scale-codec",
+ "scale-info",
+ "sp-core",
+ "sp-io",
+ "sp-runtime",
"sp-std",
]
+[[package]]
+name = "pallet-paged-list-fuzzer"
+version = "0.1.0"
+dependencies = [
+ "arbitrary",
+ "frame-support",
+ "honggfuzz",
+ "pallet-paged-list",
+ "sp-io",
+]
+
[[package]]
name = "pallet-preimage"
version = "4.0.0-dev"
@@ -7021,6 +7412,7 @@ dependencies = [
name = "pallet-scheduler"
version = "4.0.0-dev"
dependencies = [
+ "docify",
"frame-benchmarking",
"frame-support",
"frame-system",
@@ -7098,13 +7490,16 @@ dependencies = [
name = "pallet-society"
version = "4.0.0-dev"
dependencies = [
+ "frame-benchmarking",
"frame-support",
"frame-support-test",
"frame-system",
+ "log",
"pallet-balances",
"parity-scale-codec",
"rand_chacha 0.2.2",
"scale-info",
+ "sp-arithmetic",
"sp-core",
"sp-io",
"sp-runtime",
@@ -7149,7 +7544,7 @@ dependencies = [
"proc-macro2",
"quote",
"sp-runtime",
- "syn 2.0.15",
+ "syn 2.0.18",
]
[[package]]
@@ -7325,7 +7720,7 @@ dependencies = [
name = "pallet-transaction-storage"
version = "4.0.0-dev"
dependencies = [
- "array-bytes 4.2.0",
+ "array-bytes",
"frame-benchmarking",
"frame-support",
"frame-system",
@@ -7454,9 +7849,9 @@ dependencies = [
[[package]]
name = "parity-scale-codec"
-version = "3.5.0"
+version = "3.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5ddb756ca205bd108aee3c62c6d3c994e1df84a59b9d6d4a5ea42ee1fd5a9a28"
+checksum = "2287753623c76f953acd29d15d8100bcab84d29db78fb6f352adb3c53e83b967"
dependencies = [
"arrayvec 0.7.2",
"bitvec",
@@ -7469,9 +7864,9 @@ dependencies = [
[[package]]
name = "parity-scale-codec-derive"
-version = "3.1.4"
+version = "3.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "86b26a931f824dd4eca30b3e43bb4f31cd5f0d3a403c5f5ff27106b805bfde7b"
+checksum = "2b6937b5e67bfba3351b87b040d48352a2fcb6ad72f81855412ce97b45c8f110"
dependencies = [
"proc-macro-crate",
"proc-macro2",
@@ -7515,7 +7910,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f"
dependencies = [
"lock_api",
- "parking_lot_core 0.9.7",
+ "parking_lot_core 0.9.8",
]
[[package]]
@@ -7534,17 +7929,23 @@ dependencies = [
[[package]]
name = "parking_lot_core"
-version = "0.9.7"
+version = "0.9.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521"
+checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447"
dependencies = [
"cfg-if",
"libc",
- "redox_syscall 0.2.16",
+ "redox_syscall 0.3.5",
"smallvec",
- "windows-sys 0.45.0",
+ "windows-targets 0.48.0",
]
+[[package]]
+name = "partial_sort"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7924d1d0ad836f665c9065e26d016c673ece3993f30d340068b16f282afc1156"
+
[[package]]
name = "paste"
version = "1.0.12"
@@ -7566,7 +7967,7 @@ version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917"
dependencies = [
- "digest 0.10.6",
+ "digest 0.10.7",
]
[[package]]
@@ -7595,9 +7996,9 @@ dependencies = [
[[package]]
name = "percent-encoding"
-version = "2.2.0"
+version = "2.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e"
+checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94"
[[package]]
name = "pest"
@@ -7629,7 +8030,7 @@ dependencies = [
"pest_meta",
"proc-macro2",
"quote",
- "syn 2.0.15",
+ "syn 2.0.18",
]
[[package]]
@@ -7640,7 +8041,7 @@ checksum = "745a452f8eb71e39ffd8ee32b3c5f51d03845f99786fa9b68db6ff509c505411"
dependencies = [
"once_cell",
"pest",
- "sha2 0.10.6",
+ "sha2 0.10.7",
]
[[package]]
@@ -7655,22 +8056,22 @@ dependencies = [
[[package]]
name = "pin-project"
-version = "1.0.12"
+version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ad29a609b6bcd67fee905812e544992d216af9d755757c05ed2d0e15a74c6ecc"
+checksum = "c95a7476719eab1e366eaf73d0260af3021184f18177925b07f54b30089ceead"
dependencies = [
"pin-project-internal",
]
[[package]]
name = "pin-project-internal"
-version = "1.0.12"
+version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55"
+checksum = "39407670928234ebc5e6e580247dd567ad73a3578460c5990f9503df207e8f07"
dependencies = [
"proc-macro2",
"quote",
- "syn 1.0.109",
+ "syn 2.0.18",
]
[[package]]
@@ -7707,7 +8108,7 @@ version = "0.10.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7"
dependencies = [
- "der 0.7.5",
+ "der 0.7.6",
"spki 0.7.2",
]
@@ -7717,12 +8118,6 @@ version = "0.3.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964"
-[[package]]
-name = "platforms"
-version = "2.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e8d0eef3571242013a0d5dc84861c3ae4a652e56e12adf8bdc26ff5f8cb34c94"
-
[[package]]
name = "platforms"
version = "3.0.2"
@@ -7805,23 +8200,14 @@ dependencies = [
"cfg-if",
"cpufeatures",
"opaque-debug 0.3.0",
- "universal-hash 0.5.0",
-]
-
-[[package]]
-name = "portable-atomic"
-version = "0.3.20"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e30165d31df606f5726b090ec7592c308a0eaf61721ff64c9a3018e344a8753e"
-dependencies = [
- "portable-atomic 1.3.1",
+ "universal-hash 0.5.1",
]
[[package]]
name = "portable-atomic"
-version = "1.3.1"
+version = "1.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1bbda379e6e462c97ea6afe9f6233619b202bbc4968d7caa6917788d2070a044"
+checksum = "767eb9f07d4a5ebcb39bbf2d452058a93c011373abf6832e24194a1c3f004794"
[[package]]
name = "ppv-lite86"
@@ -7895,12 +8281,12 @@ dependencies = [
[[package]]
name = "prettyplease"
-version = "0.2.4"
+version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1ceca8aaf45b5c46ec7ed39fff75f57290368c1846d33d24a122ca81416ab058"
+checksum = "3b69d39aab54d069e7f2fe8cb970493e7834601ca2d8c65fd7bbd183578080d1"
dependencies = [
"proc-macro2",
- "syn 2.0.15",
+ "syn 2.0.18",
]
[[package]]
@@ -7911,6 +8297,7 @@ checksum = "9f3486ccba82358b11a77516035647c34ba167dfa53312630de83b12bd4f3d66"
dependencies = [
"fixed-hash",
"impl-codec",
+ "impl-num-traits",
"impl-serde",
"scale-info",
"uint",
@@ -7950,22 +8337,28 @@ dependencies = [
"version_check",
]
+[[package]]
+name = "proc-macro-hack"
+version = "0.5.20+deprecated"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068"
+
[[package]]
name = "proc-macro-warning"
-version = "0.3.1"
+version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0e99670bafb56b9a106419397343bdbc8b8742c3cc449fec6345f86173f47cd4"
+checksum = "70550716265d1ec349c41f70dd4f964b4fd88394efe4405f0c1da679c4799a07"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.15",
+ "syn 2.0.18",
]
[[package]]
name = "proc-macro2"
-version = "1.0.56"
+version = "1.0.60"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435"
+checksum = "dec2b086b7a862cf4de201096214fa870344cf922b2b30c167badb3af3195406"
dependencies = [
"unicode-ident",
]
@@ -8126,7 +8519,7 @@ checksum = "67c10f662eee9c94ddd7135043e544f3c82fa839a1e7b865911331961b53186c"
dependencies = [
"bytes",
"rand 0.8.5",
- "ring",
+ "ring 0.16.20",
"rustc-hash",
"rustls 0.20.8",
"slab",
@@ -8138,9 +8531,9 @@ dependencies = [
[[package]]
name = "quote"
-version = "1.0.27"
+version = "1.0.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8f4f29d145265ec1c483c7c654450edde0bfe043d3938d6972630663356d9500"
+checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488"
dependencies = [
"proc-macro2",
]
@@ -8276,7 +8669,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6413f3de1edee53342e6138e75b56d32e7bc6e332b3bd62d497b1929d4cfbcdd"
dependencies = [
"pem",
- "ring",
+ "ring 0.16.20",
"time 0.3.21",
"x509-parser 0.13.2",
"yasna",
@@ -8289,7 +8682,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ffbe84efe2f38dea12e9bfc1f65377fdf03e53a18cb3b995faedf7934c7e785b"
dependencies = [
"pem",
- "ring",
+ "ring 0.16.20",
"time 0.3.21",
"yasna",
]
@@ -8340,14 +8733,14 @@ checksum = "8d2275aab483050ab2a7364c1a46604865ee7d6906684e08db0f090acf74f9e7"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.15",
+ "syn 2.0.18",
]
[[package]]
name = "regalloc2"
-version = "0.5.1"
+version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "300d4fbfb40c1c66a78ba3ddd41c1110247cf52f97b87d0f2fc9209bd49b030c"
+checksum = "80535183cae11b149d618fbd3c37e38d7cda589d82d7769e196ca9a9042d7621"
dependencies = [
"fxhash",
"log",
@@ -8357,13 +8750,13 @@ dependencies = [
[[package]]
name = "regex"
-version = "1.8.1"
+version = "1.8.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "af83e617f331cc6ae2da5443c602dfa5af81e517212d9d611a5b3ba1777b5370"
+checksum = "d0ab3ca65655bb1e41f2a8c8cd662eb4fb035e67c3f78da1d61dffe89d07300f"
dependencies = [
- "aho-corasick 1.0.1",
+ "aho-corasick 1.0.2",
"memchr",
- "regex-syntax 0.7.1",
+ "regex-syntax 0.7.2",
]
[[package]]
@@ -8383,21 +8776,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1"
[[package]]
name = "regex-syntax"
-version = "0.7.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a5996294f19bd3aae0453a862ad728f60e6600695733dd5df01da90c54363a3c"
-
-[[package]]
-name = "region"
-version = "3.0.0"
+version = "0.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "76e189c2369884dce920945e2ddf79b3dff49e071a167dd1817fa9c4c00d512e"
-dependencies = [
- "bitflags",
- "libc",
- "mach",
- "winapi",
-]
+checksum = "436b050e76ed2903236f032a59761c1eb99e1b0aead2c257922771dab1fc8c78"
[[package]]
name = "resolv-conf"
@@ -8430,6 +8811,21 @@ dependencies = [
"subtle",
]
+[[package]]
+name = "ring"
+version = "0.1.0"
+source = "git+https://github.com/w3f/ring-proof#0e948f3c28cbacecdd3020403c4841c0eb339213"
+dependencies = [
+ "ark-ec",
+ "ark-ff",
+ "ark-poly",
+ "ark-serialize",
+ "ark-std",
+ "common",
+ "fflonk",
+ "merlin 3.0.0",
+]
+
[[package]]
name = "ring"
version = "0.16.20"
@@ -8563,9 +8959,9 @@ dependencies = [
[[package]]
name = "rustix"
-version = "0.36.13"
+version = "0.36.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3a38f9520be93aba504e8ca974197f46158de5dcaa9fa04b57c57cd6a679d658"
+checksum = "14e4d67015953998ad0eb82887a0eb0129e18a7e2f3b7b0f6c422fddcd503d62"
dependencies = [
"bitflags",
"errno",
@@ -8585,7 +8981,7 @@ dependencies = [
"errno",
"io-lifetimes",
"libc",
- "linux-raw-sys 0.3.7",
+ "linux-raw-sys 0.3.8",
"windows-sys 0.48.0",
]
@@ -8597,7 +8993,7 @@ checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7"
dependencies = [
"base64 0.13.1",
"log",
- "ring",
+ "ring 0.16.20",
"sct 0.6.1",
"webpki 0.21.4",
]
@@ -8609,11 +9005,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f"
dependencies = [
"log",
- "ring",
+ "ring 0.16.20",
"sct 0.7.0",
"webpki 0.22.0",
]
+[[package]]
+name = "rustls"
+version = "0.21.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c911ba11bc8433e811ce56fde130ccf32f5127cab0e0194e9c68c5a5b671791e"
+dependencies = [
+ "log",
+ "ring 0.16.20",
+ "rustls-webpki",
+ "sct 0.7.0",
+]
+
[[package]]
name = "rustls-native-certs"
version = "0.6.2"
@@ -8632,7 +9040,17 @@ version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d194b56d58803a43635bdc398cd17e383d6f71f9182b9a192c127ca42494a59b"
dependencies = [
- "base64 0.21.0",
+ "base64 0.21.2",
+]
+
+[[package]]
+name = "rustls-webpki"
+version = "0.100.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d6207cd5ed3d8dca7816f8f3725513a34609c0c765bf652b8c3cb4cfd87db46b"
+dependencies = [
+ "ring 0.16.20",
+ "untrusted",
]
[[package]]
@@ -8716,7 +9134,7 @@ dependencies = [
"ip_network",
"libp2p",
"log",
- "multihash 0.17.0",
+ "multihash",
"parity-scale-codec",
"prost",
"prost-build",
@@ -8724,7 +9142,6 @@ dependencies = [
"rand 0.8.5",
"sc-client-api",
"sc-network",
- "sc-network-common",
"sp-api",
"sp-authority-discovery",
"sp-blockchain",
@@ -8803,16 +9220,16 @@ dependencies = [
"proc-macro-crate",
"proc-macro2",
"quote",
- "syn 2.0.15",
+ "syn 2.0.18",
]
[[package]]
name = "sc-cli"
version = "0.10.0-dev"
dependencies = [
- "array-bytes 4.2.0",
+ "array-bytes",
"chrono",
- "clap 4.2.7",
+ "clap 4.3.2",
"fdlimit",
"futures",
"futures-timer",
@@ -8827,7 +9244,6 @@ dependencies = [
"sc-client-db",
"sc-keystore",
"sc-network",
- "sc-network-common",
"sc-service",
"sc-telemetry",
"sc-tracing",
@@ -8866,7 +9282,6 @@ dependencies = [
"sp-core",
"sp-database",
"sp-externalities",
- "sp-keystore",
"sp-runtime",
"sp-state-machine",
"sp-statement-store",
@@ -8881,7 +9296,7 @@ dependencies = [
name = "sc-client-db"
version = "0.10.0-dev"
dependencies = [
- "array-bytes 4.2.0",
+ "array-bytes",
"criterion",
"hash-db",
"kitchensink-runtime",
@@ -8992,10 +9407,10 @@ dependencies = [
"sc-consensus",
"sc-consensus-epochs",
"sc-consensus-slots",
- "sc-keystore",
"sc-network",
"sc-network-test",
"sc-telemetry",
+ "sc-transaction-pool-api",
"scale-info",
"sp-api",
"sp-application-crypto",
@@ -9028,6 +9443,7 @@ dependencies = [
"sc-consensus-epochs",
"sc-keystore",
"sc-rpc-api",
+ "sc-transaction-pool-api",
"serde",
"serde_json",
"sp-api",
@@ -9048,7 +9464,8 @@ dependencies = [
name = "sc-consensus-beefy"
version = "4.0.0-dev"
dependencies = [
- "array-bytes 4.2.0",
+ "array-bytes",
+ "async-channel",
"async-trait",
"fnv",
"futures",
@@ -9058,9 +9475,7 @@ dependencies = [
"sc-block-builder",
"sc-client-api",
"sc-consensus",
- "sc-keystore",
"sc-network",
- "sc-network-common",
"sc-network-gossip",
"sc-network-sync",
"sc-network-test",
@@ -9125,7 +9540,7 @@ name = "sc-consensus-grandpa"
version = "0.10.0-dev"
dependencies = [
"ahash 0.8.3",
- "array-bytes 4.2.0",
+ "array-bytes",
"assert_matches",
"async-trait",
"dyn-clone",
@@ -9146,6 +9561,7 @@ dependencies = [
"sc-network-gossip",
"sc-network-test",
"sc-telemetry",
+ "sc-transaction-pool-api",
"sc-utils",
"serde",
"serde_json",
@@ -9279,21 +9695,20 @@ dependencies = [
name = "sc-executor"
version = "0.10.0-dev"
dependencies = [
- "array-bytes 4.2.0",
+ "array-bytes",
"assert_matches",
"criterion",
"env_logger 0.9.3",
- "lru 0.8.1",
"num_cpus",
"parity-scale-codec",
"parking_lot 0.12.1",
"paste",
"regex",
"sc-executor-common",
- "sc-executor-wasmi",
"sc-executor-wasmtime",
"sc-runtime-test",
"sc-tracing",
+ "schnellru",
"sp-api",
"sp-core",
"sp-externalities",
@@ -9310,8 +9725,7 @@ dependencies = [
"substrate-test-runtime",
"tempfile",
"tracing",
- "tracing-subscriber 0.2.25",
- "wasmi 0.13.2",
+ "tracing-subscriber",
"wat",
]
@@ -9324,19 +9738,6 @@ dependencies = [
"sp-wasm-interface",
"thiserror",
"wasm-instrument 0.3.0",
- "wasmi 0.13.2",
-]
-
-[[package]]
-name = "sc-executor-wasmi"
-version = "0.10.0-dev"
-dependencies = [
- "log",
- "sc-allocator",
- "sc-executor-common",
- "sp-runtime-interface",
- "sp-wasm-interface",
- "wasmi 0.13.2",
]
[[package]]
@@ -9348,10 +9749,9 @@ dependencies = [
"cfg-if",
"libc",
"log",
- "once_cell",
"parity-scale-codec",
"paste",
- "rustix 0.36.13",
+ "rustix 0.36.14",
"sc-allocator",
"sc-executor-common",
"sc-runtime-test",
@@ -9382,7 +9782,7 @@ dependencies = [
name = "sc-keystore"
version = "4.0.0-dev"
dependencies = [
- "array-bytes 4.2.0",
+ "array-bytes",
"parking_lot 0.12.1",
"serde_json",
"sp-application-crypto",
@@ -9396,7 +9796,7 @@ dependencies = [
name = "sc-network"
version = "0.10.0-dev"
dependencies = [
- "array-bytes 4.2.0",
+ "array-bytes",
"assert_matches",
"async-channel",
"async-trait",
@@ -9410,28 +9810,23 @@ dependencies = [
"libp2p",
"linked_hash_set",
"log",
- "lru 0.8.1",
"mockall",
"multistream-select",
"parity-scale-codec",
"parking_lot 0.12.1",
+ "partial_sort",
"pin-project",
"rand 0.8.5",
- "sc-block-builder",
"sc-client-api",
- "sc-consensus",
"sc-network-common",
"sc-network-light",
"sc-network-sync",
- "sc-peerset",
"sc-utils",
"serde",
"serde_json",
"smallvec",
- "snow",
"sp-arithmetic",
"sp-blockchain",
- "sp-consensus",
"sp-core",
"sp-runtime",
"sp-test-primitives",
@@ -9445,6 +9840,7 @@ dependencies = [
"tokio-test",
"tokio-util",
"unsigned-varint",
+ "wasm-timer",
"zeroize",
]
@@ -9452,6 +9848,7 @@ dependencies = [
name = "sc-network-bitswap"
version = "0.10.0-dev"
dependencies = [
+ "async-channel",
"cid",
"futures",
"libp2p-identity",
@@ -9462,7 +9859,6 @@ dependencies = [
"sc-client-api",
"sc-consensus",
"sc-network",
- "sc-network-common",
"sp-blockchain",
"sp-consensus",
"sp-core",
@@ -9478,28 +9874,17 @@ dependencies = [
name = "sc-network-common"
version = "0.10.0-dev"
dependencies = [
- "array-bytes 4.2.0",
"async-trait",
"bitflags",
- "bytes",
"futures",
- "futures-timer",
"libp2p-identity",
"parity-scale-codec",
"prost-build",
"sc-consensus",
- "sc-peerset",
- "sc-utils",
- "serde",
- "smallvec",
- "sp-blockchain",
"sp-consensus",
"sp-consensus-grandpa",
"sp-runtime",
- "substrate-prometheus-endpoint",
"tempfile",
- "thiserror",
- "zeroize",
]
[[package]]
@@ -9511,11 +9896,10 @@ dependencies = [
"futures-timer",
"libp2p",
"log",
- "lru 0.8.1",
"quickcheck",
"sc-network",
"sc-network-common",
- "sc-peerset",
+ "schnellru",
"sp-runtime",
"substrate-prometheus-endpoint",
"substrate-test-runtime-client",
@@ -9527,7 +9911,8 @@ dependencies = [
name = "sc-network-light"
version = "0.10.0-dev"
dependencies = [
- "array-bytes 4.2.0",
+ "array-bytes",
+ "async-channel",
"futures",
"libp2p-identity",
"log",
@@ -9536,8 +9921,6 @@ dependencies = [
"prost-build",
"sc-client-api",
"sc-network",
- "sc-network-common",
- "sc-peerset",
"sp-blockchain",
"sp-core",
"sp-runtime",
@@ -9548,18 +9931,15 @@ dependencies = [
name = "sc-network-statement"
version = "0.10.0-dev"
dependencies = [
- "array-bytes 4.2.0",
+ "array-bytes",
"async-channel",
"futures",
"libp2p",
"log",
"parity-scale-codec",
- "pin-project",
"sc-network",
"sc-network-common",
- "sc-peerset",
"sp-consensus",
- "sp-runtime",
"sp-statement-store",
"substrate-prometheus-endpoint",
]
@@ -9568,14 +9948,14 @@ dependencies = [
name = "sc-network-sync"
version = "0.10.0-dev"
dependencies = [
- "array-bytes 4.2.0",
+ "array-bytes",
+ "async-channel",
"async-trait",
"fork-tree",
"futures",
"futures-timer",
"libp2p",
"log",
- "lru 0.8.1",
"mockall",
"parity-scale-codec",
"prost",
@@ -9586,8 +9966,8 @@ dependencies = [
"sc-consensus",
"sc-network",
"sc-network-common",
- "sc-peerset",
"sc-utils",
+ "schnellru",
"smallvec",
"sp-arithmetic",
"sp-blockchain",
@@ -9625,7 +10005,6 @@ dependencies = [
"sc-utils",
"sp-blockchain",
"sp-consensus",
- "sp-consensus-babe",
"sp-core",
"sp-runtime",
"sp-tracing",
@@ -9638,15 +10017,13 @@ dependencies = [
name = "sc-network-transactions"
version = "0.10.0-dev"
dependencies = [
- "array-bytes 4.2.0",
+ "array-bytes",
"futures",
"libp2p",
"log",
"parity-scale-codec",
- "pin-project",
"sc-network",
"sc-network-common",
- "sc-peerset",
"sc-utils",
"sp-consensus",
"sp-runtime",
@@ -9657,15 +10034,16 @@ dependencies = [
name = "sc-offchain"
version = "4.0.0-dev"
dependencies = [
- "array-bytes 4.2.0",
+ "array-bytes",
"bytes",
"fnv",
"futures",
"futures-timer",
"hyper",
- "hyper-rustls",
+ "hyper-rustls 0.24.0",
"lazy_static",
"libp2p",
+ "log",
"num_cpus",
"once_cell",
"parity-scale-codec",
@@ -9676,13 +10054,14 @@ dependencies = [
"sc-client-db",
"sc-network",
"sc-network-common",
- "sc-peerset",
"sc-transaction-pool",
"sc-transaction-pool-api",
"sc-utils",
"sp-api",
"sp-consensus",
"sp-core",
+ "sp-externalities",
+ "sp-keystore",
"sp-offchain",
"sp-runtime",
"sp-tracing",
@@ -9692,19 +10071,6 @@ dependencies = [
"tracing",
]
-[[package]]
-name = "sc-peerset"
-version = "4.0.0-dev"
-dependencies = [
- "futures",
- "libp2p-identity",
- "log",
- "rand 0.8.5",
- "sc-utils",
- "serde_json",
- "wasm-timer",
-]
-
[[package]]
name = "sc-proposer-metrics"
version = "0.10.0-dev"
@@ -9724,6 +10090,7 @@ dependencies = [
"log",
"parity-scale-codec",
"parking_lot 0.12.1",
+ "pretty_assertions",
"sc-block-builder",
"sc-chain-spec",
"sc-client-api",
@@ -9787,7 +10154,7 @@ dependencies = [
name = "sc-rpc-spec-v2"
version = "0.10.0-dev"
dependencies = [
- "array-bytes 4.2.0",
+ "array-bytes",
"assert_matches",
"futures",
"futures-util",
@@ -9796,6 +10163,7 @@ dependencies = [
"log",
"parity-scale-codec",
"parking_lot 0.12.1",
+ "pretty_assertions",
"sc-block-builder",
"sc-chain-spec",
"sc-client-api",
@@ -9859,11 +10227,9 @@ dependencies = [
"sc-network-light",
"sc-network-sync",
"sc-network-transactions",
- "sc-offchain",
"sc-rpc",
"sc-rpc-server",
"sc-rpc-spec-v2",
- "sc-storage-monitor",
"sc-sysinfo",
"sc-telemetry",
"sc-tracing",
@@ -9901,7 +10267,7 @@ dependencies = [
name = "sc-service-test"
version = "2.0.0"
dependencies = [
- "array-bytes 4.2.0",
+ "array-bytes",
"async-channel",
"fdlimit",
"futures",
@@ -9914,7 +10280,6 @@ dependencies = [
"sc-consensus",
"sc-executor",
"sc-network",
- "sc-network-common",
"sc-network-sync",
"sc-service",
"sc-transaction-pool-api",
@@ -9948,21 +10313,17 @@ dependencies = [
name = "sc-statement-store"
version = "4.0.0-dev"
dependencies = [
- "async-trait",
"env_logger 0.9.3",
- "futures",
- "futures-timer",
"log",
"parity-db",
- "parity-scale-codec",
"parking_lot 0.12.1",
"sc-client-api",
+ "sc-keystore",
"sp-api",
"sp-blockchain",
"sp-core",
"sp-runtime",
"sp-statement-store",
- "sp-tracing",
"substrate-prometheus-endpoint",
"tempfile",
"tokio",
@@ -9972,12 +10333,10 @@ dependencies = [
name = "sc-storage-monitor"
version = "0.1.0"
dependencies = [
- "clap 4.2.7",
+ "clap 4.3.2",
"fs4",
- "futures",
"log",
"sc-client-db",
- "sc-utils",
"sp-core",
"thiserror",
"tokio",
@@ -10049,12 +10408,10 @@ dependencies = [
"lazy_static",
"libc",
"log",
- "once_cell",
"parking_lot 0.12.1",
"regex",
"rustc-hash",
"sc-client-api",
- "sc-rpc-server",
"sc-tracing-proc-macro",
"serde",
"sp-api",
@@ -10066,7 +10423,7 @@ dependencies = [
"thiserror",
"tracing",
"tracing-log",
- "tracing-subscriber 0.2.25",
+ "tracing-subscriber",
]
[[package]]
@@ -10076,14 +10433,14 @@ dependencies = [
"proc-macro-crate",
"proc-macro2",
"quote",
- "syn 2.0.15",
+ "syn 2.0.18",
]
[[package]]
name = "sc-transaction-pool"
version = "4.0.0-dev"
dependencies = [
- "array-bytes 4.2.0",
+ "array-bytes",
"assert_matches",
"async-trait",
"criterion",
@@ -10091,7 +10448,6 @@ dependencies = [
"futures-timer",
"linked-hash-map",
"log",
- "num-traits",
"parity-scale-codec",
"parking_lot 0.12.1",
"sc-block-builder",
@@ -10120,9 +10476,11 @@ dependencies = [
"async-trait",
"futures",
"log",
+ "parity-scale-codec",
"serde",
"serde_json",
"sp-blockchain",
+ "sp-core",
"sp-runtime",
"thiserror",
]
@@ -10144,9 +10502,9 @@ dependencies = [
[[package]]
name = "scale-info"
-version = "2.6.0"
+version = "2.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dfdef77228a4c05dc94211441595746732131ad7f6530c6c18f045da7b7ab937"
+checksum = "b569c32c806ec3abdf3b5869fb8bf1e0d275a7c1c9b0b05603d9464632649edf"
dependencies = [
"bitvec",
"cfg-if",
@@ -10170,11 +10528,11 @@ dependencies = [
[[package]]
name = "schannel"
-version = "0.1.21"
+version = "0.1.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "713cfb06c7059f3588fb8044c0fad1d09e3c01d225e25b9220dbfdcf16dbb1b3"
+checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88"
dependencies = [
- "windows-sys 0.42.0",
+ "windows-sys 0.48.0",
]
[[package]]
@@ -10198,7 +10556,7 @@ dependencies = [
"arrayvec 0.5.2",
"curve25519-dalek 2.1.3",
"getrandom 0.1.16",
- "merlin",
+ "merlin 2.0.1",
"rand 0.7.3",
"rand_core 0.5.1",
"sha2 0.8.2",
@@ -10224,7 +10582,7 @@ version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce"
dependencies = [
- "ring",
+ "ring 0.16.20",
"untrusted",
]
@@ -10234,7 +10592,7 @@ version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4"
dependencies = [
- "ring",
+ "ring 0.16.20",
"untrusted",
]
@@ -10271,7 +10629,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f0aec48e813d6b90b15f0b8948af3c63483992dee44c03e9930b3eebdabe046e"
dependencies = [
"base16ct 0.2.0",
- "der 0.7.5",
+ "der 0.7.6",
"generic-array 0.14.7",
"pkcs8 0.10.2",
"subtle",
@@ -10307,9 +10665,9 @@ dependencies = [
[[package]]
name = "security-framework"
-version = "2.8.2"
+version = "2.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a332be01508d814fed64bf28f798a146d73792121129962fdf335bb3c49a4254"
+checksum = "1fc758eb7bffce5b308734e9b0c1468893cae9ff70ebf13e7090be8dcbcc83a8"
dependencies = [
"bitflags",
"core-foundation",
@@ -10320,9 +10678,9 @@ dependencies = [
[[package]]
name = "security-framework-sys"
-version = "2.8.0"
+version = "2.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "31c9bb296072e961fcbd8853511dd39c2d8be2deb1e17c6860b1d30732b323b4"
+checksum = "f51d0c0d83bec45f16480d0ce0058397a69e48fcdc52d1dc8855fb68acbd31a7"
dependencies = [
"core-foundation-sys",
"libc",
@@ -10363,22 +10721,22 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
[[package]]
name = "serde"
-version = "1.0.162"
+version = "1.0.164"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "71b2f6e1ab5c2b98c05f0f35b236b22e8df7ead6ffbf51d7808da7f8817e7ab6"
+checksum = "9e8c8cf938e98f769bc164923b06dce91cea1751522f46f8466461af04c9027d"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
-version = "1.0.162"
+version = "1.0.164"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a2a0814352fd64b58489904a44ea8d90cb1a91dcb6b4f5ebabc32c8318e93cb6"
+checksum = "d9735b638ccc51c28bf6914d90a2e9725b377144fc612c49a611fddd1b631d68"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.15",
+ "syn 2.0.18",
]
[[package]]
@@ -10394,9 +10752,9 @@ dependencies = [
[[package]]
name = "serde_spanned"
-version = "0.6.1"
+version = "0.6.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0efd8caf556a6cebd3b285caf480045fcc1ac04f6bd786b09a6f11af30c4fcf4"
+checksum = "93107647184f6027e3b7dcb2e11034cf95ffa1e3a682c67951963ac69c1c007d"
dependencies = [
"serde",
]
@@ -10422,7 +10780,7 @@ checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3"
dependencies = [
"cfg-if",
"cpufeatures",
- "digest 0.10.6",
+ "digest 0.10.7",
]
[[package]]
@@ -10452,13 +10810,13 @@ dependencies = [
[[package]]
name = "sha2"
-version = "0.10.6"
+version = "0.10.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0"
+checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8"
dependencies = [
"cfg-if",
"cpufeatures",
- "digest 0.10.6",
+ "digest 0.10.7",
]
[[package]]
@@ -10467,7 +10825,7 @@ version = "0.10.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60"
dependencies = [
- "digest 0.10.6",
+ "digest 0.10.7",
"keccak",
]
@@ -10501,7 +10859,7 @@ version = "1.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c"
dependencies = [
- "digest 0.10.6",
+ "digest 0.10.7",
"rand_core 0.6.4",
]
@@ -10511,7 +10869,7 @@ version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5e1788eed21689f9cf370582dfc467ef36ed9c707f073528ddafa8d83e3b8500"
dependencies = [
- "digest 0.10.6",
+ "digest 0.10.7",
"rand_core 0.6.4",
]
@@ -10551,9 +10909,9 @@ checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7"
[[package]]
name = "smallvec"
-version = "1.10.0"
+version = "1.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0"
+checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9"
[[package]]
name = "snap"
@@ -10572,9 +10930,9 @@ dependencies = [
"chacha20poly1305",
"curve25519-dalek 4.0.0-rc.1",
"rand_core 0.6.4",
- "ring",
+ "ring 0.16.20",
"rustc_version 0.4.0",
- "sha2 0.10.6",
+ "sha2 0.10.7",
"subtle",
]
@@ -10615,6 +10973,7 @@ dependencies = [
"scale-info",
"sp-api-proc-macro",
"sp-core",
+ "sp-externalities",
"sp-metadata-ir",
"sp-runtime",
"sp-state-machine",
@@ -10636,7 +10995,7 @@ dependencies = [
"proc-macro-crate",
"proc-macro2",
"quote",
- "syn 2.0.15",
+ "syn 2.0.18",
]
[[package]]
@@ -10649,6 +11008,7 @@ dependencies = [
"parity-scale-codec",
"rustversion",
"sc-block-builder",
+ "scale-info",
"sp-api",
"sp-consensus",
"sp-core",
@@ -10656,62 +11016,154 @@ dependencies = [
"sp-state-machine",
"sp-tracing",
"sp-version",
+ "static_assertions",
"substrate-test-runtime-client",
"trybuild",
]
[[package]]
name = "sp-application-crypto"
-version = "7.0.0"
+version = "23.0.0"
+dependencies = [
+ "parity-scale-codec",
+ "scale-info",
+ "serde",
+ "sp-core",
+ "sp-io",
+ "sp-std",
+]
+
+[[package]]
+name = "sp-application-crypto-test"
+version = "2.0.0"
+dependencies = [
+ "sp-api",
+ "sp-application-crypto",
+ "sp-core",
+ "sp-keystore",
+ "substrate-test-runtime-client",
+]
+
+[[package]]
+name = "sp-arithmetic"
+version = "16.0.0"
+dependencies = [
+ "criterion",
+ "integer-sqrt",
+ "num-traits",
+ "parity-scale-codec",
+ "primitive-types",
+ "rand 0.8.5",
+ "scale-info",
+ "serde",
+ "sp-core",
+ "sp-std",
+ "static_assertions",
+]
+
+[[package]]
+name = "sp-arithmetic-fuzzer"
+version = "2.0.0"
+dependencies = [
+ "arbitrary",
+ "fraction",
+ "honggfuzz",
+ "num-bigint",
+ "sp-arithmetic",
+]
+
+[[package]]
+name = "sp-ark-bls12-377"
+version = "0.4.0-beta"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1b8e61a06f286f4e8565a67865ef52e83edabf447881898c94527ffc7b839177"
+dependencies = [
+ "ark-bls12-377",
+ "ark-ff",
+ "ark-r1cs-std",
+ "ark-scale",
+ "ark-std",
+ "parity-scale-codec",
+ "sp-ark-models",
+]
+
+[[package]]
+name = "sp-ark-bls12-381"
+version = "0.4.0-beta"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3352feef6c9c34022fa766a0c9a86a88a83d280a3e5b34781a1a9af98377a130"
+dependencies = [
+ "ark-bls12-381",
+ "ark-ff",
+ "ark-scale",
+ "ark-serialize",
+ "ark-std",
+ "parity-scale-codec",
+ "sp-ark-models",
+]
+
+[[package]]
+name = "sp-ark-bw6-761"
+version = "0.4.0-beta"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2bf069165e230aef3c4680edea2d8ab3caa89c039e0b61fad2b8e061fb393668"
dependencies = [
+ "ark-bw6-761",
+ "ark-ff",
+ "ark-scale",
+ "ark-std",
"parity-scale-codec",
- "scale-info",
- "serde",
- "sp-core",
- "sp-io",
- "sp-std",
+ "sp-ark-models",
]
[[package]]
-name = "sp-application-crypto-test"
-version = "2.0.0"
+name = "sp-ark-ed-on-bls12-377"
+version = "0.4.0-beta"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e63f1fe8e7e87cb0258d61212b019d4d0fd230293ec42a564eb671c83d437497"
dependencies = [
- "sp-api",
- "sp-application-crypto",
- "sp-core",
- "sp-keystore",
- "sp-runtime",
- "substrate-test-runtime-client",
+ "ark-ed-on-bls12-377",
+ "ark-ff",
+ "ark-r1cs-std",
+ "ark-scale",
+ "ark-serialize",
+ "ark-std",
+ "parity-scale-codec",
+ "sp-ark-models",
]
[[package]]
-name = "sp-arithmetic"
-version = "6.0.0"
+name = "sp-ark-ed-on-bls12-381-bandersnatch"
+version = "0.4.0-beta"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "838ddc5508aff3e89f930e7e7f3565d0786ac27868cfd61587afe681011e1140"
dependencies = [
- "criterion",
- "integer-sqrt",
- "num-traits",
+ "ark-ec",
+ "ark-ed-on-bls12-381-bandersnatch",
+ "ark-ff",
+ "ark-r1cs-std",
+ "ark-scale",
+ "ark-std",
"parity-scale-codec",
- "primitive-types",
- "rand 0.8.5",
- "scale-info",
- "serde",
- "sp-core",
- "sp-std",
- "static_assertions",
+ "sp-ark-bls12-381",
+ "sp-ark-models",
]
[[package]]
-name = "sp-arithmetic-fuzzer"
-version = "2.0.0"
+name = "sp-ark-models"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "28fa906b809d7a346b2aa32a4bd0c884a75f9f588f9a4a07272f63eaf8a10765"
dependencies = [
- "arbitrary",
- "fraction",
- "honggfuzz",
- "num-bigint",
+ "ark-ec",
+ "ark-ff",
+ "ark-serialize",
+ "ark-std",
+ "derivative",
+ "getrandom 0.2.9",
+ "itertools",
"num-traits",
- "primitive-types",
- "sp-arithmetic",
+ "zeroize",
]
[[package]]
@@ -10730,7 +11182,6 @@ dependencies = [
name = "sp-block-builder"
version = "4.0.0-dev"
dependencies = [
- "parity-scale-codec",
"sp-api",
"sp-inherents",
"sp-runtime",
@@ -10743,9 +11194,9 @@ version = "4.0.0-dev"
dependencies = [
"futures",
"log",
- "lru 0.8.1",
"parity-scale-codec",
"parking_lot 0.12.1",
+ "schnellru",
"sp-api",
"sp-consensus",
"sp-database",
@@ -10778,7 +11229,6 @@ dependencies = [
"scale-info",
"sp-api",
"sp-application-crypto",
- "sp-consensus",
"sp-consensus-slots",
"sp-inherents",
"sp-runtime",
@@ -10796,11 +11246,9 @@ dependencies = [
"serde",
"sp-api",
"sp-application-crypto",
- "sp-consensus",
"sp-consensus-slots",
"sp-core",
"sp-inherents",
- "sp-keystore",
"sp-runtime",
"sp-std",
"sp-timestamp",
@@ -10810,7 +11258,7 @@ dependencies = [
name = "sp-consensus-beefy"
version = "4.0.0-dev"
dependencies = [
- "array-bytes 4.2.0",
+ "array-bytes",
"lazy_static",
"parity-scale-codec",
"scale-info",
@@ -10819,11 +11267,11 @@ dependencies = [
"sp-application-crypto",
"sp-core",
"sp-io",
- "sp-keystore",
"sp-mmr-primitives",
"sp-runtime",
"sp-std",
"strum",
+ "w3f-bls",
]
[[package]]
@@ -10867,9 +11315,11 @@ dependencies = [
[[package]]
name = "sp-core"
-version = "7.0.0"
+version = "21.0.0"
dependencies = [
- "array-bytes 4.2.0",
+ "array-bytes",
+ "arrayvec 0.7.2",
+ "bandersnatch_vrfs",
"bitflags",
"blake2",
"bounded-collections",
@@ -10880,12 +11330,11 @@ dependencies = [
"futures",
"hash-db",
"hash256-std-hasher",
- "hex-literal",
"impl-serde",
"lazy_static",
"libsecp256k1",
"log",
- "merlin",
+ "merlin 2.0.1",
"parity-scale-codec",
"parking_lot 0.12.1",
"paste",
@@ -10909,31 +11358,57 @@ dependencies = [
"substrate-bip39",
"thiserror",
"tiny-bip39",
+ "tracing",
"w3f-bls",
"zeroize",
]
[[package]]
name = "sp-core-hashing"
-version = "5.0.0"
+version = "9.0.0"
dependencies = [
"blake2b_simd",
"byteorder",
- "digest 0.10.6",
- "sha2 0.10.6",
+ "digest 0.10.7",
+ "sha2 0.10.7",
"sha3",
- "sp-std",
"twox-hash",
]
[[package]]
name = "sp-core-hashing-proc-macro"
-version = "5.0.0"
+version = "9.0.0"
dependencies = [
- "proc-macro2",
"quote",
"sp-core-hashing",
- "syn 2.0.15",
+ "syn 2.0.18",
+]
+
+[[package]]
+name = "sp-crypto-ec-utils"
+version = "0.4.0"
+dependencies = [
+ "ark-algebra-test-templates",
+ "ark-bls12-377",
+ "ark-bls12-381",
+ "ark-bw6-761",
+ "ark-ec",
+ "ark-ed-on-bls12-377",
+ "ark-ed-on-bls12-381-bandersnatch",
+ "ark-ff",
+ "ark-scale",
+ "ark-serialize",
+ "ark-std",
+ "parity-scale-codec",
+ "sp-ark-bls12-377",
+ "sp-ark-bls12-381",
+ "sp-ark-bw6-761",
+ "sp-ark-ed-on-bls12-377",
+ "sp-ark-ed-on-bls12-381-bandersnatch",
+ "sp-ark-models",
+ "sp-io",
+ "sp-runtime-interface",
+ "sp-std",
]
[[package]]
@@ -10946,16 +11421,16 @@ dependencies = [
[[package]]
name = "sp-debug-derive"
-version = "5.0.0"
+version = "8.0.0"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.15",
+ "syn 2.0.18",
]
[[package]]
name = "sp-externalities"
-version = "0.13.0"
+version = "0.19.0"
dependencies = [
"environmental",
"parity-scale-codec",
@@ -10963,6 +11438,16 @@ dependencies = [
"sp-storage",
]
+[[package]]
+name = "sp-genesis-builder"
+version = "0.1.0"
+dependencies = [
+ "serde_json",
+ "sp-api",
+ "sp-runtime",
+ "sp-std",
+]
+
[[package]]
name = "sp-inherents"
version = "4.0.0-dev"
@@ -10972,7 +11457,6 @@ dependencies = [
"impl-trait-for-tuples",
"parity-scale-codec",
"scale-info",
- "sp-core",
"sp-runtime",
"sp-std",
"thiserror",
@@ -10980,12 +11464,11 @@ dependencies = [
[[package]]
name = "sp-io"
-version = "7.0.0"
+version = "23.0.0"
dependencies = [
"bytes",
"ed25519",
"ed25519-dalek",
- "futures",
"libsecp256k1",
"log",
"parity-scale-codec",
@@ -11005,7 +11488,7 @@ dependencies = [
[[package]]
name = "sp-keyring"
-version = "7.0.0"
+version = "24.0.0"
dependencies = [
"lazy_static",
"sp-core",
@@ -11015,14 +11498,12 @@ dependencies = [
[[package]]
name = "sp-keystore"
-version = "0.13.0"
+version = "0.27.0"
dependencies = [
- "futures",
"parity-scale-codec",
"parking_lot 0.12.1",
"rand 0.7.3",
"rand_chacha 0.2.2",
- "serde",
"sp-core",
"sp-externalities",
"thiserror",
@@ -11050,7 +11531,7 @@ dependencies = [
name = "sp-mmr-primitives"
version = "4.0.0-dev"
dependencies = [
- "array-bytes 4.2.0",
+ "array-bytes",
"ckb-merkle-mountain-range",
"log",
"parity-scale-codec",
@@ -11083,11 +11564,9 @@ dependencies = [
name = "sp-npos-elections-fuzzer"
version = "2.0.0-alpha.5"
dependencies = [
- "clap 4.2.7",
+ "clap 4.3.2",
"honggfuzz",
- "parity-scale-codec",
"rand 0.8.5",
- "scale-info",
"sp-npos-elections",
"sp-runtime",
]
@@ -11103,7 +11582,7 @@ dependencies = [
[[package]]
name = "sp-panic-handler"
-version = "5.0.0"
+version = "8.0.0"
dependencies = [
"backtrace",
"lazy_static",
@@ -11122,7 +11601,7 @@ dependencies = [
[[package]]
name = "sp-runtime"
-version = "7.0.0"
+version = "24.0.0"
dependencies = [
"either",
"hash256-std-hasher",
@@ -11149,7 +11628,7 @@ dependencies = [
[[package]]
name = "sp-runtime-interface"
-version = "7.0.0"
+version = "17.0.0"
dependencies = [
"bytes",
"impl-trait-for-tuples",
@@ -11172,13 +11651,13 @@ dependencies = [
[[package]]
name = "sp-runtime-interface-proc-macro"
-version = "6.0.0"
+version = "11.0.0"
dependencies = [
"Inflector",
"proc-macro-crate",
"proc-macro2",
"quote",
- "syn 2.0.15",
+ "syn 2.0.18",
]
[[package]]
@@ -11216,7 +11695,6 @@ dependencies = [
"sp-core",
"sp-io",
"sp-runtime-interface",
- "sp-std",
"substrate-wasm-builder",
]
@@ -11228,6 +11706,7 @@ dependencies = [
"scale-info",
"sp-api",
"sp-core",
+ "sp-keystore",
"sp-runtime",
"sp-staking",
"sp-std",
@@ -11237,6 +11716,7 @@ dependencies = [
name = "sp-staking"
version = "4.0.0-dev"
dependencies = [
+ "impl-trait-for-tuples",
"parity-scale-codec",
"scale-info",
"serde",
@@ -11247,9 +11727,9 @@ dependencies = [
[[package]]
name = "sp-state-machine"
-version = "0.13.0"
+version = "0.28.0"
dependencies = [
- "array-bytes 4.2.0",
+ "array-bytes",
"assert_matches",
"hash-db",
"log",
@@ -11273,9 +11753,14 @@ dependencies = [
name = "sp-statement-store"
version = "4.0.0-dev"
dependencies = [
- "log",
+ "aes-gcm 0.10.2",
+ "curve25519-dalek 3.2.0",
+ "ed25519-dalek",
+ "hkdf",
"parity-scale-codec",
+ "rand 0.8.5",
"scale-info",
+ "sha2 0.10.7",
"sp-api",
"sp-application-crypto",
"sp-core",
@@ -11284,15 +11769,16 @@ dependencies = [
"sp-runtime-interface",
"sp-std",
"thiserror",
+ "x25519-dalek 2.0.0-pre.1",
]
[[package]]
name = "sp-std"
-version = "5.0.0"
+version = "8.0.0"
[[package]]
name = "sp-storage"
-version = "7.0.0"
+version = "13.0.0"
dependencies = [
"impl-serde",
"parity-scale-codec",
@@ -11320,8 +11806,6 @@ name = "sp-timestamp"
version = "4.0.0-dev"
dependencies = [
"async-trait",
- "futures-timer",
- "log",
"parity-scale-codec",
"sp-inherents",
"sp-runtime",
@@ -11331,13 +11815,13 @@ dependencies = [
[[package]]
name = "sp-tracing"
-version = "6.0.0"
+version = "10.0.0"
dependencies = [
"parity-scale-codec",
"sp-std",
"tracing",
"tracing-core",
- "tracing-subscriber 0.2.25",
+ "tracing-subscriber",
]
[[package]]
@@ -11353,7 +11837,6 @@ name = "sp-transaction-storage-proof"
version = "4.0.0-dev"
dependencies = [
"async-trait",
- "log",
"parity-scale-codec",
"scale-info",
"sp-core",
@@ -11365,10 +11848,10 @@ dependencies = [
[[package]]
name = "sp-trie"
-version = "7.0.0"
+version = "22.0.0"
dependencies = [
"ahash 0.8.3",
- "array-bytes 4.2.0",
+ "array-bytes",
"criterion",
"hash-db",
"hashbrown 0.13.2",
@@ -11392,7 +11875,7 @@ dependencies = [
[[package]]
name = "sp-version"
-version = "5.0.0"
+version = "22.0.0"
dependencies = [
"impl-serde",
"parity-scale-codec",
@@ -11408,31 +11891,30 @@ dependencies = [
[[package]]
name = "sp-version-proc-macro"
-version = "4.0.0-dev"
+version = "8.0.0"
dependencies = [
"parity-scale-codec",
"proc-macro2",
"quote",
"sp-version",
- "syn 2.0.15",
+ "syn 2.0.18",
]
[[package]]
name = "sp-wasm-interface"
-version = "7.0.0"
+version = "14.0.0"
dependencies = [
"anyhow",
"impl-trait-for-tuples",
"log",
"parity-scale-codec",
"sp-std",
- "wasmi 0.13.2",
"wasmtime",
]
[[package]]
name = "sp-weights"
-version = "4.0.0"
+version = "20.0.0"
dependencies = [
"parity-scale-codec",
"scale-info",
@@ -11484,7 +11966,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a"
dependencies = [
"base64ct",
- "der 0.7.5",
+ "der 0.7.6",
]
[[package]]
@@ -11581,7 +12063,7 @@ dependencies = [
"lazy_static",
"md-5",
"rand 0.8.5",
- "ring",
+ "ring 0.16.20",
"subtle",
"thiserror",
"tokio",
@@ -11593,8 +12075,28 @@ dependencies = [
name = "subkey"
version = "3.0.0"
dependencies = [
- "clap 4.2.7",
+ "clap 4.3.2",
+ "sc-cli",
+]
+
+[[package]]
+name = "substrate"
+version = "0.0.0"
+dependencies = [
+ "aquamarine",
+ "chain-spec-builder",
+ "frame-support",
+ "node-cli",
"sc-cli",
+ "sc-consensus-aura",
+ "sc-consensus-babe",
+ "sc-consensus-beefy",
+ "sc-consensus-grandpa",
+ "sc-consensus-manual-seal",
+ "sc-consensus-pow",
+ "sc-service",
+ "sp-runtime",
+ "subkey",
]
[[package]]
@@ -11613,9 +12115,6 @@ dependencies = [
[[package]]
name = "substrate-build-script-utils"
version = "3.0.0"
-dependencies = [
- "platforms 2.0.0",
-]
[[package]]
name = "substrate-cli-test-utils"
@@ -11624,10 +12123,13 @@ dependencies = [
"assert_cmd",
"futures",
"nix 0.26.2",
+ "node-cli",
"node-primitives",
"regex",
+ "sc-cli",
+ "sc-service",
+ "sp-rpc",
"substrate-rpc-client",
- "tempfile",
"tokio",
]
@@ -11635,7 +12137,7 @@ dependencies = [
name = "substrate-frame-cli"
version = "4.0.0-dev"
dependencies = [
- "clap 4.2.7",
+ "clap 4.3.2",
"frame-support",
"frame-system",
"sc-cli",
@@ -11713,11 +12215,9 @@ name = "substrate-state-trie-migration-rpc"
version = "4.0.0-dev"
dependencies = [
"jsonrpsee",
- "log",
"parity-scale-codec",
"sc-client-api",
"sc-rpc-api",
- "scale-info",
"serde",
"serde_json",
"sp-core",
@@ -11731,7 +12231,7 @@ dependencies = [
name = "substrate-test-client"
version = "2.0.1"
dependencies = [
- "array-bytes 4.2.0",
+ "array-bytes",
"async-trait",
"futures",
"parity-scale-codec",
@@ -11756,43 +12256,40 @@ dependencies = [
name = "substrate-test-runtime"
version = "2.0.0"
dependencies = [
- "array-bytes 6.1.0",
+ "array-bytes",
"frame-executive",
"frame-support",
"frame-system",
"frame-system-rpc-runtime-api",
"futures",
+ "json-patch",
"log",
- "memory-db",
"pallet-babe",
"pallet-balances",
- "pallet-beefy-mmr",
- "pallet-root-testing",
- "pallet-sudo",
"pallet-timestamp",
"parity-scale-codec",
"sc-block-builder",
"sc-executor",
+ "sc-executor-common",
"sc-service",
"scale-info",
"serde",
+ "serde_json",
"sp-api",
"sp-application-crypto",
"sp-block-builder",
"sp-consensus",
"sp-consensus-aura",
"sp-consensus-babe",
- "sp-consensus-beefy",
"sp-consensus-grandpa",
"sp-core",
- "sp-debug-derive",
"sp-externalities",
+ "sp-genesis-builder",
"sp-inherents",
"sp-io",
"sp-keyring",
"sp-offchain",
"sp-runtime",
- "sp-runtime-interface",
"sp-session",
"sp-state-machine",
"sp-std",
@@ -11810,9 +12307,7 @@ name = "substrate-test-runtime-client"
version = "2.0.0"
dependencies = [
"futures",
- "parity-scale-codec",
"sc-block-builder",
- "sc-chain-spec",
"sc-client-api",
"sc-consensus",
"sp-api",
@@ -11857,7 +12352,7 @@ dependencies = [
"proc-macro-crate",
"proc-macro2",
"quote",
- "syn 2.0.15",
+ "syn 2.0.18",
]
[[package]]
@@ -11877,10 +12372,11 @@ dependencies = [
"build-helper",
"cargo_metadata",
"filetime",
+ "parity-wasm",
"sp-maybe-compressed-blob",
"strum",
"tempfile",
- "toml 0.7.3",
+ "toml 0.7.4",
"walkdir",
"wasm-opt",
]
@@ -11913,9 +12409,9 @@ dependencies = [
[[package]]
name = "syn"
-version = "2.0.15"
+version = "2.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a34fcf3e8b60f57e6a14301a2e916d323af98b0ea63c599441eec8558660c822"
+checksum = "32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e"
dependencies = [
"proc-macro2",
"quote",
@@ -11936,9 +12432,9 @@ dependencies = [
[[package]]
name = "system-configuration"
-version = "0.5.0"
+version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d75182f12f490e953596550b65ee31bda7c8e043d9386174b353bda50838c3fd"
+checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7"
dependencies = [
"bitflags",
"core-foundation",
@@ -11980,15 +12476,16 @@ checksum = "fd1ba337640d60c3e96bc6f0638a939b9c9a7f2c316a1598c279828b3d1dc8c5"
[[package]]
name = "tempfile"
-version = "3.5.0"
+version = "3.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b9fbec84f381d5795b08656e4912bec604d162bff9291d6189a78f4c8ab87998"
+checksum = "31c0432476357e58790aaa47a8efb0c5138f137343f3b5f23bd36a27e3b0a6d6"
dependencies = [
+ "autocfg",
"cfg-if",
"fastrand",
"redox_syscall 0.3.5",
"rustix 0.37.19",
- "windows-sys 0.45.0",
+ "windows-sys 0.48.0",
]
[[package]]
@@ -12029,7 +12526,7 @@ checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.15",
+ "syn 2.0.18",
]
[[package]]
@@ -12117,7 +12614,7 @@ dependencies = [
"pbkdf2 0.11.0",
"rand 0.8.5",
"rustc-hash",
- "sha2 0.10.6",
+ "sha2 0.10.7",
"thiserror",
"unicode-normalization",
"wasm-bindgen",
@@ -12160,9 +12657,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
[[package]]
name = "tokio"
-version = "1.28.0"
+version = "1.28.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c3c786bf8134e5a3a166db9b29ab8f48134739014a3eca7bc6bfa95d673b136f"
+checksum = "94d7b1cfd2aa4011f2de74c2c4c63665e27a71006b0a192dcd2710272e73dfa2"
dependencies = [
"autocfg",
"bytes",
@@ -12185,7 +12682,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.15",
+ "syn 2.0.18",
]
[[package]]
@@ -12210,6 +12707,16 @@ dependencies = [
"webpki 0.22.0",
]
+[[package]]
+name = "tokio-rustls"
+version = "0.24.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e0d409377ff5b1e3ca6437aa86c1eb7d40c134bfec254e44c830defa92669db5"
+dependencies = [
+ "rustls 0.21.1",
+ "tokio",
+]
+
[[package]]
name = "tokio-stream"
version = "0.1.14"
@@ -12261,9 +12768,9 @@ dependencies = [
[[package]]
name = "toml"
-version = "0.7.3"
+version = "0.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b403acf6f2bb0859c93c7f0d967cb4a75a7ac552100f9322faf64dc047669b21"
+checksum = "d6135d499e69981f9ff0ef2167955a5333c35e36f6937d382974566b3d5b94ec"
dependencies = [
"serde",
"serde_spanned",
@@ -12273,18 +12780,18 @@ dependencies = [
[[package]]
name = "toml_datetime"
-version = "0.6.1"
+version = "0.6.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3ab8ed2edee10b50132aed5f331333428b011c99402b5a534154ed15746f9622"
+checksum = "5a76a9312f5ba4c2dec6b9161fdf25d87ad8a09256ccea5a556fef03c706a10f"
dependencies = [
"serde",
]
[[package]]
name = "toml_edit"
-version = "0.19.8"
+version = "0.19.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "239410c8609e8125456927e6707163a3b1fdb40561e4b803bc041f466ccfdc13"
+checksum = "2380d56e8670370eee6566b0bfd4265f65b3f432e8c6d85623f728d4fa31f739"
dependencies = [
"indexmap",
"serde",
@@ -12355,14 +12862,14 @@ checksum = "0f57e3ca2a01450b1a921183a9c9cbfda207fd822cef4ccb00a65402cbba7a74"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.15",
+ "syn 2.0.18",
]
[[package]]
name = "tracing-core"
-version = "0.1.30"
+version = "0.1.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a"
+checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a"
dependencies = [
"once_cell",
"valuable",
@@ -12408,7 +12915,7 @@ dependencies = [
"ansi_term",
"chrono",
"lazy_static",
- "matchers 0.0.1",
+ "matchers",
"parking_lot 0.11.2",
"regex",
"serde",
@@ -12422,24 +12929,6 @@ dependencies = [
"tracing-serde",
]
-[[package]]
-name = "tracing-subscriber"
-version = "0.3.17"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "30a651bc37f915e81f087d86e62a18eec5f79550c7faff886f7090b4ea757c77"
-dependencies = [
- "matchers 0.1.0",
- "nu-ansi-term",
- "once_cell",
- "regex",
- "sharded-slab",
- "smallvec",
- "thread_local",
- "tracing",
- "tracing-core",
- "tracing-log",
-]
-
[[package]]
name = "trie-bench"
version = "0.37.0"
@@ -12546,16 +13035,16 @@ version = "0.10.0-dev"
dependencies = [
"assert_cmd",
"async-trait",
- "clap 4.2.7",
+ "clap 4.3.2",
"frame-remote-externalities",
"frame-try-runtime",
"hex",
"log",
+ "node-primitives",
"parity-scale-codec",
"regex",
"sc-cli",
"sc-executor",
- "sc-service",
"serde",
"serde_json",
"sp-api",
@@ -12576,6 +13065,7 @@ dependencies = [
"sp-weights",
"substrate-cli-test-utils",
"substrate-rpc-client",
+ "tempfile",
"tokio",
"zstd 0.12.3+zstd.1.5.2",
]
@@ -12614,7 +13104,7 @@ dependencies = [
"log",
"md-5",
"rand 0.8.5",
- "ring",
+ "ring 0.16.20",
"stun",
"thiserror",
"tokio",
@@ -12628,7 +13118,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675"
dependencies = [
"cfg-if",
- "digest 0.10.6",
+ "digest 0.10.7",
"rand 0.8.5",
"static_assertions",
]
@@ -12665,9 +13155,9 @@ checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460"
[[package]]
name = "unicode-ident"
-version = "1.0.8"
+version = "1.0.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4"
+checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0"
[[package]]
name = "unicode-normalization"
@@ -12702,9 +13192,9 @@ dependencies = [
[[package]]
name = "universal-hash"
-version = "0.5.0"
+version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7d3160b73c9a19f7e2939a2fdad446c57c1bbbbf4d919d3213ff1267a580d8b5"
+checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea"
dependencies = [
"crypto-common",
"subtle",
@@ -12730,12 +13220,12 @@ checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a"
[[package]]
name = "url"
-version = "2.3.1"
+version = "2.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643"
+checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb"
dependencies = [
"form_urlencoded",
- "idna 0.3.0",
+ "idna 0.4.0",
"percent-encoding",
]
@@ -12747,9 +13237,9 @@ checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a"
[[package]]
name = "uuid"
-version = "1.3.2"
+version = "1.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4dad5567ad0cf5b760e5665964bec1b47dfd077ba8a2544b513f3556d3d239a2"
+checksum = "345444e32442451b267fc254ae85a209c64be56d2890e601a0c37ff0c3c5ecd2"
dependencies = [
"getrandom 0.2.9",
]
@@ -12792,11 +13282,11 @@ dependencies = [
"ark-serialize-derive",
"arrayref",
"constcat",
- "digest 0.10.6",
+ "digest 0.10.7",
"rand 0.8.5",
"rand_chacha 0.3.1",
"rand_core 0.6.4",
- "sha2 0.10.6",
+ "sha2 0.10.7",
"sha3",
"thiserror",
"zeroize",
@@ -12866,9 +13356,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
[[package]]
name = "wasm-bindgen"
-version = "0.2.85"
+version = "0.2.86"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5b6cb788c4e39112fbe1822277ef6fb3c55cd86b95cb3d3c4c1c9597e4ac74b4"
+checksum = "5bba0e8cb82ba49ff4e229459ff22a191bbe9a1cb3a341610c9c33efc27ddf73"
dependencies = [
"cfg-if",
"wasm-bindgen-macro",
@@ -12876,24 +13366,24 @@ dependencies = [
[[package]]
name = "wasm-bindgen-backend"
-version = "0.2.85"
+version = "0.2.86"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "35e522ed4105a9d626d885b35d62501b30d9666283a5c8be12c14a8bdafe7822"
+checksum = "19b04bc93f9d6bdee709f6bd2118f57dd6679cf1176a1af464fca3ab0d66d8fb"
dependencies = [
"bumpalo",
"log",
"once_cell",
"proc-macro2",
"quote",
- "syn 2.0.15",
+ "syn 2.0.18",
"wasm-bindgen-shared",
]
[[package]]
name = "wasm-bindgen-futures"
-version = "0.4.35"
+version = "0.4.36"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "083abe15c5d88556b77bdf7aef403625be9e327ad37c62c4e4129af740168163"
+checksum = "2d1985d03709c53167ce907ff394f5316aa22cb4e12761295c5dc57dacb6297e"
dependencies = [
"cfg-if",
"js-sys",
@@ -12903,9 +13393,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro"
-version = "0.2.85"
+version = "0.2.86"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "358a79a0cb89d21db8120cbfb91392335913e4890665b1a7981d9e956903b434"
+checksum = "14d6b024f1a526bb0234f52840389927257beb670610081360e5a03c5df9c258"
dependencies = [
"quote",
"wasm-bindgen-macro-support",
@@ -12913,28 +13403,28 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro-support"
-version = "0.2.85"
+version = "0.2.86"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4783ce29f09b9d93134d41297aded3a712b7b979e9c6f28c32cb88c973a94869"
+checksum = "e128beba882dd1eb6200e1dc92ae6c5dbaa4311aa7bb211ca035779e5efc39f8"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.15",
+ "syn 2.0.18",
"wasm-bindgen-backend",
"wasm-bindgen-shared",
]
[[package]]
name = "wasm-bindgen-shared"
-version = "0.2.85"
+version = "0.2.86"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a901d592cafaa4d711bc324edfaff879ac700b19c3dfd60058d2b445be2691eb"
+checksum = "ed9d5b4305409d1fc9482fee2d7f9bcbf24b3972bf59817ef757e23982242a93"
[[package]]
name = "wasm-encoder"
-version = "0.26.0"
+version = "0.29.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d05d0b6fcd0aeb98adf16e7975331b3c17222aa815148f5b976370ce589d80ef"
+checksum = "18c41dbd92eaebf3612a39be316540b8377c871cb9bde6b064af962984912881"
dependencies = [
"leb128",
]
@@ -12959,9 +13449,9 @@ dependencies = [
[[package]]
name = "wasm-opt"
-version = "0.112.0"
+version = "0.114.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "87fef6d0d508f08334e0ab0e6877feb4c0ecb3956bcf2cb950699b22fedf3e9c"
+checksum = "d984c9ca0fd8dc99c85920c73d1707d0c2104b5cb8f368fce73b3dbf4424b22b"
dependencies = [
"anyhow",
"libc",
@@ -12975,9 +13465,9 @@ dependencies = [
[[package]]
name = "wasm-opt-cxx-sys"
-version = "0.112.0"
+version = "0.114.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bc816bbc1596c8f2e8127e137a760c798023ef3d378f2ae51f0f1840e2dfa445"
+checksum = "e754ce2f058a43fa604c588d111cfdc963131ad66d9f96c061d76a4f1a4a4eb0"
dependencies = [
"anyhow",
"cxx",
@@ -12987,9 +13477,9 @@ dependencies = [
[[package]]
name = "wasm-opt-sys"
-version = "0.112.0"
+version = "0.114.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "40199e4f68ef1071b3c6d0bd8026a12b481865d4b9e49c156932ea9a6234dd14"
+checksum = "b7283687ca12943aa186bba3d2ec43e87039098450c4701420eabd0a770e9b69"
dependencies = [
"anyhow",
"cc",
@@ -13014,56 +13504,24 @@ dependencies = [
[[package]]
name = "wasmi"
-version = "0.13.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "06c326c93fbf86419608361a2c925a31754cf109da1b8b55737070b4d6669422"
-dependencies = [
- "parity-wasm",
- "wasmi-validation",
- "wasmi_core 0.2.1",
-]
-
-[[package]]
-name = "wasmi"
-version = "0.28.0"
+version = "0.30.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8e61a7006b0fdf24f6bbe8dcfdad5ca1b350de80061fb2827f31c82fbbb9565a"
+checksum = "e51fb5c61993e71158abf5bb863df2674ca3ec39ed6471c64f07aeaf751d67b4"
dependencies = [
+ "intx",
+ "smallvec",
"spin 0.9.8",
"wasmi_arena",
- "wasmi_core 0.12.0",
+ "wasmi_core",
"wasmparser-nostd",
]
-[[package]]
-name = "wasmi-validation"
-version = "0.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "91ff416ad1ff0c42e5a926ed5d5fab74c0f098749aa0ad8b2a34b982ce0e867b"
-dependencies = [
- "parity-wasm",
-]
-
[[package]]
name = "wasmi_arena"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "401c1f35e413fac1846d4843745589d9ec678977ab35a384db8ae7830525d468"
-[[package]]
-name = "wasmi_core"
-version = "0.2.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "57d20cb3c59b788653d99541c646c561c9dd26506f25c0cebfe810659c54c6d7"
-dependencies = [
- "downcast-rs",
- "libm 0.2.6",
- "memory_units",
- "num-rational",
- "num-traits",
- "region",
-]
-
[[package]]
name = "wasmi_core"
version = "0.12.0"
@@ -13071,16 +13529,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "624e6333e861ef49095d2d678b76ebf30b06bf37effca845be7e5b87c90071b7"
dependencies = [
"downcast-rs",
- "libm 0.2.6",
+ "libm 0.2.7",
"num-traits",
"paste",
]
[[package]]
name = "wasmparser"
-version = "0.100.0"
+version = "0.102.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "64b20236ab624147dfbb62cf12a19aaf66af0e41b8398838b66e997d07d269d4"
+checksum = "48134de3d7598219ab9eaf6b91b15d8e50d31da76b8519fe4ecfcec2cf35104b"
dependencies = [
"indexmap",
"url",
@@ -13097,9 +13555,9 @@ dependencies = [
[[package]]
name = "wasmtime"
-version = "6.0.2"
+version = "8.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "76a222f5fa1e14b2cefc286f1b68494d7a965f4bf57ec04c59bb62673d639af6"
+checksum = "f907fdead3153cb9bfb7a93bbd5b62629472dc06dee83605358c64c52ed3dda9"
dependencies = [
"anyhow",
"bincode",
@@ -13107,7 +13565,7 @@ dependencies = [
"indexmap",
"libc",
"log",
- "object 0.29.0",
+ "object",
"once_cell",
"paste",
"psm",
@@ -13120,43 +13578,43 @@ dependencies = [
"wasmtime-environ",
"wasmtime-jit",
"wasmtime-runtime",
- "windows-sys 0.42.0",
+ "windows-sys 0.45.0",
]
[[package]]
name = "wasmtime-asm-macros"
-version = "6.0.2"
+version = "8.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4407a7246e7d2f3d8fb1cf0c72fda8dbafdb6dd34d555ae8bea0e5ae031089cc"
+checksum = "d3b9daa7c14cd4fa3edbf69de994408d5f4b7b0959ac13fa69d465f6597f810d"
dependencies = [
"cfg-if",
]
[[package]]
name = "wasmtime-cache"
-version = "6.0.2"
+version = "8.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5ceb3adf61d654be0be67fffdce42447b0880481348785be5fe40b5dd7663a4c"
+checksum = "c86437fa68626fe896e5afc69234bb2b5894949083586535f200385adfd71213"
dependencies = [
"anyhow",
- "base64 0.13.1",
+ "base64 0.21.2",
"bincode",
"directories-next",
"file-per-thread-logger",
"log",
- "rustix 0.36.13",
+ "rustix 0.36.14",
"serde",
- "sha2 0.10.6",
+ "sha2 0.10.7",
"toml 0.5.11",
- "windows-sys 0.42.0",
+ "windows-sys 0.45.0",
"zstd 0.11.2+zstd.1.5.2",
]
[[package]]
name = "wasmtime-cranelift"
-version = "6.0.2"
+version = "8.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3c366bb8647e01fd08cb5589976284b00abfded5529b33d7e7f3f086c68304a4"
+checksum = "b1cefde0cce8cb700b1b21b6298a3837dba46521affd7b8c38a9ee2c869eee04"
dependencies = [
"anyhow",
"cranelift-codegen",
@@ -13164,27 +13622,43 @@ dependencies = [
"cranelift-frontend",
"cranelift-native",
"cranelift-wasm",
- "gimli 0.26.2",
+ "gimli",
"log",
- "object 0.29.0",
+ "object",
"target-lexicon",
"thiserror",
"wasmparser",
+ "wasmtime-cranelift-shared",
+ "wasmtime-environ",
+]
+
+[[package]]
+name = "wasmtime-cranelift-shared"
+version = "8.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cd041e382ef5aea1b9fc78442394f1a4f6d676ce457e7076ca4cb3f397882f8b"
+dependencies = [
+ "anyhow",
+ "cranelift-codegen",
+ "cranelift-native",
+ "gimli",
+ "object",
+ "target-lexicon",
"wasmtime-environ",
]
[[package]]
name = "wasmtime-environ"
-version = "6.0.2"
+version = "8.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "47b8b50962eae38ee319f7b24900b7cf371f03eebdc17400c1dc8575fc10c9a7"
+checksum = "a990198cee4197423045235bf89d3359e69bd2ea031005f4c2d901125955c949"
dependencies = [
"anyhow",
"cranelift-entity",
- "gimli 0.26.2",
+ "gimli",
"indexmap",
"log",
- "object 0.29.0",
+ "object",
"serde",
"target-lexicon",
"thiserror",
@@ -13194,18 +13668,18 @@ dependencies = [
[[package]]
name = "wasmtime-jit"
-version = "6.0.2"
+version = "8.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ffaed4f9a234ba5225d8e64eac7b4a5d13b994aeb37353cde2cbeb3febda9eaa"
+checksum = "0de48df552cfca1c9b750002d3e07b45772dd033b0b206d5c0968496abf31244"
dependencies = [
- "addr2line 0.17.0",
+ "addr2line",
"anyhow",
"bincode",
"cfg-if",
"cpp_demangle",
- "gimli 0.26.2",
+ "gimli",
"log",
- "object 0.29.0",
+ "object",
"rustc-demangle",
"serde",
"target-lexicon",
@@ -13213,36 +13687,36 @@ dependencies = [
"wasmtime-jit-debug",
"wasmtime-jit-icache-coherence",
"wasmtime-runtime",
- "windows-sys 0.42.0",
+ "windows-sys 0.45.0",
]
[[package]]
name = "wasmtime-jit-debug"
-version = "6.0.2"
+version = "8.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "eed41cbcbf74ce3ff6f1d07d1b707888166dc408d1a880f651268f4f7c9194b2"
+checksum = "6e0554b84c15a27d76281d06838aed94e13a77d7bf604bbbaf548aa20eb93846"
dependencies = [
- "object 0.29.0",
+ "object",
"once_cell",
- "rustix 0.36.13",
+ "rustix 0.36.14",
]
[[package]]
name = "wasmtime-jit-icache-coherence"
-version = "6.0.2"
+version = "8.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "43a28ae1e648461bfdbb79db3efdaee1bca5b940872e4175390f465593a2e54c"
+checksum = "aecae978b13f7f67efb23bd827373ace4578f2137ec110bbf6a4a7cde4121bbd"
dependencies = [
"cfg-if",
"libc",
- "windows-sys 0.42.0",
+ "windows-sys 0.45.0",
]
[[package]]
name = "wasmtime-runtime"
-version = "6.0.2"
+version = "8.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e704b126e4252788ccfc3526d4d4511d4b23c521bf123e447ac726c14545217b"
+checksum = "658cf6f325232b6760e202e5255d823da5e348fdea827eff0a2a22319000b441"
dependencies = [
"anyhow",
"cc",
@@ -13252,21 +13726,21 @@ dependencies = [
"log",
"mach",
"memfd",
- "memoffset 0.6.5",
+ "memoffset 0.8.0",
"paste",
"rand 0.8.5",
- "rustix 0.36.13",
+ "rustix 0.36.14",
"wasmtime-asm-macros",
"wasmtime-environ",
"wasmtime-jit-debug",
- "windows-sys 0.42.0",
+ "windows-sys 0.45.0",
]
[[package]]
name = "wasmtime-types"
-version = "6.0.2"
+version = "8.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "83e5572c5727c1ee7e8f28717aaa8400e4d22dcbd714ea5457d85b5005206568"
+checksum = "a4f6fffd2a1011887d57f07654dd112791e872e3ff4a2e626aee8059ee17f06f"
dependencies = [
"cranelift-entity",
"serde",
@@ -13276,9 +13750,9 @@ dependencies = [
[[package]]
name = "wast"
-version = "57.0.0"
+version = "60.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6eb0f5ed17ac4421193c7477da05892c2edafd67f9639e3c11a82086416662dc"
+checksum = "bd06cc744b536e30387e72a48fdd492105b9c938bb4f415c39c616a7a0a697ad"
dependencies = [
"leb128",
"memchr",
@@ -13288,18 +13762,18 @@ dependencies = [
[[package]]
name = "wat"
-version = "1.0.63"
+version = "1.0.66"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ab9ab0d87337c3be2bb6fc5cd331c4ba9fd6bcb4ee85048a0dd59ed9ecf92e53"
+checksum = "5abe520f0ab205366e9ac7d3e6b2fc71de44e32a2b58f2ec871b6b575bdcea3b"
dependencies = [
"wast",
]
[[package]]
name = "web-sys"
-version = "0.3.62"
+version = "0.3.63"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "16b5f940c7edfdc6d12126d98c9ef4d1b3d470011c47c76a6581df47ad9ba721"
+checksum = "3bdd9ef4e984da1187bf8110c5cf5b845fbc87a23602cdf912386a76fcd3a7c2"
dependencies = [
"js-sys",
"wasm-bindgen",
@@ -13311,7 +13785,7 @@ version = "0.21.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea"
dependencies = [
- "ring",
+ "ring 0.16.20",
"untrusted",
]
@@ -13321,7 +13795,7 @@ version = "0.22.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd"
dependencies = [
- "ring",
+ "ring 0.16.20",
"untrusted",
]
@@ -13350,14 +13824,14 @@ dependencies = [
"rand 0.8.5",
"rcgen 0.9.3",
"regex",
- "ring",
+ "ring 0.16.20",
"rtcp",
"rtp",
"rustls 0.19.1",
"sdp",
"serde",
"serde_json",
- "sha2 0.10.6",
+ "sha2 0.10.7",
"stun",
"thiserror",
"time 0.3.21",
@@ -13397,7 +13871,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "942be5bd85f072c3128396f6e5a9bfb93ca8c1939ded735d177b7bcba9a13d05"
dependencies = [
"aes 0.6.0",
- "aes-gcm 0.10.1",
+ "aes-gcm 0.10.2",
"async-trait",
"bincode",
"block-modes",
@@ -13415,12 +13889,12 @@ dependencies = [
"rand 0.8.5",
"rand_core 0.6.4",
"rcgen 0.9.3",
- "ring",
+ "ring 0.16.20",
"rustls 0.19.1",
"sec1 0.3.0",
"serde",
"sha1",
- "sha2 0.10.6",
+ "sha2 0.10.7",
"signature 1.6.4",
"subtle",
"thiserror",
@@ -13556,9 +14030,9 @@ dependencies = [
[[package]]
name = "wide"
-version = "0.7.8"
+version = "0.7.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b689b6c49d6549434bf944e6b0f39238cf63693cb7a147e9d887507fffa3b223"
+checksum = "5cd0496a71f3cc6bc4bf0ed91346426a5099e93d89807e663162dc5a1069ff65"
dependencies = [
"bytemuck",
"safe_arch",
@@ -13623,21 +14097,6 @@ dependencies = [
"windows-targets 0.48.0",
]
-[[package]]
-name = "windows-sys"
-version = "0.42.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7"
-dependencies = [
- "windows_aarch64_gnullvm 0.42.2",
- "windows_aarch64_msvc 0.42.2",
- "windows_i686_gnu 0.42.2",
- "windows_i686_msvc 0.42.2",
- "windows_x86_64_gnu 0.42.2",
- "windows_x86_64_gnullvm 0.42.2",
- "windows_x86_64_msvc 0.42.2",
-]
-
[[package]]
name = "windows-sys"
version = "0.45.0"
@@ -13862,7 +14321,7 @@ dependencies = [
"lazy_static",
"nom",
"oid-registry 0.4.0",
- "ring",
+ "ring 0.16.20",
"rusticata-macros",
"thiserror",
"time 0.3.21",
@@ -13941,7 +14400,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.15",
+ "syn 2.0.18",
]
[[package]]
diff --git a/Cargo.toml b/Cargo.toml
index 2b1659d4fb37b..9ee8142e23e76 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,3 +1,45 @@
+[package]
+name = "substrate"
+description = "Next-generation framework for blockchain innovation"
+license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
+homepage = "https://substrate.io"
+repository = "https://github.com/paritytech/substrate/"
+authors = ["Parity Technologies "]
+edition = "2021"
+version = "0.0.0"
+
+# This list of dependencies is for documentation purposes only.
+[dependencies]
+aquamarine = "0.3.2"
+
+subkey = { path = "bin/utils/subkey" }
+chain-spec-builder = { path = "bin/utils/chain-spec-builder" }
+
+sc-service = { path = "client/service" }
+sc-cli = { path = "client/cli" }
+sc-consensus-aura = { path = "client/consensus/aura" }
+sc-consensus-babe = { path = "client/consensus/babe" }
+sc-consensus-grandpa = { path = "client/consensus/grandpa" }
+sc-consensus-beefy = { path = "client/consensus/beefy" }
+sc-consensus-manual-seal = { path = "client/consensus/manual-seal" }
+sc-consensus-pow = { path = "client/consensus/pow" }
+
+sp-runtime = { path = "primitives/runtime" }
+frame-support = { path = "frame/support" }
+
+node-cli = { path = "bin/node/cli" }
+
+# Exists here to be backwards compatible and to support `cargo run` in the workspace.
+#
+# Just uses the `node-cli` main binary. `node-cli` itself also again exposes the node as
+# `substrate-node`.
+
+# `cargo run` on its own doesn't support features. To use features you must explicitly use
+# `node-cli` in your command, e.g. `cargo run -p node-cli --features try-runtime ...`.
+[[bin]]
+name = "substrate"
+path = "bin/node/cli/bin/main.rs"
+
[workspace]
resolver = "2"
@@ -38,7 +80,6 @@ members = [
"client/executor",
"client/executor/common",
"client/executor/runtime-test",
- "client/executor/wasmi",
"client/executor/wasmtime",
"client/informant",
"client/keystore",
@@ -54,7 +95,6 @@ members = [
"client/network/sync",
"client/network/test",
"client/offchain",
- "client/peerset",
"client/allocator",
"client/proposer-metrics",
"client/rpc",
@@ -75,6 +115,7 @@ members = [
"client/transaction-pool/api",
"client/utils",
"frame/alliance",
+ "frame/asset-conversion",
"frame/assets",
"frame/atomic-swap",
"frame/aura",
@@ -107,9 +148,13 @@ members = [
"frame/election-provider-support/benchmarking",
"frame/election-provider-support/solution-type",
"frame/election-provider-support/solution-type/fuzzer",
+ "frame/examples",
"frame/examples/basic",
"frame/examples/offchain-worker",
+ "frame/examples/kitchensink",
"frame/examples/dev-mode",
+ "frame/examples/split",
+ "frame/examples/default-config",
"frame/executive",
"frame/nis",
"frame/grandpa",
@@ -129,11 +174,14 @@ members = [
"frame/message-queue",
"frame/nfts",
"frame/nfts/runtime-api",
+ "frame/nft-fractionalization",
"frame/nomination-pools",
"frame/nomination-pools/fuzzer",
"frame/nomination-pools/benchmarking",
"frame/nomination-pools/test-staking",
"frame/nomination-pools/runtime-api",
+ "frame/paged-list",
+ "frame/paged-list/fuzzer",
"frame/insecure-randomness-collective-flip",
"frame/ranked-collective",
"frame/recovery",
@@ -166,6 +214,7 @@ members = [
"frame/system/rpc/runtime-api",
"frame/timestamp",
"frame/transaction-payment",
+ "frame/transaction-payment/asset-conversion-tx-payment",
"frame/transaction-payment/asset-tx-payment",
"frame/transaction-payment/rpc",
"frame/transaction-payment/rpc/runtime-api",
@@ -198,9 +247,11 @@ members = [
"primitives/core",
"primitives/core/hashing",
"primitives/core/hashing/proc-macro",
+ "primitives/crypto/ec-utils",
"primitives/database",
"primitives/debug-derive",
"primitives/externalities",
+ "primitives/genesis-builder",
"primitives/inherents",
"primitives/io",
"primitives/keyring",
@@ -237,6 +288,7 @@ members = [
"primitives/weights",
"scripts/ci/node-template-release",
"test-utils",
+ "test-utils/cli",
"test-utils/client",
"test-utils/derive",
"test-utils/runtime",
diff --git a/README.md b/README.md
index 361f410ab2790..b6b5d0ccc9c41 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# Substrate · [![GitHub license](https://img.shields.io/badge/license-GPL3%2FApache2-blue)](#LICENSE) [![GitLab Status](https://gitlab.parity.io/parity/substrate/badges/master/pipeline.svg)](https://gitlab.parity.io/parity/substrate/pipelines) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](docs/CONTRIBUTING.adoc) [![Stack Exchange](https://img.shields.io/badge/Substrate-Community%20&%20Support-24CC85?logo=stackexchange)](https://substrate.stackexchange.com/)
+# Substrate · [![GitHub license](https://img.shields.io/badge/license-GPL3%2FApache2-blue)](#LICENSE) [![GitLab Status](https://gitlab.parity.io/parity/substrate/badges/master/pipeline.svg)](https://gitlab.parity.io/parity/substrate/pipelines) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](docs/CONTRIBUTING.md) [![Stack Exchange](https://img.shields.io/badge/Substrate-Community%20&%20Support-24CC85?logo=stackexchange)](https://substrate.stackexchange.com/)
@@ -18,7 +18,7 @@ Please do report bugs and [issues here](https://github.com/paritytech/substrate/
## Contributions & Code of Conduct
-Please follow the contributions guidelines as outlined in [`docs/CONTRIBUTING.adoc`](docs/CONTRIBUTING.adoc).
+Please follow the contributions guidelines as outlined in [`docs/CONTRIBUTING.md`](docs/CONTRIBUTING.md).
In all communications and contributions, this project follows the [Contributor Covenant Code of Conduct](docs/CODE_OF_CONDUCT.md).
## Security
@@ -33,4 +33,3 @@ The security policy and procedures can be found in [`docs/SECURITY.md`](docs/SEC
The reason for the split-licensing is to ensure that for the vast majority of teams using Substrate to create feature-chains, then all changes can be made entirely in Apache2-licensed code, allowing teams full freedom over what and how they release and giving licensing clarity to commercial teams.
In the interests of the community, we require any deeper improvements made to Substrate's core logic (e.g. Substrate's internal consensus, crypto or database code) to be contributed back so everyone can benefit.
-
diff --git a/bin/node-template/README.md b/bin/node-template/README.md
index 0dd4ee5077b85..337facaaf0898 100644
--- a/bin/node-template/README.md
+++ b/bin/node-template/README.md
@@ -90,7 +90,7 @@ You can also find the source code and instructions for hosting your own instance
### Multi-Node Local Testnet
-If you want to see the multi-node consensus algorithm in action, see [Simulate a network](https://docs.substrate.io/tutorials/get-started/simulate-network/).
+If you want to see the multi-node consensus algorithm in action, see [Simulate a network](https://docs.substrate.io/tutorials/build-a-blockchain/simulate-network/).
## Template Structure
@@ -125,7 +125,7 @@ Take special note of the following:
In Substrate, the terms "runtime" and "state transition function" are analogous.
Both terms refer to the core logic of the blockchain that is responsible for validating blocks and executing the state changes they define.
-The Substrate project in this repository uses [FRAME](https://docs.substrate.io/fundamentals/runtime-development/#frame) to construct a blockchain runtime.
+The Substrate project in this repository uses [FRAME](https://docs.substrate.io/learn/runtime-development/#frame) to construct a blockchain runtime.
FRAME allows runtime developers to declare domain-specific logic in modules called "pallets".
At the heart of FRAME is a helpful [macro language](https://docs.substrate.io/reference/frame-macros/) that makes it easy to create pallets and flexibly compose them to create blockchains that can address [a variety of needs](https://substrate.io/ecosystem/projects/).
@@ -133,19 +133,20 @@ Review the [FRAME runtime implementation](./runtime/src/lib.rs) included in this
- This file configures several pallets to include in the runtime.
Each pallet configuration is defined by a code block that begins with `impl $PALLET_NAME::Config for Runtime`.
-- The pallets are composed into a single runtime by way of the [`construct_runtime!`](https://crates.parity.io/frame_support/macro.construct_runtime.html) macro, which is part of the core FRAME Support [system](https://docs.substrate.io/reference/frame-pallets/#system-pallets) library.
+- The pallets are composed into a single runtime by way of the [`construct_runtime!`](https://paritytech.github.io/substrate/master/frame_support/macro.construct_runtime.html) macro, which is part of the [core FRAME pallet library](https://docs.substrate.io/reference/frame-pallets/#system-pallets).
### Pallets
-The runtime in this project is constructed using many FRAME pallets that ship with the [core Substrate repository](https://github.com/paritytech/substrate/tree/master/frame) and a template pallet that is [defined in the `pallets`](./pallets/template/src/lib.rs) directory.
+The runtime in this project is constructed using many FRAME pallets that ship with [the Substrate repository](https://github.com/paritytech/substrate/tree/master/frame) and a template pallet that is [defined in the `pallets`](./pallets/template/src/lib.rs) directory.
-A FRAME pallet is compromised of a number of blockchain primitives:
+A FRAME pallet is comprised of a number of blockchain primitives, including:
- Storage: FRAME defines a rich set of powerful [storage abstractions](https://docs.substrate.io/build/runtime-storage/) that makes it easy to use Substrate's efficient key-value database to manage the evolving state of a blockchain.
- Dispatchables: FRAME pallets define special types of functions that can be invoked (dispatched) from outside of the runtime in order to update its state.
-- Events: Substrate uses [events and errors](https://docs.substrate.io/build/events-and-errors/) to notify users of important changes in the runtime.
+- Events: Substrate uses [events](https://docs.substrate.io/build/events-and-errors/) to notify users of significant state changes.
- Errors: When a dispatchable fails, it returns an error.
-- Config: The `Config` configuration interface is used to define the types and parameters upon which a FRAME pallet depends.
+
+Each pallet has its own `Config` trait which serves as a configuration interface to generically define the types and parameters it depends on.
## Alternatives Installations
diff --git a/bin/node-template/node/Cargo.toml b/bin/node-template/node/Cargo.toml
index 1801caad676ab..b05fed96bc8a2 100644
--- a/bin/node-template/node/Cargo.toml
+++ b/bin/node-template/node/Cargo.toml
@@ -21,33 +21,30 @@ clap = { version = "4.2.5", features = ["derive"] }
futures = { version = "0.3.21", features = ["thread-pool"]}
sc-cli = { version = "0.10.0-dev", path = "../../../client/cli" }
-sp-core = { version = "7.0.0", path = "../../../primitives/core" }
+sp-core = { version = "21.0.0", path = "../../../primitives/core" }
sc-executor = { version = "0.10.0-dev", path = "../../../client/executor" }
sc-network = { version = "0.10.0-dev", path = "../../../client/network" }
sc-service = { version = "0.10.0-dev", path = "../../../client/service" }
sc-telemetry = { version = "4.0.0-dev", path = "../../../client/telemetry" }
-sc-keystore = { version = "4.0.0-dev", path = "../../../client/keystore" }
sc-transaction-pool = { version = "4.0.0-dev", path = "../../../client/transaction-pool" }
sc-transaction-pool-api = { version = "4.0.0-dev", path = "../../../client/transaction-pool/api" }
-sc-statement-store = { version = "4.0.0-dev", path = "../../../client/statement-store" }
+sc-offchain = { version = "4.0.0-dev", path = "../../../client/offchain" }
sc-consensus-aura = { version = "0.10.0-dev", path = "../../../client/consensus/aura" }
sp-consensus-aura = { version = "0.10.0-dev", path = "../../../primitives/consensus/aura" }
-sp-consensus = { version = "0.10.0-dev", path = "../../../primitives/consensus/common" }
sc-consensus = { version = "0.10.0-dev", path = "../../../client/consensus/common" }
sc-consensus-grandpa = { version = "0.10.0-dev", path = "../../../client/consensus/grandpa" }
sp-consensus-grandpa = { version = "4.0.0-dev", path = "../../../primitives/consensus/grandpa" }
sc-client-api = { version = "4.0.0-dev", path = "../../../client/api" }
-sp-runtime = { version = "7.0.0", path = "../../../primitives/runtime" }
-sp-io = { version = "7.0.0", path = "../../../primitives/io" }
+sp-runtime = { version = "24.0.0", path = "../../../primitives/runtime" }
+sp-io = { version = "23.0.0", path = "../../../primitives/io" }
sp-timestamp = { version = "4.0.0-dev", path = "../../../primitives/timestamp" }
sp-inherents = { version = "4.0.0-dev", path = "../../../primitives/inherents" }
-sp-keyring = { version = "7.0.0", path = "../../../primitives/keyring" }
+sp-keyring = { version = "24.0.0", path = "../../../primitives/keyring" }
frame-system = { version = "4.0.0-dev", path = "../../../frame/system" }
pallet-transaction-payment = { version = "4.0.0-dev", default-features = false, path = "../../../frame/transaction-payment" }
# These dependencies are used for the node template's RPCs
jsonrpsee = { version = "0.16.2", features = ["server"] }
-sc-rpc = { version = "4.0.0-dev", path = "../../../client/rpc" }
sp-api = { version = "4.0.0-dev", path = "../../../primitives/api" }
sc-rpc-api = { version = "0.10.0-dev", path = "../../../client/rpc-api" }
sp-blockchain = { version = "4.0.0-dev", path = "../../../primitives/blockchain" }
@@ -76,7 +73,16 @@ runtime-benchmarks = [
"node-template-runtime/runtime-benchmarks",
"frame-benchmarking/runtime-benchmarks",
"frame-benchmarking-cli/runtime-benchmarks",
+ "frame-system/runtime-benchmarks",
+ "sc-service/runtime-benchmarks",
+ "sp-runtime/runtime-benchmarks"
]
# Enable features that allow the runtime to be tried and debugged. Name might be subject to change
# in the near future.
-try-runtime = ["node-template-runtime/try-runtime", "try-runtime-cli/try-runtime"]
+try-runtime = [
+ "node-template-runtime/try-runtime",
+ "try-runtime-cli/try-runtime",
+ "frame-system/try-runtime",
+ "pallet-transaction-payment/try-runtime",
+ "sp-runtime/try-runtime"
+]
diff --git a/bin/node-template/node/src/benchmarking.rs b/bin/node-template/node/src/benchmarking.rs
index 37e0e465969de..6e29ad1a12311 100644
--- a/bin/node-template/node/src/benchmarking.rs
+++ b/bin/node-template/node/src/benchmarking.rs
@@ -82,11 +82,8 @@ impl frame_benchmarking_cli::ExtrinsicBuilder for TransferKeepAliveBuilder {
let extrinsic: OpaqueExtrinsic = create_benchmark_extrinsic(
self.client.as_ref(),
acc,
- BalancesCall::transfer_keep_alive {
- dest: self.dest.clone().into(),
- value: self.value.into(),
- }
- .into(),
+ BalancesCall::transfer_keep_alive { dest: self.dest.clone().into(), value: self.value }
+ .into(),
nonce,
)
.into();
@@ -143,10 +140,10 @@ pub fn create_benchmark_extrinsic(
let signature = raw_payload.using_encoded(|e| sender.sign(e));
runtime::UncheckedExtrinsic::new_signed(
- call.clone(),
+ call,
sp_runtime::AccountId32::from(sender.public()).into(),
- runtime::Signature::Sr25519(signature.clone()),
- extra.clone(),
+ runtime::Signature::Sr25519(signature),
+ extra,
)
}
diff --git a/bin/node-template/node/src/chain_spec.rs b/bin/node-template/node/src/chain_spec.rs
index e978596beb7b1..2cd2d07293026 100644
--- a/bin/node-template/node/src/chain_spec.rs
+++ b/bin/node-template/node/src/chain_spec.rs
@@ -1,6 +1,6 @@
use node_template_runtime::{
- AccountId, AuraConfig, BalancesConfig, GenesisConfig, GrandpaConfig, Signature, SudoConfig,
- SystemConfig, WASM_BINARY,
+ AccountId, AuraConfig, BalancesConfig, GrandpaConfig, RuntimeGenesisConfig, Signature,
+ SudoConfig, SystemConfig, WASM_BINARY,
};
use sc_service::ChainType;
use sp_consensus_aura::sr25519::AuthorityId as AuraId;
@@ -12,7 +12,7 @@ use sp_runtime::traits::{IdentifyAccount, Verify};
// const STAGING_TELEMETRY_URL: &str = "wss://telemetry.polkadot.io/submit/";
/// Specialized `ChainSpec`. This is a specialization of the general Substrate ChainSpec type.
-pub type ChainSpec = sc_service::GenericChainSpec;
+pub type ChainSpec = sc_service::GenericChainSpec;
/// Generate a crypto pair from seed.
pub fn get_from_seed(seed: &str) -> ::Public {
@@ -131,11 +131,12 @@ fn testnet_genesis(
root_key: AccountId,
endowed_accounts: Vec,
_enable_println: bool,
-) -> GenesisConfig {
- GenesisConfig {
+) -> RuntimeGenesisConfig {
+ RuntimeGenesisConfig {
system: SystemConfig {
// Add Wasm runtime to storage.
code: wasm_binary.to_vec(),
+ ..Default::default()
},
balances: BalancesConfig {
// Configure endowed accounts with initial balance of 1 << 60.
@@ -146,6 +147,7 @@ fn testnet_genesis(
},
grandpa: GrandpaConfig {
authorities: initial_authorities.iter().map(|x| (x.1.clone(), 1)).collect(),
+ ..Default::default()
},
sudo: SudoConfig {
// Assign network admin rights.
diff --git a/bin/node-template/node/src/cli.rs b/bin/node-template/node/src/cli.rs
index dd610477ac469..98037eb886a8e 100644
--- a/bin/node-template/node/src/cli.rs
+++ b/bin/node-template/node/src/cli.rs
@@ -10,6 +10,7 @@ pub struct Cli {
}
#[derive(Debug, clap::Subcommand)]
+#[allow(clippy::large_enum_variant)]
pub enum Subcommand {
/// Key management cli utilities
#[command(subcommand)]
@@ -40,12 +41,9 @@ pub enum Subcommand {
#[command(subcommand)]
Benchmark(frame_benchmarking_cli::BenchmarkCmd),
- /// Try some command against runtime state.
- #[cfg(feature = "try-runtime")]
- TryRuntime(try_runtime_cli::TryRuntimeCmd),
-
- /// Try some command against runtime state. Note: `try-runtime` feature must be enabled.
- #[cfg(not(feature = "try-runtime"))]
+ /// Try-runtime has migrated to a standalone CLI
+ /// (). The subcommand exists as a stub and
+ /// deprecation notice. It will be removed entirely some time after Janurary 2024.
TryRuntime,
/// Db meta columns information.
diff --git a/bin/node-template/node/src/command.rs b/bin/node-template/node/src/command.rs
index e121db820f2a3..a25157693cd43 100644
--- a/bin/node-template/node/src/command.rs
+++ b/bin/node-template/node/src/command.rs
@@ -6,13 +6,10 @@ use crate::{
};
use frame_benchmarking_cli::{BenchmarkCmd, ExtrinsicFactory, SUBSTRATE_REFERENCE_HARDWARE};
use node_template_runtime::{Block, EXISTENTIAL_DEPOSIT};
-use sc_cli::{ChainSpec, RuntimeVersion, SubstrateCli};
+use sc_cli::SubstrateCli;
use sc_service::PartialComponents;
use sp_keyring::Sr25519Keyring;
-#[cfg(feature = "try-runtime")]
-use try_runtime_cli::block_building_info::timestamp_with_aura_info;
-
impl SubstrateCli for Cli {
fn impl_name() -> String {
"Substrate Node".into()
@@ -46,10 +43,6 @@ impl SubstrateCli for Cli {
Box::new(chain_spec::ChainSpec::from_json_file(std::path::PathBuf::from(path))?),
})
}
-
- fn native_runtime_version(_: &Box) -> &'static RuntimeVersion {
- &node_template_runtime::VERSION
- }
}
/// Parse and run command line arguments
@@ -124,7 +117,7 @@ pub fn run() -> sc_cli::Result<()> {
)
}
- cmd.run::(config)
+ cmd.run::(config)
},
BenchmarkCmd::Block(cmd) => {
let PartialComponents { client, .. } = service::new_partial(&config)?;
@@ -176,28 +169,7 @@ pub fn run() -> sc_cli::Result<()> {
})
},
#[cfg(feature = "try-runtime")]
- Some(Subcommand::TryRuntime(cmd)) => {
- use crate::service::ExecutorDispatch;
- use sc_executor::{sp_wasm_interface::ExtendedHostFunctions, NativeExecutionDispatch};
- let runner = cli.create_runner(cmd)?;
- runner.async_run(|config| {
- // we don't need any of the components of new_partial, just a runtime, or a task
- // manager to do `async_run`.
- let registry = config.prometheus_config.as_ref().map(|cfg| &cfg.registry);
- let task_manager =
- sc_service::TaskManager::new(config.tokio_handle.clone(), registry)
- .map_err(|e| sc_cli::Error::Service(sc_service::Error::Prometheus(e)))?;
- let info_provider = timestamp_with_aura_info(6000);
-
- Ok((
- cmd.run::::ExtendHostFunctions,
- >, _>(Some(info_provider)),
- task_manager,
- ))
- })
- },
+ Some(Subcommand::TryRuntime) => Err(try_runtime_cli::DEPRECATION_NOTICE.into()),
#[cfg(not(feature = "try-runtime"))]
Some(Subcommand::TryRuntime) => Err("TryRuntime wasn't enabled when building the node. \
You can enable it with `--features try-runtime`."
diff --git a/bin/node-template/node/src/rpc.rs b/bin/node-template/node/src/rpc.rs
index 981f375d0b462..f4f1540f732f7 100644
--- a/bin/node-template/node/src/rpc.rs
+++ b/bin/node-template/node/src/rpc.rs
@@ -8,7 +8,7 @@
use std::sync::Arc;
use jsonrpsee::RpcModule;
-use node_template_runtime::{opaque::Block, AccountId, Balance, Index};
+use node_template_runtime::{opaque::Block, AccountId, Balance, Nonce};
use sc_transaction_pool_api::TransactionPool;
use sp_api::ProvideRuntimeApi;
use sp_block_builder::BlockBuilder;
@@ -34,7 +34,7 @@ where
C: ProvideRuntimeApi,
C: HeaderBackend + HeaderMetadata + 'static,
C: Send + Sync + 'static,
- C::Api: substrate_frame_rpc_system::AccountNonceApi,
+ C::Api: substrate_frame_rpc_system::AccountNonceApi,
C::Api: pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi,
C::Api: BlockBuilder,
P: TransactionPool + 'static,
@@ -45,7 +45,7 @@ where
let mut module = RpcModule::new(());
let FullDeps { client, pool, deny_unsafe } = deps;
- module.merge(System::new(client.clone(), pool.clone(), deny_unsafe).into_rpc())?;
+ module.merge(System::new(client.clone(), pool, deny_unsafe).into_rpc())?;
module.merge(TransactionPayment::new(client).into_rpc())?;
// Extend this RPC with a custom API by using the following syntax.
diff --git a/bin/node-template/node/src/service.rs b/bin/node-template/node/src/service.rs
index ca827001b5bcc..7303f5cd6dd6d 100644
--- a/bin/node-template/node/src/service.rs
+++ b/bin/node-template/node/src/service.rs
@@ -1,12 +1,14 @@
//! Service and ServiceFactory implementation. Specialized wrapper over substrate service.
+use futures::FutureExt;
use node_template_runtime::{self, opaque::Block, RuntimeApi};
-use sc_client_api::BlockBackend;
+use sc_client_api::{Backend, BlockBackend};
use sc_consensus_aura::{ImportQueueParams, SlotProportion, StartAuraParams};
use sc_consensus_grandpa::SharedVoterState;
pub use sc_executor::NativeElseWasmExecutor;
use sc_service::{error::Error as ServiceError, Configuration, TaskManager, WarpSyncParams};
use sc_telemetry::{Telemetry, TelemetryWorker};
+use sc_transaction_pool_api::OffchainTransactionPoolFactory;
use sp_consensus_aura::sr25519::AuthorityPair as AuraPair;
use std::{sync::Arc, time::Duration};
@@ -35,6 +37,11 @@ pub(crate) type FullClient =
type FullBackend = sc_service::TFullBackend;
type FullSelectChain = sc_consensus::LongestChain;
+/// The minimum period of blocks on which justifications will be
+/// imported and generated.
+const GRANDPA_JUSTIFICATION_PERIOD: u32 = 512;
+
+#[allow(clippy::type_complexity)]
pub fn new_partial(
config: &Configuration,
) -> Result<
@@ -42,7 +49,7 @@ pub fn new_partial(
FullClient,
FullBackend,
FullSelectChain,
- sc_consensus::DefaultImportQueue,
+ sc_consensus::DefaultImportQueue,
sc_transaction_pool::FullPool,
(
sc_consensus_grandpa::GrandpaBlockImport<
@@ -68,8 +75,7 @@ pub fn new_partial(
})
.transpose()?;
- let executor = sc_service::new_native_or_wasm_executor(&config);
-
+ let executor = sc_service::new_native_or_wasm_executor(config);
let (client, backend, keystore_container, task_manager) =
sc_service::new_full_parts::(
config,
@@ -95,7 +101,8 @@ pub fn new_partial(
let (grandpa_block_import, grandpa_link) = sc_consensus_grandpa::block_import(
client.clone(),
- &(client.clone() as Arc<_>),
+ GRANDPA_JUSTIFICATION_PERIOD,
+ &client,
select_chain.clone(),
telemetry.as_ref().map(|x| x.handle()),
)?;
@@ -179,11 +186,23 @@ pub fn new_full(config: Configuration) -> Result {
})?;
if config.offchain_worker.enabled {
- sc_service::build_offchain_workers(
- &config,
- task_manager.spawn_handle(),
- client.clone(),
- network.clone(),
+ task_manager.spawn_handle().spawn(
+ "offchain-workers-runner",
+ "offchain-worker",
+ sc_offchain::OffchainWorkers::new(sc_offchain::OffchainWorkerOptions {
+ runtime_api_provider: client.clone(),
+ is_validator: config.role.is_authority(),
+ keystore: Some(keystore_container.keystore()),
+ offchain_db: backend.offchain_storage(),
+ transaction_pool: Some(OffchainTransactionPoolFactory::new(
+ transaction_pool.clone(),
+ )),
+ network_provider: network.clone(),
+ enable_http_requests: true,
+ custom_extensions: |_| vec![],
+ })
+ .run(client.clone(), task_manager.spawn_handle())
+ .boxed(),
);
}
@@ -224,7 +243,7 @@ pub fn new_full(config: Configuration) -> Result {
let proposer_factory = sc_basic_authorship::ProposerFactory::new(
task_manager.spawn_handle(),
client.clone(),
- transaction_pool,
+ transaction_pool.clone(),
prometheus_registry.as_ref(),
telemetry.as_ref().map(|x| x.handle()),
);
@@ -276,7 +295,7 @@ pub fn new_full(config: Configuration) -> Result {
let grandpa_config = sc_consensus_grandpa::Config {
// FIXME #1578 make this available through chainspec
gossip_duration: Duration::from_millis(333),
- justification_period: 512,
+ justification_generation_period: GRANDPA_JUSTIFICATION_PERIOD,
name: Some(name),
observer_enabled: false,
keystore,
@@ -300,6 +319,7 @@ pub fn new_full(config: Configuration) -> Result {
prometheus_registry,
shared_voter_state: SharedVoterState::empty(),
telemetry: telemetry.as_ref().map(|x| x.handle()),
+ offchain_tx_pool_factory: OffchainTransactionPoolFactory::new(transaction_pool),
};
// the GRANDPA voter task is considered infallible, i.e.
diff --git a/bin/node-template/pallets/template/Cargo.toml b/bin/node-template/pallets/template/Cargo.toml
index bb6d8c511af7e..f468374c2ff9f 100644
--- a/bin/node-template/pallets/template/Cargo.toml
+++ b/bin/node-template/pallets/template/Cargo.toml
@@ -13,7 +13,7 @@ repository = "https://github.com/substrate-developer-hub/substrate-node-template
targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
-codec = { package = "parity-scale-codec", version = "3.2.2", default-features = false, features = [
+codec = { package = "parity-scale-codec", version = "3.6.1", default-features = false, features = [
"derive",
] }
scale-info = { version = "2.5.0", default-features = false, features = ["derive"] }
@@ -22,9 +22,9 @@ frame-support = { version = "4.0.0-dev", default-features = false, path = "../..
frame-system = { version = "4.0.0-dev", default-features = false, path = "../../../../frame/system" }
[dev-dependencies]
-sp-core = { version = "7.0.0", path = "../../../../primitives/core" }
-sp-io = { version = "7.0.0", path = "../../../../primitives/io" }
-sp-runtime = { version = "7.0.0", path = "../../../../primitives/runtime" }
+sp-core = { version = "21.0.0", path = "../../../../primitives/core" }
+sp-io = { version = "23.0.0", path = "../../../../primitives/io" }
+sp-runtime = { version = "24.0.0", path = "../../../../primitives/runtime" }
[features]
default = ["std"]
@@ -34,6 +34,18 @@ std = [
"frame-support/std",
"frame-system/std",
"scale-info/std",
+ "sp-core/std",
+ "sp-io/std",
+ "sp-runtime/std"
+]
+runtime-benchmarks = [
+ "frame-benchmarking/runtime-benchmarks",
+ "frame-support/runtime-benchmarks",
+ "frame-system/runtime-benchmarks",
+ "sp-runtime/runtime-benchmarks"
+]
+try-runtime = [
+ "frame-support/try-runtime",
+ "frame-system/try-runtime",
+ "sp-runtime/try-runtime"
]
-runtime-benchmarks = ["frame-benchmarking/runtime-benchmarks"]
-try-runtime = ["frame-support/try-runtime"]
diff --git a/bin/node-template/pallets/template/src/lib.rs b/bin/node-template/pallets/template/src/lib.rs
index 9550d3d546cca..edf7769bab7d3 100644
--- a/bin/node-template/pallets/template/src/lib.rs
+++ b/bin/node-template/pallets/template/src/lib.rs
@@ -94,7 +94,7 @@ pub mod pallet {
// Read a value from storage.
match >::get() {
// Return an error if the value has not been set.
- None => return Err(Error::::NoneValue.into()),
+ None => Err(Error::::NoneValue.into()),
Some(old) => {
// Increment the value read from storage; will error in the event of overflow.
let new = old.checked_add(1).ok_or(Error::::StorageOverflow)?;
diff --git a/bin/node-template/pallets/template/src/mock.rs b/bin/node-template/pallets/template/src/mock.rs
index b4d6905378a5d..244ae1b37859b 100644
--- a/bin/node-template/pallets/template/src/mock.rs
+++ b/bin/node-template/pallets/template/src/mock.rs
@@ -2,19 +2,15 @@ use crate as pallet_template;
use frame_support::traits::{ConstU16, ConstU64};
use sp_core::H256;
use sp_runtime::{
- testing::Header,
traits::{BlakeTwo256, IdentityLookup},
+ BuildStorage,
};
-type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic;
type Block = frame_system::mocking::MockBlock;
// Configure a mock runtime to test the pallet.
frame_support::construct_runtime!(
- pub enum Test where
- Block = Block,
- NodeBlock = Block,
- UncheckedExtrinsic = UncheckedExtrinsic,
+ pub enum Test
{
System: frame_system,
TemplateModule: pallet_template,
@@ -28,13 +24,12 @@ impl frame_system::Config for Test {
type DbWeight = ();
type RuntimeOrigin = RuntimeOrigin;
type RuntimeCall = RuntimeCall;
- type Index = u64;
- type BlockNumber = u64;
+ type Nonce = u64;
type Hash = H256;
type Hashing = BlakeTwo256;
type AccountId = u64;
type Lookup = IdentityLookup;
- type Header = Header;
+ type Block = Block;
type RuntimeEvent = RuntimeEvent;
type BlockHashCount = ConstU64<250>;
type Version = ();
@@ -55,5 +50,5 @@ impl pallet_template::Config for Test {
// Build genesis storage according to the mock runtime.
pub fn new_test_ext() -> sp_io::TestExternalities {
- frame_system::GenesisConfig::default().build_storage::().unwrap().into()
+ frame_system::GenesisConfig::::default().build_storage().unwrap().into()
}
diff --git a/bin/node-template/pallets/template/src/weights.rs b/bin/node-template/pallets/template/src/weights.rs
index e8fbc09bad8e9..7c42936e09f29 100644
--- a/bin/node-template/pallets/template/src/weights.rs
+++ b/bin/node-template/pallets/template/src/weights.rs
@@ -19,7 +19,6 @@
// *
// --steps=50
// --repeat=20
-// --execution=wasm
// --wasm-execution=compiled
// --output
// pallets/template/src/weights.rs
diff --git a/bin/node-template/runtime/Cargo.toml b/bin/node-template/runtime/Cargo.toml
index d7f7ca4d86a8c..51e30187c9d63 100644
--- a/bin/node-template/runtime/Cargo.toml
+++ b/bin/node-template/runtime/Cargo.toml
@@ -13,7 +13,7 @@ repository = "https://github.com/substrate-developer-hub/substrate-node-template
targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
-codec = { package = "parity-scale-codec", version = "3.2.2", default-features = false, features = ["derive"] }
+codec = { package = "parity-scale-codec", version = "3.6.1", default-features = false, features = ["derive"] }
scale-info = { version = "2.5.0", default-features = false, features = ["derive"] }
pallet-aura = { version = "4.0.0-dev", default-features = false, path = "../../../frame/aura" }
@@ -30,14 +30,14 @@ sp-api = { version = "4.0.0-dev", default-features = false, path = "../../../pri
sp-block-builder = { version = "4.0.0-dev", default-features = false, path = "../../../primitives/block-builder"}
sp-consensus-aura = { version = "0.10.0-dev", default-features = false, path = "../../../primitives/consensus/aura" }
sp-consensus-grandpa = { version = "4.0.0-dev", default-features = false, path = "../../../primitives/consensus/grandpa" }
-sp-core = { version = "7.0.0", default-features = false, path = "../../../primitives/core" }
+sp-core = { version = "21.0.0", default-features = false, path = "../../../primitives/core" }
sp-inherents = { version = "4.0.0-dev", default-features = false, path = "../../../primitives/inherents"}
sp-offchain = { version = "4.0.0-dev", default-features = false, path = "../../../primitives/offchain" }
-sp-runtime = { version = "7.0.0", default-features = false, path = "../../../primitives/runtime" }
+sp-runtime = { version = "24.0.0", default-features = false, path = "../../../primitives/runtime" }
sp-session = { version = "4.0.0-dev", default-features = false, path = "../../../primitives/session" }
-sp-std = { version = "5.0.0", default-features = false, path = "../../../primitives/std" }
+sp-std = { version = "8.0.0", default-features = false, path = "../../../primitives/std" }
sp-transaction-pool = { version = "4.0.0-dev", default-features = false, path = "../../../primitives/transaction-pool" }
-sp-version = { version = "5.0.0", default-features = false, path = "../../../primitives/version" }
+sp-version = { version = "22.0.0", default-features = false, path = "../../../primitives/version" }
# Used for the node template's RPCs
frame-system-rpc-runtime-api = { version = "4.0.0-dev", default-features = false, path = "../../../frame/system/rpc/runtime-api/" }
@@ -112,4 +112,6 @@ try-runtime = [
"pallet-template/try-runtime",
"pallet-timestamp/try-runtime",
"pallet-transaction-payment/try-runtime",
+ "sp-runtime/try-runtime"
]
+experimental = ["pallet-aura/experimental"]
diff --git a/bin/node-template/runtime/src/lib.rs b/bin/node-template/runtime/src/lib.rs
index 49346fbdd77da..c3375d2ee601a 100644
--- a/bin/node-template/runtime/src/lib.rs
+++ b/bin/node-template/runtime/src/lib.rs
@@ -27,7 +27,8 @@ use sp_version::RuntimeVersion;
pub use frame_support::{
construct_runtime, parameter_types,
traits::{
- ConstU128, ConstU32, ConstU64, ConstU8, KeyOwnerProofSystem, Randomness, StorageInfo,
+ ConstBool, ConstU128, ConstU32, ConstU64, ConstU8, KeyOwnerProofSystem, Randomness,
+ StorageInfo,
},
weights::{
constants::{
@@ -62,7 +63,7 @@ pub type AccountId = <::Signer as IdentifyAccount>::Account
pub type Balance = u128;
/// Index of a transaction in the chain.
-pub type Index = u32;
+pub type Nonce = u32;
/// A hash of some data used by the chain.
pub type Hash = sp_core::H256;
@@ -154,6 +155,8 @@ parameter_types! {
impl frame_system::Config for Runtime {
/// The basic call filter to use in dispatchable.
type BaseCallFilter = frame_support::traits::Everything;
+ /// The block type for the runtime.
+ type Block = Block;
/// Block & extrinsics weights: base values and limits.
type BlockWeights = BlockWeights;
/// The maximum length of a block (in bytes).
@@ -164,16 +167,12 @@ impl frame_system::Config for Runtime {
type RuntimeCall = RuntimeCall;
/// The lookup mechanism to get account ID from whatever is passed in dispatchers.
type Lookup = AccountIdLookup;
- /// The index type for storing how many extrinsics an account has signed.
- type Index = Index;
- /// The index type for blocks.
- type BlockNumber = BlockNumber;
+ /// The type for storing how many extrinsics an account has signed.
+ type Nonce = Nonce;
/// The type for hashing blocks and tries.
type Hash = Hash;
/// The hashing algorithm used.
type Hashing = BlakeTwo256;
- /// The header type.
- type Header = generic::Header;
/// The ubiquitous event type.
type RuntimeEvent = RuntimeEvent;
/// The ubiquitous origin type.
@@ -207,6 +206,10 @@ impl pallet_aura::Config for Runtime {
type AuthorityId = AuraId;
type DisabledValidators = ();
type MaxAuthorities = ConstU32<32>;
+ type AllowMultipleBlocksPerSlot = ConstBool;
+
+ #[cfg(feature = "experimental")]
+ type SlotDuration = pallet_aura::MinimumPeriodTimesTwo;
}
impl pallet_grandpa::Config for Runtime {
@@ -214,6 +217,7 @@ impl pallet_grandpa::Config for Runtime {
type WeightInfo = ();
type MaxAuthorities = ConstU32<32>;
+ type MaxNominators = ConstU32<0>;
type MaxSetIdSessionEntries = ConstU64<0>;
type KeyOwnerProof = sp_core::Void;
@@ -245,7 +249,7 @@ impl pallet_balances::Config for Runtime {
type WeightInfo = pallet_balances::weights::SubstrateWeight;
type FreezeIdentifier = ();
type MaxFreezes = ();
- type HoldIdentifier = ();
+ type RuntimeHoldReason = ();
type MaxHolds = ();
}
@@ -276,12 +280,7 @@ impl pallet_template::Config for Runtime {
// Create the runtime by composing the FRAME pallets that were previously configured.
construct_runtime!(
- pub struct Runtime
- where
- Block = Block,
- NodeBlock = opaque::Block,
- UncheckedExtrinsic = UncheckedExtrinsic,
- {
+ pub struct Runtime {
System: frame_system,
Timestamp: pallet_timestamp,
Aura: pallet_aura,
@@ -460,8 +459,8 @@ impl_runtime_apis! {
}
}
- impl frame_system_rpc_runtime_api::AccountNonceApi for Runtime {
- fn account_nonce(account: AccountId) -> Index {
+ impl frame_system_rpc_runtime_api::AccountNonceApi for Runtime {
+ fn account_nonce(account: AccountId) -> Nonce {
System::account_nonce(account)
}
}
diff --git a/bin/node/bench/Cargo.toml b/bin/node/bench/Cargo.toml
index b3f1434a9c27b..7703f8ed2e4e0 100644
--- a/bin/node/bench/Cargo.toml
+++ b/bin/node/bench/Cargo.toml
@@ -12,27 +12,27 @@ publish = false
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
-array-bytes = "4.1"
+array-bytes = "6.1"
clap = { version = "4.2.5", features = ["derive"] }
log = "0.4.17"
node-primitives = { version = "2.0.0", path = "../primitives" }
node-testing = { version = "3.0.0-dev", path = "../testing" }
kitchensink-runtime = { version = "3.0.0-dev", path = "../runtime" }
sc-client-api = { version = "4.0.0-dev", path = "../../../client/api/" }
-sp-runtime = { version = "7.0.0", path = "../../../primitives/runtime" }
-sp-state-machine = { version = "0.13.0", path = "../../../primitives/state-machine" }
-serde = "1.0.136"
+sp-runtime = { version = "24.0.0", path = "../../../primitives/runtime" }
+sp-state-machine = { version = "0.28.0", path = "../../../primitives/state-machine" }
+serde = "1.0.163"
serde_json = "1.0.85"
derive_more = { version = "0.99.17", default-features = false, features = ["display"] }
kvdb = "0.13.0"
kvdb-rocksdb = "0.19.0"
-sp-trie = { version = "7.0.0", path = "../../../primitives/trie" }
-sp-core = { version = "7.0.0", path = "../../../primitives/core" }
+sp-trie = { version = "22.0.0", path = "../../../primitives/trie" }
+sp-core = { version = "21.0.0", path = "../../../primitives/core" }
sp-consensus = { version = "0.10.0-dev", path = "../../../primitives/consensus/common" }
sc-basic-authorship = { version = "0.10.0-dev", path = "../../../client/basic-authorship" }
sp-inherents = { version = "4.0.0-dev", path = "../../../primitives/inherents" }
sp-timestamp = { version = "4.0.0-dev", default-features = false, path = "../../../primitives/timestamp" }
-sp-tracing = { version = "6.0.0", path = "../../../primitives/tracing" }
+sp-tracing = { version = "10.0.0", path = "../../../primitives/tracing" }
hash-db = "0.16.0"
tempfile = "3.1.0"
fs_extra = "1"
diff --git a/bin/node/bench/src/construct.rs b/bin/node/bench/src/construct.rs
index ec2a829f692a6..4f3ca07f86b9d 100644
--- a/bin/node/bench/src/construct.rs
+++ b/bin/node/bench/src/construct.rs
@@ -28,7 +28,7 @@ use futures::Future;
use std::{borrow::Cow, collections::HashMap, pin::Pin, sync::Arc};
use node_primitives::Block;
-use node_testing::bench::{BenchDb, BlockType, DatabaseType, KeyTypes, Profile};
+use node_testing::bench::{BenchDb, BlockType, DatabaseType, KeyTypes};
use sc_transaction_pool_api::{
ImportNotificationStream, PoolFuture, PoolStatus, ReadyTransactions, TransactionFor,
TransactionSource, TransactionStatusStreamFor, TxHash,
@@ -43,7 +43,6 @@ use crate::{
};
pub struct ConstructionBenchmarkDescription {
- pub profile: Profile,
pub key_types: KeyTypes,
pub block_type: BlockType,
pub size: SizeType,
@@ -51,7 +50,6 @@ pub struct ConstructionBenchmarkDescription {
}
pub struct ConstructionBenchmark {
- profile: Profile,
database: BenchDb,
transactions: Transactions,
}
@@ -60,11 +58,6 @@ impl core::BenchmarkDescription for ConstructionBenchmarkDescription {
fn path(&self) -> Path {
let mut path = Path::new(&["node", "proposer"]);
- match self.profile {
- Profile::Wasm => path.push("wasm"),
- Profile::Native => path.push("native"),
- }
-
match self.key_types {
KeyTypes::Sr25519 => path.push("sr25519"),
KeyTypes::Ed25519 => path.push("ed25519"),
@@ -99,7 +92,6 @@ impl core::BenchmarkDescription for ConstructionBenchmarkDescription {
}
Box::new(ConstructionBenchmark {
- profile: self.profile,
database: bench_db,
transactions: Transactions(extrinsics),
})
@@ -107,8 +99,8 @@ impl core::BenchmarkDescription for ConstructionBenchmarkDescription {
fn name(&self) -> Cow<'static, str> {
format!(
- "Block construction ({:?}/{}, {:?}, {:?} backend)",
- self.block_type, self.size, self.profile, self.database_type,
+ "Block construction ({:?}/{}, {:?} backend)",
+ self.block_type, self.size, self.database_type,
)
.into()
}
@@ -116,7 +108,7 @@ impl core::BenchmarkDescription for ConstructionBenchmarkDescription {
impl core::Benchmark for ConstructionBenchmark {
fn run(&mut self, mode: Mode) -> std::time::Duration {
- let context = self.database.create_context(self.profile);
+ let context = self.database.create_context();
let _ = context
.client
diff --git a/bin/node/bench/src/import.rs b/bin/node/bench/src/import.rs
index 167377ea9a220..78b280076e0bd 100644
--- a/bin/node/bench/src/import.rs
+++ b/bin/node/bench/src/import.rs
@@ -33,7 +33,7 @@
use std::borrow::Cow;
use node_primitives::Block;
-use node_testing::bench::{BenchDb, BlockType, DatabaseType, KeyTypes, Profile};
+use node_testing::bench::{BenchDb, BlockType, DatabaseType, KeyTypes};
use sc_client_api::backend::Backend;
use sp_state_machine::InspectState;
@@ -43,7 +43,6 @@ use crate::{
};
pub struct ImportBenchmarkDescription {
- pub profile: Profile,
pub key_types: KeyTypes,
pub block_type: BlockType,
pub size: SizeType,
@@ -51,7 +50,6 @@ pub struct ImportBenchmarkDescription {
}
pub struct ImportBenchmark {
- profile: Profile,
database: BenchDb,
block: Block,
block_type: BlockType,
@@ -61,11 +59,6 @@ impl core::BenchmarkDescription for ImportBenchmarkDescription {
fn path(&self) -> Path {
let mut path = Path::new(&["node", "import"]);
- match self.profile {
- Profile::Wasm => path.push("wasm"),
- Profile::Native => path.push("native"),
- }
-
match self.key_types {
KeyTypes::Sr25519 => path.push("sr25519"),
KeyTypes::Ed25519 => path.push("ed25519"),
@@ -88,21 +81,15 @@ impl core::BenchmarkDescription for ImportBenchmarkDescription {
}
fn setup(self: Box) -> Box {
- let profile = self.profile;
let mut bench_db = BenchDb::with_key_types(self.database_type, 50_000, self.key_types);
let block = bench_db.generate_block(self.block_type.to_content(self.size.transactions()));
- Box::new(ImportBenchmark {
- database: bench_db,
- block_type: self.block_type,
- block,
- profile,
- })
+ Box::new(ImportBenchmark { database: bench_db, block_type: self.block_type, block })
}
fn name(&self) -> Cow<'static, str> {
format!(
- "Block import ({:?}/{}, {:?}, {:?} backend)",
- self.block_type, self.size, self.profile, self.database_type,
+ "Block import ({:?}/{}, {:?} backend)",
+ self.block_type, self.size, self.database_type,
)
.into()
}
@@ -110,7 +97,7 @@ impl core::BenchmarkDescription for ImportBenchmarkDescription {
impl core::Benchmark for ImportBenchmark {
fn run(&mut self, mode: Mode) -> std::time::Duration {
- let mut context = self.database.create_context(self.profile);
+ let mut context = self.database.create_context();
let _ = context
.client
diff --git a/bin/node/bench/src/main.rs b/bin/node/bench/src/main.rs
index 051d8ddb9bf55..1f69c97695801 100644
--- a/bin/node/bench/src/main.rs
+++ b/bin/node/bench/src/main.rs
@@ -30,7 +30,7 @@ mod txpool;
use clap::Parser;
-use node_testing::bench::{BlockType, DatabaseType as BenchDataBaseType, KeyTypes, Profile};
+use node_testing::bench::{BlockType, DatabaseType as BenchDataBaseType, KeyTypes};
use crate::{
common::SizeType,
@@ -85,31 +85,28 @@ fn main() {
let mut import_benchmarks = Vec::new();
- for profile in [Profile::Wasm, Profile::Native] {
- for size in [
- SizeType::Empty,
- SizeType::Small,
- SizeType::Medium,
- SizeType::Large,
- SizeType::Full,
- SizeType::Custom(opt.transactions.unwrap_or(0)),
+ for size in [
+ SizeType::Empty,
+ SizeType::Small,
+ SizeType::Medium,
+ SizeType::Large,
+ SizeType::Full,
+ SizeType::Custom(opt.transactions.unwrap_or(0)),
+ ] {
+ for block_type in [
+ BlockType::RandomTransfersKeepAlive,
+ BlockType::RandomTransfersReaping,
+ BlockType::Noop,
] {
- for block_type in [
- BlockType::RandomTransfersKeepAlive,
- BlockType::RandomTransfersReaping,
- BlockType::Noop,
- ] {
- for database_type in [BenchDataBaseType::RocksDb, BenchDataBaseType::ParityDb] {
- import_benchmarks.push((profile, size, block_type, database_type));
- }
+ for database_type in [BenchDataBaseType::RocksDb, BenchDataBaseType::ParityDb] {
+ import_benchmarks.push((size, block_type, database_type));
}
}
}
let benchmarks = matrix!(
- (profile, size, block_type, database_type) in import_benchmarks.into_iter() =>
+ (size, block_type, database_type) in import_benchmarks.into_iter() =>
ImportBenchmarkDescription {
- profile,
key_types: KeyTypes::Sr25519,
size,
block_type,
@@ -138,14 +135,12 @@ fn main() {
.iter().map(move |db_type| (size, db_type)))
=> TrieWriteBenchmarkDescription { database_size: *size, database_type: *db_type },
ConstructionBenchmarkDescription {
- profile: Profile::Wasm,
key_types: KeyTypes::Sr25519,
block_type: BlockType::RandomTransfersKeepAlive,
size: SizeType::Medium,
database_type: BenchDataBaseType::RocksDb,
},
ConstructionBenchmarkDescription {
- profile: Profile::Wasm,
key_types: KeyTypes::Sr25519,
block_type: BlockType::RandomTransfersKeepAlive,
size: SizeType::Large,
diff --git a/bin/node/bench/src/tempdb.rs b/bin/node/bench/src/tempdb.rs
index 2aafd013a586a..f3fd693d21fe1 100644
--- a/bin/node/bench/src/tempdb.rs
+++ b/bin/node/bench/src/tempdb.rs
@@ -90,7 +90,7 @@ impl TempDatabase {
},
DatabaseType::ParityDb => Arc::new(ParityDbWrapper({
let mut options = parity_db::Options::with_columns(self.0.path(), 1);
- let mut column_options = &mut options.columns[0];
+ let column_options = &mut options.columns[0];
column_options.ref_counted = true;
column_options.preimage = true;
column_options.uniform = true;
diff --git a/bin/node/bench/src/txpool.rs b/bin/node/bench/src/txpool.rs
index 4e8e5c0d9a4fd..a3524ac5bc890 100644
--- a/bin/node/bench/src/txpool.rs
+++ b/bin/node/bench/src/txpool.rs
@@ -23,7 +23,7 @@
use std::borrow::Cow;
-use node_testing::bench::{BenchDb, BlockType, DatabaseType, KeyTypes, Profile};
+use node_testing::bench::{BenchDb, BlockType, DatabaseType, KeyTypes};
use sc_transaction_pool::BasicPool;
use sc_transaction_pool_api::{TransactionPool, TransactionSource};
@@ -57,7 +57,7 @@ impl core::BenchmarkDescription for PoolBenchmarkDescription {
impl core::Benchmark for PoolBenchmark {
fn run(&mut self, mode: Mode) -> std::time::Duration {
- let context = self.database.create_context(Profile::Wasm);
+ let context = self.database.create_context();
let _ = context
.client
diff --git a/bin/node/cli/Cargo.toml b/bin/node/cli/Cargo.toml
index ca9b25b6e75f3..37f03fbb0dd7e 100644
--- a/bin/node/cli/Cargo.toml
+++ b/bin/node/cli/Cargo.toml
@@ -6,7 +6,7 @@ description = "Generic Substrate node implementation in Rust."
build = "build.rs"
edition = "2021"
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
-default-run = "substrate"
+default-run = "substrate-node"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
publish = false
@@ -25,8 +25,10 @@ maintenance = { status = "actively-developed" }
is-it-maintained-issue-resolution = { repository = "paritytech/substrate" }
is-it-maintained-open-issues = { repository = "paritytech/substrate" }
+# The same node binary as the `substrate` (defined in the workspace `Cargo.toml`) binary,
+# but just exposed by this crate here.
[[bin]]
-name = "substrate"
+name = "substrate-node"
path = "bin/main.rs"
required-features = ["cli"]
@@ -35,10 +37,10 @@ crate-type = ["cdylib", "rlib"]
[dependencies]
# third-party dependencies
-array-bytes = "4.1"
+array-bytes = "6.1"
clap = { version = "4.2.5", features = ["derive"], optional = true }
-codec = { package = "parity-scale-codec", version = "3.2.2" }
-serde = { version = "1.0.136", features = ["derive"] }
+codec = { package = "parity-scale-codec", version = "3.6.1" }
+serde = { version = "1.0.163", features = ["derive"] }
jsonrpsee = { version = "0.16.2", features = ["server"] }
futures = "0.3.21"
log = "0.4.17"
@@ -49,16 +51,16 @@ sp-authority-discovery = { version = "4.0.0-dev", path = "../../../primitives/au
sp-consensus-babe = { version = "0.10.0-dev", path = "../../../primitives/consensus/babe" }
grandpa-primitives = { version = "4.0.0-dev", package = "sp-consensus-grandpa", path = "../../../primitives/consensus/grandpa" }
sp-api = { version = "4.0.0-dev", path = "../../../primitives/api" }
-sp-core = { version = "7.0.0", path = "../../../primitives/core" }
-sp-runtime = { version = "7.0.0", path = "../../../primitives/runtime" }
+sp-core = { version = "21.0.0", path = "../../../primitives/core" }
+sp-runtime = { version = "24.0.0", path = "../../../primitives/runtime" }
sp-timestamp = { version = "4.0.0-dev", path = "../../../primitives/timestamp" }
sp-inherents = { version = "4.0.0-dev", path = "../../../primitives/inherents" }
-sp-keyring = { version = "7.0.0", path = "../../../primitives/keyring" }
-sp-keystore = { version = "0.13.0", path = "../../../primitives/keystore" }
+sp-keyring = { version = "24.0.0", path = "../../../primitives/keyring" }
+sp-keystore = { version = "0.27.0", path = "../../../primitives/keystore" }
sp-consensus = { version = "0.10.0-dev", path = "../../../primitives/consensus/common" }
-sp-transaction-pool = { version = "4.0.0-dev", path = "../../../primitives/transaction-pool" }
sp-transaction-storage-proof = { version = "4.0.0-dev", path = "../../../primitives/transaction-storage-proof" }
sp-io = { path = "../../../primitives/io" }
+sp-statement-store = { path = "../../../primitives/statement-store" }
# client dependencies
sc-client-api = { version = "4.0.0-dev", path = "../../../client/api" }
@@ -83,13 +85,14 @@ sc-authority-discovery = { version = "0.10.0-dev", path = "../../../client/autho
sc-sync-state-rpc = { version = "0.10.0-dev", path = "../../../client/sync-state-rpc" }
sc-sysinfo = { version = "6.0.0-dev", path = "../../../client/sysinfo" }
sc-storage-monitor = { version = "0.1.0", path = "../../../client/storage-monitor" }
+sc-offchain = { version = "4.0.0-dev", path = "../../../client/offchain" }
# frame dependencies
frame-system = { version = "4.0.0-dev", path = "../../../frame/system" }
frame-system-rpc-runtime-api = { version = "4.0.0-dev", path = "../../../frame/system/rpc/runtime-api" }
-pallet-transaction-payment = { version = "4.0.0-dev", path = "../../../frame/transaction-payment" }
pallet-assets = { version = "4.0.0-dev", path = "../../../frame/assets/" }
-pallet-asset-tx-payment = { version = "4.0.0-dev", path = "../../../frame/transaction-payment/asset-tx-payment/" }
+pallet-asset-conversion-tx-payment = { version = "4.0.0-dev", path = "../../../frame/transaction-payment/asset-conversion-tx-payment" }
+pallet-asset-tx-payment = { version = "4.0.0-dev", path = "../../../frame/transaction-payment/asset-tx-payment" }
pallet-im-online = { version = "4.0.0-dev", default-features = false, path = "../../../frame/im-online" }
# node-specific dependencies
@@ -113,7 +116,7 @@ sc-consensus-babe = { version = "0.10.0-dev", path = "../../../client/consensus/
sc-consensus-epochs = { version = "0.10.0-dev", path = "../../../client/consensus/epochs" }
sc-service-test = { version = "2.0.0", path = "../../../client/service/test" }
sc-block-builder = { version = "0.10.0-dev", path = "../../../client/block-builder" }
-sp-tracing = { version = "6.0.0", path = "../../../primitives/tracing" }
+sp-tracing = { version = "10.0.0", path = "../../../primitives/tracing" }
sp-blockchain = { version = "4.0.0-dev", path = "../../../primitives/blockchain" }
futures = "0.3.21"
tempfile = "3.1.0"
@@ -121,7 +124,7 @@ assert_cmd = "2.0.2"
nix = { version = "0.26.1", features = ["signal"] }
serde_json = "1.0"
regex = "1.6.0"
-platforms = "2.0"
+platforms = "3.0"
soketto = "0.7.1"
criterion = { version = "0.4.0", features = ["async_tokio"] }
tokio = { version = "1.22.0", features = ["macros", "time", "parking_lot"] }
@@ -158,11 +161,32 @@ cli = [
]
runtime-benchmarks = [
"kitchensink-runtime/runtime-benchmarks",
- "frame-benchmarking-cli/runtime-benchmarks"
+ "frame-benchmarking-cli/runtime-benchmarks",
+ "frame-system/runtime-benchmarks",
+ "pallet-asset-tx-payment/runtime-benchmarks",
+ "pallet-assets/runtime-benchmarks",
+ "pallet-balances/runtime-benchmarks",
+ "pallet-im-online/runtime-benchmarks",
+ "pallet-timestamp/runtime-benchmarks",
+ "sc-client-db/runtime-benchmarks",
+ "sc-service/runtime-benchmarks",
+ "sp-runtime/runtime-benchmarks"
]
# Enable features that allow the runtime to be tried and debugged. Name might be subject to change
# in the near future.
-try-runtime = ["kitchensink-runtime/try-runtime", "try-runtime-cli/try-runtime"]
+try-runtime = [
+ "kitchensink-runtime/try-runtime",
+ "try-runtime-cli/try-runtime",
+ "frame-system/try-runtime",
+ "pallet-asset-conversion-tx-payment/try-runtime",
+ "pallet-asset-tx-payment/try-runtime",
+ "pallet-assets/try-runtime",
+ "pallet-balances/try-runtime",
+ "pallet-im-online/try-runtime",
+ "pallet-timestamp/try-runtime",
+ "sp-runtime/try-runtime",
+ "substrate-cli-test-utils/try-runtime"
+]
[[bench]]
name = "transaction_pool"
diff --git a/bin/node/cli/benches/block_production.rs b/bin/node/cli/benches/block_production.rs
index 527b145c62c46..b877aa7350228 100644
--- a/bin/node/cli/benches/block_production.rs
+++ b/bin/node/cli/benches/block_production.rs
@@ -21,7 +21,6 @@ use criterion::{criterion_group, criterion_main, BatchSize, Criterion, Throughpu
use kitchensink_runtime::{constants::currency::*, BalancesCall};
use node_cli::service::{create_extrinsic, FullClient};
use sc_block_builder::{BlockBuilderProvider, BuiltBlock, RecordProof};
-use sc_client_api::execution_extensions::ExecutionStrategies;
use sc_consensus::{
block_import::{BlockImportParams, ForkChoiceStrategy},
BlockImport, StateAction,
@@ -56,9 +55,6 @@ fn new_node(tokio_handle: Handle) -> node_cli::service::NewFullBase {
let spec = Box::new(node_cli::chain_spec::development_config());
- // NOTE: We enforce the use of the WASM runtime to benchmark block production using WASM.
- let execution_strategy = sc_client_api::ExecutionStrategy::AlwaysWasm;
-
let config = Configuration {
impl_name: "BenchmarkImpl".into(),
impl_version: "1.0".into(),
@@ -77,13 +73,6 @@ fn new_node(tokio_handle: Handle) -> node_cli::service::NewFullBase {
wasm_method: WasmExecutionMethod::Compiled {
instantiation_strategy: WasmtimeInstantiationStrategy::PoolingCopyOnWrite,
},
- execution_strategies: ExecutionStrategies {
- syncing: execution_strategy,
- importing: execution_strategy,
- block_construction: execution_strategy,
- offchain_worker: execution_strategy,
- other: execution_strategy,
- },
rpc_addr: None,
rpc_max_connections: Default::default(),
rpc_cors: None,
@@ -123,13 +112,7 @@ fn extrinsic_set_time(now: u64) -> OpaqueExtrinsic {
.into()
}
-fn import_block(
- mut client: &FullClient,
- built: BuiltBlock<
- node_primitives::Block,
- >::StateBackend,
- >,
-) {
+fn import_block(mut client: &FullClient, built: BuiltBlock) {
let mut params = BlockImportParams::new(BlockOrigin::File, built.block.header);
params.state_action =
StateAction::ApplyChanges(sc_consensus::StorageChanges::Changes(built.storage_changes));
diff --git a/bin/node/cli/benches/transaction_pool.rs b/bin/node/cli/benches/transaction_pool.rs
index 44ebe1e7d4fe6..d3e8c02a958f7 100644
--- a/bin/node/cli/benches/transaction_pool.rs
+++ b/bin/node/cli/benches/transaction_pool.rs
@@ -23,7 +23,6 @@ use futures::{future, StreamExt};
use kitchensink_runtime::{constants::currency::*, BalancesCall, SudoCall};
use node_cli::service::{create_extrinsic, fetch_nonce, FullClient, TransactionPool};
use node_primitives::AccountId;
-use sc_client_api::execution_extensions::ExecutionStrategies;
use sc_service::{
config::{
BlocksPruning, DatabaseSource, KeystoreConfig, NetworkConfiguration, OffchainWorkerConfig,
@@ -70,14 +69,6 @@ fn new_node(tokio_handle: Handle) -> node_cli::service::NewFullBase {
blocks_pruning: BlocksPruning::KeepAll,
chain_spec: spec,
wasm_method: Default::default(),
- // NOTE: we enforce the use of the native runtime to make the errors more debuggable
- execution_strategies: ExecutionStrategies {
- syncing: sc_client_api::ExecutionStrategy::NativeWhenPossible,
- importing: sc_client_api::ExecutionStrategy::NativeWhenPossible,
- block_construction: sc_client_api::ExecutionStrategy::NativeWhenPossible,
- offchain_worker: sc_client_api::ExecutionStrategy::NativeWhenPossible,
- other: sc_client_api::ExecutionStrategy::NativeWhenPossible,
- },
rpc_addr: None,
rpc_max_connections: Default::default(),
rpc_cors: None,
diff --git a/bin/node/cli/build.rs b/bin/node/cli/build.rs
index 18860a1afafb7..033f1e3349e6f 100644
--- a/bin/node/cli/build.rs
+++ b/bin/node/cli/build.rs
@@ -37,14 +37,14 @@ mod cli {
rerun_if_git_head_changed();
}
- /// Build shell completion scripts for all known shells
+ /// Build shell completion scripts for all known shells.
fn build_shell_completion() {
for shell in Shell::value_variants() {
build_completion(shell);
}
}
- /// Build the shell auto-completion for a given Shell
+ /// Build the shell auto-completion for a given Shell.
fn build_completion(shell: &Shell) {
let outdir = match env::var_os("OUT_DIR") {
None => return,
diff --git a/bin/node/cli/doc/shell-completion.adoc b/bin/node/cli/doc/shell-completion.adoc
index 8afbd37adb9f4..168f00994fb2d 100644
--- a/bin/node/cli/doc/shell-completion.adoc
+++ b/bin/node/cli/doc/shell-completion.adoc
@@ -1,7 +1,7 @@
== Shell completion
-The Substrate cli command supports shell auto-completion. For this to work, you will need to run the completion script matching you build and system.
+The Substrate cli command supports shell auto-completion. For this to work, you will need to run the completion script matching your build and system.
Assuming you built a release version using `cargo build --release` and use `bash` run the following:
@@ -15,7 +15,7 @@ You can find completion scripts for:
- elvish
- powershell
-To make this change persistent, you can proceed as follow:
+To make this change persistent, you can proceed as follows:
.First install
@@ -30,7 +30,7 @@ source $HOME/.bash_profile
.Update
-When you build a new version of Substrate, the following will ensure you auto-completion script matches the current binary:
+When you build a new version of Substrate, the following will ensure your auto-completion script matches the current binary:
[source, shell]
----
diff --git a/bin/node/cli/src/chain_spec.rs b/bin/node/cli/src/chain_spec.rs
index 85a08e71cc5a9..57d367e7c49a8 100644
--- a/bin/node/cli/src/chain_spec.rs
+++ b/bin/node/cli/src/chain_spec.rs
@@ -20,11 +20,10 @@
use grandpa_primitives::AuthorityId as GrandpaId;
use kitchensink_runtime::{
- constants::currency::*, wasm_binary_unwrap, AuthorityDiscoveryConfig, BabeConfig,
- BalancesConfig, Block, CouncilConfig, DemocracyConfig, ElectionsConfig, GrandpaConfig,
- ImOnlineConfig, IndicesConfig, MaxNominations, NominationPoolsConfig, SessionConfig,
- SessionKeys, SocietyConfig, StakerStatus, StakingConfig, SudoConfig, SystemConfig,
- TechnicalCommitteeConfig,
+ constants::currency::*, wasm_binary_unwrap, BabeConfig, BalancesConfig, Block, CouncilConfig,
+ DemocracyConfig, ElectionsConfig, ImOnlineConfig, IndicesConfig, MaxNominations,
+ NominationPoolsConfig, SessionConfig, SessionKeys, SocietyConfig, StakerStatus, StakingConfig,
+ SudoConfig, SystemConfig, TechnicalCommitteeConfig,
};
use pallet_im_online::sr25519::AuthorityId as ImOnlineId;
use sc_chain_spec::ChainSpecExtension;
@@ -39,7 +38,7 @@ use sp_runtime::{
Perbill,
};
-pub use kitchensink_runtime::GenesisConfig;
+pub use kitchensink_runtime::RuntimeGenesisConfig;
pub use node_primitives::{AccountId, Balance, Signature};
type AccountPublic = ::Signer;
@@ -62,7 +61,7 @@ pub struct Extensions {
}
/// Specialized `ChainSpec`.
-pub type ChainSpec = sc_service::GenericChainSpec;
+pub type ChainSpec = sc_service::GenericChainSpec;
/// Flaming Fir testnet generator
pub fn flaming_fir_config() -> Result {
ChainSpec::from_json_bytes(&include_bytes!("../res/flaming-fir.json")[..])
@@ -77,7 +76,7 @@ fn session_keys(
SessionKeys { grandpa, babe, im_online, authority_discovery }
}
-fn staging_testnet_config_genesis() -> GenesisConfig {
+fn staging_testnet_config_genesis() -> RuntimeGenesisConfig {
#[rustfmt::skip]
// stash, controller, session-key
// generated with secret:
@@ -200,14 +199,14 @@ pub fn staging_testnet_config() -> ChainSpec {
)
}
-/// Helper function to generate a crypto pair from seed
+/// Helper function to generate a crypto pair from seed.
pub fn get_from_seed(seed: &str) -> ::Public {
TPublic::Pair::from_string(&format!("//{}", seed), None)
.expect("static values are valid; qed")
.public()
}
-/// Helper function to generate an account ID from seed
+/// Helper function to generate an account ID from seed.
pub fn get_account_id_from_seed(seed: &str) -> AccountId
where
AccountPublic: From<::Public>,
@@ -215,7 +214,7 @@ where
AccountPublic::from(get_from_seed::(seed)).into_account()
}
-/// Helper function to generate stash, controller and session key from seed
+/// Helper function to generate stash, controller and session key from seed.
pub fn authority_keys_from_seed(
seed: &str,
) -> (AccountId, AccountId, GrandpaId, BabeId, ImOnlineId, AuthorityDiscoveryId) {
@@ -229,7 +228,7 @@ pub fn authority_keys_from_seed(
)
}
-/// Helper function to create GenesisConfig for testing
+/// Helper function to create RuntimeGenesisConfig for testing.
pub fn testnet_genesis(
initial_authorities: Vec<(
AccountId,
@@ -242,7 +241,7 @@ pub fn testnet_genesis(
initial_nominators: Vec,
root_key: AccountId,
endowed_accounts: Option>,
-) -> GenesisConfig {
+) -> RuntimeGenesisConfig {
let mut endowed_accounts: Vec = endowed_accounts.unwrap_or_else(|| {
vec![
get_account_id_from_seed::("Alice"),
@@ -294,8 +293,8 @@ pub fn testnet_genesis(
const ENDOWMENT: Balance = 10_000_000 * DOLLARS;
const STASH: Balance = ENDOWMENT / 1000;
- GenesisConfig {
- system: SystemConfig { code: wasm_binary_unwrap().to_vec() },
+ RuntimeGenesisConfig {
+ system: SystemConfig { code: wasm_binary_unwrap().to_vec(), ..Default::default() },
balances: BalancesConfig {
balances: endowed_accounts.iter().cloned().map(|x| (x, ENDOWMENT)).collect(),
},
@@ -340,29 +339,22 @@ pub fn testnet_genesis(
},
sudo: SudoConfig { key: Some(root_key) },
babe: BabeConfig {
- authorities: vec![],
epoch_config: Some(kitchensink_runtime::BABE_GENESIS_EPOCH_CONFIG),
+ ..Default::default()
},
im_online: ImOnlineConfig { keys: vec![] },
- authority_discovery: AuthorityDiscoveryConfig { keys: vec![] },
- grandpa: GrandpaConfig { authorities: vec![] },
+ authority_discovery: Default::default(),
+ grandpa: Default::default(),
technical_membership: Default::default(),
treasury: Default::default(),
- society: SocietyConfig {
- members: endowed_accounts
- .iter()
- .take((num_endowed_accounts + 1) / 2)
- .cloned()
- .collect(),
- pot: 0,
- max_members: 999,
- },
+ society: SocietyConfig { pot: 0 },
vesting: Default::default(),
assets: pallet_assets::GenesisConfig {
// This asset is used by the NIS pallet as counterpart currency.
assets: vec![(9, get_account_id_from_seed::("Alice"), true, 1)],
..Default::default()
},
+ pool_assets: Default::default(),
transaction_storage: Default::default(),
transaction_payment: Default::default(),
alliance: Default::default(),
@@ -372,10 +364,11 @@ pub fn testnet_genesis(
min_join_bond: 1 * DOLLARS,
..Default::default()
},
+ glutton: Default::default(),
}
}
-fn development_config_genesis() -> GenesisConfig {
+fn development_config_genesis() -> RuntimeGenesisConfig {
testnet_genesis(
vec![authority_keys_from_seed("Alice")],
vec![],
@@ -384,7 +377,7 @@ fn development_config_genesis() -> GenesisConfig {
)
}
-/// Development config (single validator Alice)
+/// Development config (single validator Alice).
pub fn development_config() -> ChainSpec {
ChainSpec::from_genesis(
"Development",
@@ -400,7 +393,7 @@ pub fn development_config() -> ChainSpec {
)
}
-fn local_testnet_genesis() -> GenesisConfig {
+fn local_testnet_genesis() -> RuntimeGenesisConfig {
testnet_genesis(
vec![authority_keys_from_seed("Alice"), authority_keys_from_seed("Bob")],
vec![],
@@ -409,7 +402,7 @@ fn local_testnet_genesis() -> GenesisConfig {
)
}
-/// Local testnet config (multivalidator Alice + Bob)
+/// Local testnet config (multivalidator Alice + Bob).
pub fn local_testnet_config() -> ChainSpec {
ChainSpec::from_genesis(
"Local Testnet",
@@ -432,7 +425,7 @@ pub(crate) mod tests {
use sc_service_test;
use sp_runtime::BuildStorage;
- fn local_testnet_genesis_instant_single() -> GenesisConfig {
+ fn local_testnet_genesis_instant_single() -> RuntimeGenesisConfig {
testnet_genesis(
vec![authority_keys_from_seed("Alice")],
vec![],
@@ -441,7 +434,7 @@ pub(crate) mod tests {
)
}
- /// Local testnet config (single validator - Alice)
+ /// Local testnet config (single validator - Alice).
pub fn integration_test_config_with_single_authority() -> ChainSpec {
ChainSpec::from_genesis(
"Integration Test",
@@ -457,7 +450,7 @@ pub(crate) mod tests {
)
}
- /// Local testnet config (multivalidator Alice + Bob)
+ /// Local testnet config (multivalidator Alice + Bob).
pub fn integration_test_config_with_two_authorities() -> ChainSpec {
ChainSpec::from_genesis(
"Integration Test",
diff --git a/bin/node/cli/src/cli.rs b/bin/node/cli/src/cli.rs
index 35b949831141d..4e0d6303870cb 100644
--- a/bin/node/cli/src/cli.rs
+++ b/bin/node/cli/src/cli.rs
@@ -57,12 +57,9 @@ pub enum Subcommand {
#[command(subcommand)]
Benchmark(frame_benchmarking_cli::BenchmarkCmd),
- /// Try some command against runtime state.
- #[cfg(feature = "try-runtime")]
- TryRuntime(try_runtime_cli::TryRuntimeCmd),
-
- /// Try some command against runtime state. Note: `try-runtime` feature must be enabled.
- #[cfg(not(feature = "try-runtime"))]
+ /// Try-runtime has migrated to a standalone CLI
+ /// (). The subcommand exists as a stub and
+ /// deprecation notice. It will be removed entirely some time after Janurary 2024.
TryRuntime,
/// Key management cli utilities
diff --git a/bin/node/cli/src/command.rs b/bin/node/cli/src/command.rs
index b38b25d8fb3ad..8fb413dba1778 100644
--- a/bin/node/cli/src/command.rs
+++ b/bin/node/cli/src/command.rs
@@ -26,18 +26,12 @@ use frame_benchmarking_cli::*;
use kitchensink_runtime::{ExistentialDeposit, RuntimeApi};
use node_executor::ExecutorDispatch;
use node_primitives::Block;
-use sc_cli::{ChainSpec, Result, RuntimeVersion, SubstrateCli};
+use sc_cli::{Result, SubstrateCli};
use sc_service::PartialComponents;
use sp_keyring::Sr25519Keyring;
use std::sync::Arc;
-#[cfg(feature = "try-runtime")]
-use {
- kitchensink_runtime::constants::time::SLOT_DURATION,
- try_runtime_cli::block_building_info::substrate_info,
-};
-
impl SubstrateCli for Cli {
fn impl_name() -> String {
"Substrate Node".into()
@@ -79,10 +73,6 @@ impl SubstrateCli for Cli {
};
Ok(spec)
}
-
- fn native_runtime_version(_: &Box) -> &'static RuntimeVersion {
- &kitchensink_runtime::VERSION
- }
}
/// Parse command line arguments into service configuration.
@@ -117,7 +107,7 @@ pub fn run() -> Result<()> {
)
}
- cmd.run::(config)
+ cmd.run::(config)
},
BenchmarkCmd::Block(cmd) => {
// ensure that we keep the task manager alive
@@ -231,28 +221,7 @@ pub fn run() -> Result<()> {
})
},
#[cfg(feature = "try-runtime")]
- Some(Subcommand::TryRuntime(cmd)) => {
- use sc_executor::{sp_wasm_interface::ExtendedHostFunctions, NativeExecutionDispatch};
- let runner = cli.create_runner(cmd)?;
- runner.async_run(|config| {
- // we don't need any of the components of new_partial, just a runtime, or a task
- // manager to do `async_run`.
- let registry = config.prometheus_config.as_ref().map(|cfg| &cfg.registry);
- let task_manager =
- sc_service::TaskManager::new(config.tokio_handle.clone(), registry)
- .map_err(|e| sc_cli::Error::Service(sc_service::Error::Prometheus(e)))?;
-
- let info_provider = substrate_info(SLOT_DURATION);
-
- Ok((
- cmd.run::::ExtendHostFunctions,
- >, _>(Some(info_provider)),
- task_manager,
- ))
- })
- },
+ Some(Subcommand::TryRuntime) => Err(try_runtime_cli::DEPRECATION_NOTICE.into()),
#[cfg(not(feature = "try-runtime"))]
Some(Subcommand::TryRuntime) => Err("TryRuntime wasn't enabled when building the node. \
You can enable it with `--features try-runtime`."
diff --git a/bin/node/cli/src/service.rs b/bin/node/cli/src/service.rs
index 8fc44c7c5eddf..ecca5c60db515 100644
--- a/bin/node/cli/src/service.rs
+++ b/bin/node/cli/src/service.rs
@@ -28,7 +28,7 @@ use futures::prelude::*;
use kitchensink_runtime::RuntimeApi;
use node_executor::ExecutorDispatch;
use node_primitives::Block;
-use sc_client_api::BlockBackend;
+use sc_client_api::{Backend, BlockBackend};
use sc_consensus_babe::{self, SlotProportion};
use sc_executor::NativeElseWasmExecutor;
use sc_network::{event::Event, NetworkEventStream, NetworkService};
@@ -37,6 +37,7 @@ use sc_network_sync::SyncingService;
use sc_service::{config::Configuration, error::Error as ServiceError, RpcHandlers, TaskManager};
use sc_statement_store::Store as StatementStore;
use sc_telemetry::{Telemetry, TelemetryWorker};
+use sc_transaction_pool_api::OffchainTransactionPoolFactory;
use sp_api::ProvideRuntimeApi;
use sp_core::crypto::Pair;
use sp_runtime::{generic, traits::Block as BlockT, SaturatedConversion};
@@ -50,9 +51,13 @@ type FullSelectChain = sc_consensus::LongestChain;
type FullGrandpaBlockImport =
grandpa::GrandpaBlockImport;
-/// The transaction pool type defintion.
+/// The transaction pool type definition.
pub type TransactionPool = sc_transaction_pool::FullPool;
+/// The minimum period of blocks on which justifications will be
+/// imported and generated.
+const GRANDPA_JUSTIFICATION_PERIOD: u32 = 512;
+
/// Fetch the nonce of the given `account` from the chain state.
///
/// Note: Should only be used for tests.
@@ -98,7 +103,7 @@ pub fn create_extrinsic(
)),
frame_system::CheckNonce::::from(nonce),
frame_system::CheckWeight::::new(),
- pallet_asset_tx_payment::ChargeAssetTxPayment::::from(
+ pallet_asset_conversion_tx_payment::ChargeAssetTxPayment::::from(
tip, None,
),
);
@@ -135,7 +140,7 @@ pub fn new_partial(
FullClient,
FullBackend,
FullSelectChain,
- sc_consensus::DefaultImportQueue,
+ sc_consensus::DefaultImportQueue,
sc_transaction_pool::FullPool,
(
impl Fn(
@@ -192,6 +197,7 @@ pub fn new_partial(
let (grandpa_block_import, grandpa_link) = grandpa::block_import(
client.clone(),
+ GRANDPA_JUSTIFICATION_PERIOD,
&(client.clone() as Arc<_>),
select_chain.clone(),
telemetry.as_ref().map(|x| x.handle()),
@@ -205,27 +211,29 @@ pub fn new_partial(
)?;
let slot_duration = babe_link.config().slot_duration();
- let (import_queue, babe_worker_handle) = sc_consensus_babe::import_queue(
- babe_link.clone(),
- block_import.clone(),
- Some(Box::new(justification_import)),
- client.clone(),
- select_chain.clone(),
- move |_, ()| async move {
- let timestamp = sp_timestamp::InherentDataProvider::from_system_time();
+ let (import_queue, babe_worker_handle) =
+ sc_consensus_babe::import_queue(sc_consensus_babe::ImportQueueParams {
+ link: babe_link.clone(),
+ block_import: block_import.clone(),
+ justification_import: Some(Box::new(justification_import)),
+ client: client.clone(),
+ select_chain: select_chain.clone(),
+ create_inherent_data_providers: move |_, ()| async move {
+ let timestamp = sp_timestamp::InherentDataProvider::from_system_time();
- let slot =
+ let slot =
sp_consensus_babe::inherents::InherentDataProvider::from_timestamp_and_slot_duration(
*timestamp,
slot_duration,
);
- Ok((slot, timestamp))
- },
- &task_manager.spawn_essential_handle(),
- config.prometheus_registry(),
- telemetry.as_ref().map(|x| x.handle()),
- )?;
+ Ok((slot, timestamp))
+ },
+ spawner: &task_manager.spawn_essential_handle(),
+ registry: config.prometheus_registry(),
+ telemetry: telemetry.as_ref().map(|x| x.handle()),
+ offchain_tx_pool_factory: OffchainTransactionPoolFactory::new(transaction_pool.clone()),
+ })?;
let import_setup = (block_import, grandpa_link, babe_link);
@@ -233,6 +241,7 @@ pub fn new_partial(
&config.data_path,
Default::default(),
client.clone(),
+ keystore_container.local_keystore(),
config.prometheus_registry(),
&task_manager.spawn_handle(),
)
@@ -278,9 +287,10 @@ pub fn new_partial(
finality_provider: finality_proof_provider.clone(),
},
statement_store: rpc_statement_store.clone(),
+ backend: rpc_backend.clone(),
};
- node_rpc::create_full(deps, rpc_backend.clone()).map_err(Into::into)
+ node_rpc::create_full(deps).map_err(Into::into)
};
(rpc_extensions_builder, shared_voter_state2)
@@ -381,15 +391,6 @@ pub fn new_full_base(
warp_sync_params: Some(WarpSyncParams::WithProvider(warp_sync)),
})?;
- if config.offchain_worker.enabled {
- sc_service::build_offchain_workers(
- &config,
- task_manager.spawn_handle(),
- client.clone(),
- network.clone(),
- );
- }
-
let role = config.role.clone();
let force_authoring = config.force_authoring;
let backoff_authoring_blocks =
@@ -397,10 +398,11 @@ pub fn new_full_base(
let name = config.network.node_name.clone();
let enable_grandpa = !config.disable_grandpa;
let prometheus_registry = config.prometheus_registry().cloned();
+ let enable_offchain_worker = config.offchain_worker.enabled;
let rpc_handlers = sc_service::spawn_tasks(sc_service::SpawnTasksParams {
config,
- backend,
+ backend: backend.clone(),
client: client.clone(),
keystore: keystore_container.keystore(),
network: network.clone(),
@@ -525,14 +527,14 @@ pub fn new_full_base(
// need a keystore, regardless of which protocol we use below.
let keystore = if role.is_authority() { Some(keystore_container.keystore()) } else { None };
- let config = grandpa::Config {
+ let grandpa_config = grandpa::Config {
// FIXME #1578 make this available through chainspec
gossip_duration: std::time::Duration::from_millis(333),
- justification_period: 512,
+ justification_generation_period: GRANDPA_JUSTIFICATION_PERIOD,
name: Some(name),
observer_enabled: false,
keystore,
- local_role: role,
+ local_role: role.clone(),
telemetry: telemetry.as_ref().map(|x| x.handle()),
protocol_name: grandpa_protocol_name,
};
@@ -545,7 +547,7 @@ pub fn new_full_base(
// been tested extensively yet and having most nodes in a network run it
// could lead to finality stalls.
let grandpa_config = grandpa::GrandpaParams {
- config,
+ config: grandpa_config,
link: grandpa_link,
network: network.clone(),
sync: Arc::new(sync_service.clone()),
@@ -553,6 +555,7 @@ pub fn new_full_base(
voting_rule: grandpa::VotingRulesBuilder::default().build(),
prometheus_registry: prometheus_registry.clone(),
shared_voter_state,
+ offchain_tx_pool_factory: OffchainTransactionPoolFactory::new(transaction_pool.clone()),
};
// the GRANDPA voter task is considered infallible, i.e.
@@ -584,6 +587,29 @@ pub fn new_full_base(
statement_handler.run(),
);
+ if enable_offchain_worker {
+ task_manager.spawn_handle().spawn(
+ "offchain-workers-runner",
+ "offchain-work",
+ sc_offchain::OffchainWorkers::new(sc_offchain::OffchainWorkerOptions {
+ runtime_api_provider: client.clone(),
+ keystore: Some(keystore_container.keystore()),
+ offchain_db: backend.offchain_storage(),
+ transaction_pool: Some(OffchainTransactionPoolFactory::new(
+ transaction_pool.clone(),
+ )),
+ network_provider: network.clone(),
+ is_validator: role.is_authority(),
+ enable_http_requests: true,
+ custom_extensions: move |_| {
+ vec![Box::new(statement_store.clone().as_statement_store_ext()) as Box<_>]
+ },
+ })
+ .run(client.clone(), task_manager.spawn_handle())
+ .boxed(),
+ );
+ }
+
network_starter.start_network();
Ok(NewFullBase {
task_manager,
@@ -815,7 +841,8 @@ mod tests {
let check_era = frame_system::CheckEra::from(Era::Immortal);
let check_nonce = frame_system::CheckNonce::from(index);
let check_weight = frame_system::CheckWeight::new();
- let tx_payment = pallet_asset_tx_payment::ChargeAssetTxPayment::from(0, None);
+ let tx_payment =
+ pallet_asset_conversion_tx_payment::ChargeAssetTxPayment::from(0, None);
let extra = (
check_non_zero_sender,
check_spec_version,
diff --git a/bin/node/cli/tests/benchmark_block_works.rs b/bin/node/cli/tests/benchmark_block_works.rs
index 50103a66a4d40..11a1c57a713f0 100644
--- a/bin/node/cli/tests/benchmark_block_works.rs
+++ b/bin/node/cli/tests/benchmark_block_works.rs
@@ -33,13 +33,13 @@ async fn benchmark_block_works() {
common::run_node_for_a_while(base_dir.path(), &["--dev", "--no-hardware-benchmarks"]).await;
// Invoke `benchmark block` with all options to make sure that they are valid.
- let status = Command::new(cargo_bin("substrate"))
+ let status = Command::new(cargo_bin("substrate-node"))
.args(["benchmark", "block", "--dev"])
.arg("-d")
.arg(base_dir.path())
.args(["--from", "1", "--to", "1"])
.args(["--repeat", "1"])
- .args(["--execution", "wasm", "--wasm-execution", "compiled"])
+ .args(["--wasm-execution=compiled"])
.status()
.unwrap();
diff --git a/bin/node/cli/tests/benchmark_extrinsic_works.rs b/bin/node/cli/tests/benchmark_extrinsic_works.rs
index 9cdb971def522..f7addd883b41f 100644
--- a/bin/node/cli/tests/benchmark_extrinsic_works.rs
+++ b/bin/node/cli/tests/benchmark_extrinsic_works.rs
@@ -32,13 +32,14 @@ fn benchmark_extrinsic_works() {
fn benchmark_extrinsic(pallet: &str, extrinsic: &str) {
let base_dir = tempdir().expect("could not create a temp dir");
- let status = Command::new(cargo_bin("substrate"))
+ let status = Command::new(cargo_bin("substrate-node"))
.args(&["benchmark", "extrinsic", "--dev"])
.arg("-d")
.arg(base_dir.path())
.args(&["--pallet", pallet, "--extrinsic", extrinsic])
// Run with low repeats for faster execution.
.args(["--warmup=10", "--repeat=10", "--max-ext-per-block=10"])
+ .args(["--wasm-execution=compiled"])
.status()
.unwrap();
diff --git a/bin/node/cli/tests/benchmark_machine_works.rs b/bin/node/cli/tests/benchmark_machine_works.rs
index 2cdadb64603ec..b3e3f9c78dea5 100644
--- a/bin/node/cli/tests/benchmark_machine_works.rs
+++ b/bin/node/cli/tests/benchmark_machine_works.rs
@@ -22,7 +22,7 @@ use std::process::Command;
/// Tests that the `benchmark machine` command works for the substrate dev runtime.
#[test]
fn benchmark_machine_works() {
- let status = Command::new(cargo_bin("substrate"))
+ let status = Command::new(cargo_bin("substrate-node"))
.args(["benchmark", "machine", "--dev"])
.args([
"--verify-duration",
@@ -48,7 +48,7 @@ fn benchmark_machine_works() {
#[test]
#[cfg(debug_assertions)]
fn benchmark_machine_fails_with_slow_hardware() {
- let output = Command::new(cargo_bin("substrate"))
+ let output = Command::new(cargo_bin("substrate-node"))
.args(["benchmark", "machine", "--dev"])
.args([
"--verify-duration",
diff --git a/bin/node/cli/tests/benchmark_overhead_works.rs b/bin/node/cli/tests/benchmark_overhead_works.rs
index 92ab93b7f6f26..b246167f2c447 100644
--- a/bin/node/cli/tests/benchmark_overhead_works.rs
+++ b/bin/node/cli/tests/benchmark_overhead_works.rs
@@ -28,7 +28,7 @@ fn benchmark_overhead_works() {
// Only put 10 extrinsics into the block otherwise it takes forever to build it
// especially for a non-release build.
- let status = Command::new(cargo_bin("substrate"))
+ let status = Command::new(cargo_bin("substrate-node"))
.args(&["benchmark", "overhead", "--dev", "-d"])
.arg(base_path)
.arg("--weight-path")
@@ -36,6 +36,7 @@ fn benchmark_overhead_works() {
.args(["--warmup", "10", "--repeat", "10"])
.args(["--add", "100", "--mul", "1.2", "--metric", "p75"])
.args(["--max-ext-per-block", "10"])
+ .args(["--wasm-execution=compiled"])
.status()
.unwrap();
assert!(status.success());
diff --git a/bin/node/cli/tests/benchmark_pallet_works.rs b/bin/node/cli/tests/benchmark_pallet_works.rs
index 2d9946543eed2..8441333429bea 100644
--- a/bin/node/cli/tests/benchmark_pallet_works.rs
+++ b/bin/node/cli/tests/benchmark_pallet_works.rs
@@ -34,16 +34,20 @@ fn benchmark_pallet_works() {
}
fn benchmark_pallet(steps: u32, repeat: u32, should_work: bool) {
- let output = Command::new(cargo_bin("substrate"))
+ let status = Command::new(cargo_bin("substrate-node"))
.args(["benchmark", "pallet", "--dev"])
// Use the `addition` benchmark since is the fastest.
.args(["--pallet", "frame-benchmarking", "--extrinsic", "addition"])
.args(["--steps", &format!("{}", steps), "--repeat", &format!("{}", repeat)])
- .output()
+ .args([
+ "--wasm-execution=compiled",
+ "--no-storage-info",
+ "--no-median-slopes",
+ "--no-min-squares",
+ "--heap-pages=4096",
+ ])
+ .status()
.unwrap();
- if output.status.success() != should_work {
- let log = String::from_utf8_lossy(&output.stderr).to_string();
- panic!("Test failed:\n{}", log);
- }
+ assert_eq!(status.success(), should_work);
}
diff --git a/bin/node/cli/tests/benchmark_storage_works.rs b/bin/node/cli/tests/benchmark_storage_works.rs
index 953c07ca7f0db..e4566f4f9b18d 100644
--- a/bin/node/cli/tests/benchmark_storage_works.rs
+++ b/bin/node/cli/tests/benchmark_storage_works.rs
@@ -40,7 +40,7 @@ fn benchmark_storage_works() {
}
fn benchmark_storage(db: &str, base_path: &Path) -> ExitStatus {
- Command::new(cargo_bin("substrate"))
+ Command::new(cargo_bin("substrate-node"))
.args(&["benchmark", "storage", "--dev"])
.arg("--db")
.arg(db)
diff --git a/bin/node/cli/tests/build_spec_works.rs b/bin/node/cli/tests/build_spec_works.rs
index dc5d36184f0c6..ce97dea6f6c84 100644
--- a/bin/node/cli/tests/build_spec_works.rs
+++ b/bin/node/cli/tests/build_spec_works.rs
@@ -24,7 +24,7 @@ use tempfile::tempdir;
fn build_spec_works() {
let base_path = tempdir().expect("could not create a temp dir");
- let output = Command::new(cargo_bin("substrate"))
+ let output = Command::new(cargo_bin("substrate-node"))
.args(&["build-spec", "--dev", "-d"])
.arg(base_path.path())
.output()
diff --git a/bin/node/cli/tests/check_block_works.rs b/bin/node/cli/tests/check_block_works.rs
index 67bc5e6031ea0..083a79c477bab 100644
--- a/bin/node/cli/tests/check_block_works.rs
+++ b/bin/node/cli/tests/check_block_works.rs
@@ -30,7 +30,7 @@ async fn check_block_works() {
common::run_node_for_a_while(base_path.path(), &["--dev", "--no-hardware-benchmarks"]).await;
- let status = Command::new(cargo_bin("substrate"))
+ let status = Command::new(cargo_bin("substrate-node"))
.args(&["check-block", "--dev", "-d"])
.arg(base_path.path())
.arg("1")
diff --git a/bin/node/cli/tests/export_import_flow.rs b/bin/node/cli/tests/export_import_flow.rs
index b5785f99ea81f..0dc001ac43011 100644
--- a/bin/node/cli/tests/export_import_flow.rs
+++ b/bin/node/cli/tests/export_import_flow.rs
@@ -96,7 +96,7 @@ impl<'a> ExportImportRevertExecutor<'a> {
};
// Running the command and capturing the output.
- let output = Command::new(cargo_bin("substrate"))
+ let output = Command::new(cargo_bin("substrate-node"))
.args(&arguments)
.arg(&base_path)
.arg(&self.exported_blocks_file)
@@ -160,7 +160,7 @@ impl<'a> ExportImportRevertExecutor<'a> {
/// Runs the `revert` command.
fn run_revert(&self) {
- let output = Command::new(cargo_bin("substrate"))
+ let output = Command::new(cargo_bin("substrate-node"))
.args(&["revert", "--dev", "-d"])
.arg(&self.base_path.path())
.output()
diff --git a/bin/node/cli/tests/inspect_works.rs b/bin/node/cli/tests/inspect_works.rs
index 3695c318a8df2..10b0e518e9e87 100644
--- a/bin/node/cli/tests/inspect_works.rs
+++ b/bin/node/cli/tests/inspect_works.rs
@@ -30,7 +30,7 @@ async fn inspect_works() {
common::run_node_for_a_while(base_path.path(), &["--dev", "--no-hardware-benchmarks"]).await;
- let status = Command::new(cargo_bin("substrate"))
+ let status = Command::new(cargo_bin("substrate-node"))
.args(&["inspect", "--dev", "-d"])
.arg(base_path.path())
.args(&["block", "1"])
diff --git a/bin/node/cli/tests/purge_chain_works.rs b/bin/node/cli/tests/purge_chain_works.rs
index 77421f865a0d9..58c4f474521f4 100644
--- a/bin/node/cli/tests/purge_chain_works.rs
+++ b/bin/node/cli/tests/purge_chain_works.rs
@@ -29,7 +29,7 @@ async fn purge_chain_works() {
common::run_node_for_a_while(base_path.path(), &["--dev", "--no-hardware-benchmarks"]).await;
- let status = Command::new(cargo_bin("substrate"))
+ let status = Command::new(cargo_bin("substrate-node"))
.args(&["purge-chain", "--dev", "-d"])
.arg(base_path.path())
.arg("-y")
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 1308067da0256..f10ea6a055b49 100644
--- a/bin/node/cli/tests/running_the_node_and_interrupt.rs
+++ b/bin/node/cli/tests/running_the_node_and_interrupt.rs
@@ -33,7 +33,7 @@ async fn running_the_node_works_and_can_be_interrupted() {
async fn run_command_and_kill(signal: Signal) {
let base_path = tempdir().expect("could not create a temp dir");
let mut cmd = common::KillChildOnDrop(
- Command::new(cargo_bin("substrate"))
+ Command::new(cargo_bin("substrate-node"))
.stdout(process::Stdio::piped())
.stderr(process::Stdio::piped())
.args(&["--dev", "-d"])
diff --git a/bin/node/cli/tests/telemetry.rs b/bin/node/cli/tests/telemetry.rs
index 176d2e81ad06b..2321f56c473d6 100644
--- a/bin/node/cli/tests/telemetry.rs
+++ b/bin/node/cli/tests/telemetry.rs
@@ -67,7 +67,7 @@ async fn telemetry_works() {
}
});
- let mut substrate = process::Command::new(cargo_bin("substrate"));
+ let mut substrate = process::Command::new(cargo_bin("substrate-node"));
let mut substrate = KillChildOnDrop(
substrate
diff --git a/bin/node/cli/tests/temp_base_path_works.rs b/bin/node/cli/tests/temp_base_path_works.rs
index fdcd9e23dde5a..42f493afad256 100644
--- a/bin/node/cli/tests/temp_base_path_works.rs
+++ b/bin/node/cli/tests/temp_base_path_works.rs
@@ -31,7 +31,7 @@ use substrate_cli_test_utils as common;
//#[tokio::test]
async fn temp_base_path_works() {
common::run_with_timeout(Duration::from_secs(60 * 10), async move {
- let mut cmd = Command::new(cargo_bin("substrate"));
+ let mut cmd = Command::new(cargo_bin("substrate-node"));
let mut child = common::KillChildOnDrop(
cmd.args(&["--dev", "--tmp", "--no-hardware-benchmarks"])
.stdout(Stdio::piped())
diff --git a/bin/node/cli/tests/version.rs b/bin/node/cli/tests/version.rs
index e239277c9b0ed..ac1a6b79682ec 100644
--- a/bin/node/cli/tests/version.rs
+++ b/bin/node/cli/tests/version.rs
@@ -21,17 +21,17 @@ use regex::Regex;
use std::process::Command;
fn expected_regex() -> Regex {
- Regex::new(r"^substrate (.+)-([a-f\d]+)$").unwrap()
+ Regex::new(r"^substrate-node (.+)-([a-f\d]+)$").unwrap()
}
#[test]
fn version_is_full() {
let expected = expected_regex();
- let output = Command::new(cargo_bin("substrate")).args(&["--version"]).output().unwrap();
+ let output = Command::new(cargo_bin("substrate-node")).args(&["--version"]).output().unwrap();
assert!(output.status.success(), "command returned with non-success exit code");
- let output = String::from_utf8_lossy(&output.stdout).trim().to_owned();
+ let output = dbg!(String::from_utf8_lossy(&output.stdout).trim().to_owned());
let captures = expected.captures(output.as_str()).expect("could not parse version in output");
assert_eq!(&captures[1], env!("CARGO_PKG_VERSION"));
@@ -41,11 +41,11 @@ fn version_is_full() {
fn test_regex_matches_properly() {
let expected = expected_regex();
- let captures = expected.captures("substrate 2.0.0-da487d19d").unwrap();
+ let captures = expected.captures("substrate-node 2.0.0-da487d19d").unwrap();
assert_eq!(&captures[1], "2.0.0");
assert_eq!(&captures[2], "da487d19d");
- let captures = expected.captures("substrate 2.0.0-alpha.5-da487d19d").unwrap();
+ let captures = expected.captures("substrate-node 2.0.0-alpha.5-da487d19d").unwrap();
assert_eq!(&captures[1], "2.0.0-alpha.5");
assert_eq!(&captures[2], "da487d19d");
}
diff --git a/bin/node/executor/Cargo.toml b/bin/node/executor/Cargo.toml
index 5f11d513c434b..b24414482952c 100644
--- a/bin/node/executor/Cargo.toml
+++ b/bin/node/executor/Cargo.toml
@@ -13,17 +13,17 @@ publish = false
targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
-codec = { package = "parity-scale-codec", version = "3.2.2" }
+codec = { package = "parity-scale-codec", version = "3.6.1" }
scale-info = { version = "2.5.0", features = ["derive"] }
frame-benchmarking = { version = "4.0.0-dev", path = "../../../frame/benchmarking" }
node-primitives = { version = "2.0.0", path = "../primitives" }
kitchensink-runtime = { version = "3.0.0-dev", path = "../runtime" }
sc-executor = { version = "0.10.0-dev", path = "../../../client/executor" }
-sp-core = { version = "7.0.0", path = "../../../primitives/core" }
-sp-keystore = { version = "0.13.0", path = "../../../primitives/keystore" }
-sp-state-machine = { version = "0.13.0", path = "../../../primitives/state-machine" }
-sp-tracing = { version = "6.0.0", path = "../../../primitives/tracing" }
-sp-trie = { version = "7.0.0", path = "../../../primitives/trie" }
+sp-core = { version = "21.0.0", path = "../../../primitives/core" }
+sp-keystore = { version = "0.27.0", path = "../../../primitives/keystore" }
+sp-state-machine = { version = "0.28.0", path = "../../../primitives/state-machine" }
+sp-tracing = { version = "10.0.0", path = "../../../primitives/tracing" }
+sp-trie = { version = "22.0.0", path = "../../../primitives/trie" }
sp-statement-store = { version = "4.0.0-dev", path = "../../../primitives/statement-store" }
[dev-dependencies]
@@ -41,12 +41,12 @@ pallet-sudo = { version = "4.0.0-dev", path = "../../../frame/sudo" }
pallet-timestamp = { version = "4.0.0-dev", path = "../../../frame/timestamp" }
pallet-treasury = { version = "4.0.0-dev", path = "../../../frame/treasury" }
pallet-transaction-payment = { version = "4.0.0-dev", path = "../../../frame/transaction-payment" }
-sp-application-crypto = { version = "7.0.0", path = "../../../primitives/application-crypto" }
+sp-application-crypto = { version = "23.0.0", path = "../../../primitives/application-crypto" }
pallet-root-testing = { version = "1.0.0-dev", path = "../../../frame/root-testing" }
sp-consensus-babe = { version = "0.10.0-dev", path = "../../../primitives/consensus/babe" }
-sp-externalities = { version = "0.13.0", path = "../../../primitives/externalities" }
-sp-keyring = { version = "7.0.0", path = "../../../primitives/keyring" }
-sp-runtime = { version = "7.0.0", path = "../../../primitives/runtime" }
+sp-externalities = { version = "0.19.0", path = "../../../primitives/externalities" }
+sp-keyring = { version = "24.0.0", path = "../../../primitives/keyring" }
+sp-runtime = { version = "24.0.0", path = "../../../primitives/runtime" }
[features]
stress-test = []
diff --git a/bin/node/executor/benches/bench.rs b/bin/node/executor/benches/bench.rs
index aa7d9eb0f31ff..1c9c002492cf5 100644
--- a/bin/node/executor/benches/bench.rs
+++ b/bin/node/executor/benches/bench.rs
@@ -19,8 +19,8 @@ use codec::{Decode, Encode};
use criterion::{criterion_group, criterion_main, BatchSize, Criterion};
use frame_support::Hashable;
use kitchensink_runtime::{
- constants::currency::*, Block, BuildStorage, CheckedExtrinsic, GenesisConfig, Header,
- RuntimeCall, UncheckedExtrinsic,
+ constants::currency::*, Block, BuildStorage, CheckedExtrinsic, Header, RuntimeCall,
+ RuntimeGenesisConfig, UncheckedExtrinsic,
};
use node_executor::ExecutorDispatch;
use node_primitives::{BlockNumber, Hash};
@@ -67,7 +67,7 @@ fn sign(xt: CheckedExtrinsic) -> UncheckedExtrinsic {
node_testing::keyring::sign(xt, SPEC_VERSION, TRANSACTION_VERSION, GENESIS_HASH)
}
-fn new_test_ext(genesis_config: &GenesisConfig) -> TestExternalities {
+fn new_test_ext(genesis_config: &RuntimeGenesisConfig) -> TestExternalities {
let mut test_ext = TestExternalities::new_with_code(
compact_code_unwrap(),
genesis_config.build_storage().unwrap(),
@@ -157,7 +157,7 @@ fn construct_block(
}
fn test_blocks(
- genesis_config: &GenesisConfig,
+ genesis_config: &RuntimeGenesisConfig,
executor: &NativeElseWasmExecutor,
) -> Vec<(Vec, Hash)> {
let mut test_ext = new_test_ext(genesis_config);
@@ -182,7 +182,6 @@ fn bench_execute_block(c: &mut Criterion) {
let mut group = c.benchmark_group("execute blocks");
let execution_methods = vec![
ExecutionMethod::Native,
- ExecutionMethod::Wasm(WasmExecutionMethod::Interpreted),
ExecutionMethod::Wasm(WasmExecutionMethod::Compiled {
instantiation_strategy: WasmtimeInstantiationStrategy::PoolingCopyOnWrite,
}),
diff --git a/bin/node/executor/tests/basic.rs b/bin/node/executor/tests/basic.rs
index d301aa06f90b0..a2f46e9fdbe99 100644
--- a/bin/node/executor/tests/basic.rs
+++ b/bin/node/executor/tests/basic.rs
@@ -183,7 +183,7 @@ fn panic_execution_with_foreign_code_gives_error() {
let mut t = new_test_ext(bloaty_code_unwrap());
t.insert(
>::hashed_key_for(alice()),
- AccountInfo::<::Index, _> {
+ AccountInfo::<::Nonce, _> {
providers: 1,
data: (69u128, 0u128, 0u128, 1u128 << 127),
..Default::default()
@@ -209,7 +209,7 @@ fn bad_extrinsic_with_native_equivalent_code_gives_error() {
let mut t = new_test_ext(compact_code_unwrap());
t.insert(
>::hashed_key_for(alice()),
- AccountInfo::<::Index, _> {
+ AccountInfo::<::Nonce, _> {
providers: 1,
data: (69u128, 0u128, 0u128, 1u128 << 127),
..Default::default()
@@ -235,7 +235,7 @@ fn successful_execution_with_native_equivalent_code_gives_ok() {
let mut t = new_test_ext(compact_code_unwrap());
t.insert(
>::hashed_key_for(alice()),
- AccountInfo::<::Index, _> {
+ AccountInfo::<::Nonce, _> {
providers: 1,
data: (111 * DOLLARS, 0u128, 0u128, 1u128 << 127),
..Default::default()
@@ -245,7 +245,7 @@ fn successful_execution_with_native_equivalent_code_gives_ok() {
t.insert(
>::hashed_key_for(bob()),
AccountInfo::<
- ::Index,
+ ::Nonce,
::AccountData,
>::default()
.encode(),
@@ -277,7 +277,7 @@ fn successful_execution_with_foreign_code_gives_ok() {
let mut t = new_test_ext(bloaty_code_unwrap());
t.insert(
>::hashed_key_for(alice()),
- AccountInfo::<::Index, _> {
+ AccountInfo::<::Nonce, _> {
providers: 1,
data: (111 * DOLLARS, 0u128, 0u128, 1u128 << 127),
..Default::default()
@@ -287,7 +287,7 @@ fn successful_execution_with_foreign_code_gives_ok() {
t.insert(
>::hashed_key_for(bob()),
AccountInfo::<
- ::Index,
+ ::Nonce,
::AccountData,
>::default()
.encode(),
@@ -766,7 +766,7 @@ fn panic_execution_gives_error() {
let mut t = new_test_ext(bloaty_code_unwrap());
t.insert(
>::hashed_key_for(alice()),
- AccountInfo::<::Index, _> {
+ AccountInfo::<::Nonce, _> {
data: (0 * DOLLARS, 0u128, 0u128, 0u128),
..Default::default()
}
@@ -795,7 +795,7 @@ fn successful_execution_gives_ok() {
let mut t = new_test_ext(compact_code_unwrap());
t.insert(
>::hashed_key_for(alice()),
- AccountInfo::<::Index, _> {
+ AccountInfo::<::Nonce, _> {
providers: 1,
data: (111 * DOLLARS, 0u128, 0u128, 1u128 << 127),
..Default::default()
@@ -805,7 +805,7 @@ fn successful_execution_gives_ok() {
t.insert(
>::hashed_key_for(bob()),
AccountInfo::<
- ::Index,
+ ::Nonce,
::AccountData,
>::default()
.encode(),
diff --git a/bin/node/executor/tests/fees.rs b/bin/node/executor/tests/fees.rs
index 970d790a87d3b..7519ce6e8b1b4 100644
--- a/bin/node/executor/tests/fees.rs
+++ b/bin/node/executor/tests/fees.rs
@@ -196,7 +196,7 @@ fn transaction_fee_is_correct() {
fn block_weight_capacity_report() {
// Just report how many transfer calls you could fit into a block. The number should at least
// be a few hundred (250 at the time of writing but can change over time). Runs until panic.
- use node_primitives::Index;
+ use node_primitives::Nonce;
// execution ext.
let mut t = new_test_ext(compact_code_unwrap());
@@ -205,7 +205,7 @@ fn block_weight_capacity_report() {
let factor = 50;
let mut time = 10;
- let mut nonce: Index = 0;
+ let mut nonce: Nonce = 0;
let mut block_number = 1;
let mut previous_hash: node_primitives::Hash = GENESIS_HASH.into();
@@ -213,7 +213,7 @@ fn block_weight_capacity_report() {
let num_transfers = block_number * factor;
let mut xts = (0..num_transfers)
.map(|i| CheckedExtrinsic {
- signed: Some((charlie(), signed_extra(nonce + i as Index, 0))),
+ signed: Some((charlie(), signed_extra(nonce + i as Nonce, 0))),
function: RuntimeCall::Balances(pallet_balances::Call::transfer_allow_death {
dest: bob().into(),
value: 0,
@@ -266,7 +266,7 @@ fn block_length_capacity_report() {
// Just report how big a block can get. Executes until panic. Should be ignored unless if
// manually inspected. The number should at least be a few megabytes (5 at the time of
// writing but can change over time).
- use node_primitives::Index;
+ use node_primitives::Nonce;
// execution ext.
let mut t = new_test_ext(compact_code_unwrap());
@@ -275,7 +275,7 @@ fn block_length_capacity_report() {
let factor = 256 * 1024;
let mut time = 10;
- let mut nonce: Index = 0;
+ let mut nonce: Nonce = 0;
let mut block_number = 1;
let mut previous_hash: node_primitives::Hash = GENESIS_HASH.into();
diff --git a/bin/node/executor/tests/submit_transaction.rs b/bin/node/executor/tests/submit_transaction.rs
index b260f90a87466..7678a3c6e5a9f 100644
--- a/bin/node/executor/tests/submit_transaction.rs
+++ b/bin/node/executor/tests/submit_transaction.rs
@@ -37,7 +37,6 @@ fn should_submit_unsigned_transaction() {
pallet_im_online::sr25519::AuthoritySignature::try_from(vec![0; 64]).unwrap();
let heartbeat_data = pallet_im_online::Heartbeat {
block_number: 1,
- network_state: Default::default(),
session_index: 1,
authority_index: 0,
validators_len: 0,
diff --git a/bin/node/inspect/Cargo.toml b/bin/node/inspect/Cargo.toml
index f77c52aa5b056..41894fb60e810 100644
--- a/bin/node/inspect/Cargo.toml
+++ b/bin/node/inspect/Cargo.toml
@@ -14,12 +14,11 @@ targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
clap = { version = "4.2.5", features = ["derive"] }
-codec = { package = "parity-scale-codec", version = "3.2.2" }
+codec = { package = "parity-scale-codec", version = "3.6.1" }
thiserror = "1.0"
sc-cli = { version = "0.10.0-dev", path = "../../../client/cli" }
sc-client-api = { version = "4.0.0-dev", path = "../../../client/api" }
-sc-executor = { version = "0.10.0-dev", path = "../../../client/executor" }
sc-service = { version = "0.10.0-dev", default-features = false, path = "../../../client/service" }
sp-blockchain = { version = "4.0.0-dev", path = "../../../primitives/blockchain" }
-sp-core = { version = "7.0.0", path = "../../../primitives/core" }
-sp-runtime = { version = "7.0.0", path = "../../../primitives/runtime" }
+sp-core = { version = "21.0.0", path = "../../../primitives/core" }
+sp-runtime = { version = "24.0.0", path = "../../../primitives/runtime" }
diff --git a/bin/node/inspect/src/command.rs b/bin/node/inspect/src/command.rs
index 9702576833ccf..dcecfd7882644 100644
--- a/bin/node/inspect/src/command.rs
+++ b/bin/node/inspect/src/command.rs
@@ -25,14 +25,12 @@ use crate::{
use sc_cli::{CliConfiguration, ImportParams, Result, SharedParams};
use sc_service::{Configuration, NativeExecutionDispatch};
use sp_runtime::traits::Block;
-use std::str::FromStr;
impl InspectCmd {
/// Run the inspect command, passing the inspector.
pub fn run(&self, config: Configuration) -> Result<()>
where
B: Block,
- B::Hash: FromStr,
RA: Send + Sync + 'static,
D: NativeExecutionDispatch + 'static,
{
diff --git a/bin/node/inspect/src/lib.rs b/bin/node/inspect/src/lib.rs
index 5764e0f05c172..65dfecdf77a2d 100644
--- a/bin/node/inspect/src/lib.rs
+++ b/bin/node/inspect/src/lib.rs
@@ -33,13 +33,13 @@ use sp_blockchain::HeaderBackend;
use sp_core::hexdisplay::HexDisplay;
use sp_runtime::{
generic::BlockId,
- traits::{Block, Hash, HashFor, NumberFor},
+ traits::{Block, Hash, HashingFor, NumberFor},
};
use std::{fmt, fmt::Debug, marker::PhantomData, str::FromStr};
/// A helper type for a generic block input.
pub type BlockAddressFor =
- BlockAddress< as Hash>::Output, NumberFor>;
+ BlockAddress< as Hash>::Output, NumberFor>;
/// A Pretty formatter implementation.
pub trait PrettyPrinter {
@@ -166,7 +166,7 @@ impl> Inspector
/// Get a pretty-printed extrinsic.
pub fn extrinsic(
&self,
- input: ExtrinsicAddress< as Hash>::Output, NumberFor>,
+ input: ExtrinsicAddress< as Hash>::Output, NumberFor>,
) -> Result {
struct ExtrinsicPrinter<'a, A: Block, B>(A::Extrinsic, &'a B);
impl<'a, A: Block, B: PrettyPrinter> fmt::Display for ExtrinsicPrinter<'a, A, B> {
diff --git a/bin/node/primitives/Cargo.toml b/bin/node/primitives/Cargo.toml
index 78cbf67ce7710..ac178c67f7188 100644
--- a/bin/node/primitives/Cargo.toml
+++ b/bin/node/primitives/Cargo.toml
@@ -13,22 +13,12 @@ publish = false
targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
-codec = { package = "parity-scale-codec", version = "3.2.2", default-features = false, features = [
- "derive",
-] }
-scale-info = { version = "2.5.0", default-features = false, features = ["derive"] }
-frame-system = { version = "4.0.0-dev", default-features = false, path = "../../../frame/system" }
-sp-application-crypto = { version = "7.0.0", default-features = false, path = "../../../primitives/application-crypto" }
-sp-core = { version = "7.0.0", default-features = false, path = "../../../primitives/core" }
-sp-runtime = { version = "7.0.0", default-features = false, path = "../../../primitives/runtime" }
+sp-core = { version = "21.0.0", default-features = false, path = "../../../primitives/core" }
+sp-runtime = { version = "24.0.0", default-features = false, path = "../../../primitives/runtime" }
[features]
default = ["std"]
std = [
- "codec/std",
- "frame-system/std",
- "scale-info/std",
- "sp-application-crypto/std",
"sp-core/std",
"sp-runtime/std",
]
diff --git a/bin/node/primitives/src/lib.rs b/bin/node/primitives/src/lib.rs
index e2fa5c3108149..24a67cbdd8f78 100644
--- a/bin/node/primitives/src/lib.rs
+++ b/bin/node/primitives/src/lib.rs
@@ -46,7 +46,7 @@ pub type Balance = u128;
pub type Moment = u64;
/// Index of a transaction in the chain.
-pub type Index = u32;
+pub type Nonce = u32;
/// A hash of some data used by the chain.
pub type Hash = sp_core::H256;
diff --git a/bin/node/rpc/Cargo.toml b/bin/node/rpc/Cargo.toml
index 8a336242cd267..9f5d12e22d372 100644
--- a/bin/node/rpc/Cargo.toml
+++ b/bin/node/rpc/Cargo.toml
@@ -33,8 +33,8 @@ sp-block-builder = { version = "4.0.0-dev", path = "../../../primitives/block-bu
sp-blockchain = { version = "4.0.0-dev", path = "../../../primitives/blockchain" }
sp-consensus = { version = "0.10.0-dev", path = "../../../primitives/consensus/common" }
sp-consensus-babe = { version = "0.10.0-dev", path = "../../../primitives/consensus/babe" }
-sp-keystore = { version = "0.13.0", path = "../../../primitives/keystore" }
-sp-runtime = { version = "7.0.0", path = "../../../primitives/runtime" }
+sp-keystore = { version = "0.27.0", path = "../../../primitives/keystore" }
+sp-runtime = { version = "24.0.0", path = "../../../primitives/runtime" }
sp-statement-store = { version = "4.0.0-dev", path = "../../../primitives/statement-store" }
substrate-frame-rpc-system = { version = "4.0.0-dev", path = "../../../utils/frame/rpc/system" }
substrate-state-trie-migration-rpc = { version = "4.0.0-dev", path = "../../../utils/frame/rpc/state-trie-migration-rpc/" }
diff --git a/bin/node/rpc/src/lib.rs b/bin/node/rpc/src/lib.rs
index 5ab96bf1c7064..6d8aa5ff0a9da 100644
--- a/bin/node/rpc/src/lib.rs
+++ b/bin/node/rpc/src/lib.rs
@@ -34,7 +34,7 @@
use std::sync::Arc;
use jsonrpsee::RpcModule;
-use node_primitives::{AccountId, Balance, Block, BlockNumber, Hash, Index};
+use node_primitives::{AccountId, Balance, Block, BlockNumber, Hash, Nonce};
use sc_client_api::AuxStore;
use sc_consensus_babe::BabeWorkerHandle;
use sc_consensus_grandpa::{
@@ -90,12 +90,23 @@ pub struct FullDeps {
pub grandpa: GrandpaDeps,
/// Shared statement store reference.
pub statement_store: Arc,
+ /// The backend used by the node.
+ pub backend: Arc,
}
/// Instantiate all Full RPC extensions.
pub fn create_full(
- deps: FullDeps,
- backend: Arc,
+ FullDeps {
+ client,
+ pool,
+ select_chain,
+ chain_spec,
+ deny_unsafe,
+ babe,
+ grandpa,
+ statement_store,
+ backend,
+ }: FullDeps,
) -> Result, Box>
where
C: ProvideRuntimeApi
@@ -106,7 +117,7 @@ where
+ Sync
+ Send
+ 'static,
- C::Api: substrate_frame_rpc_system::AccountNonceApi,
+ C::Api: substrate_frame_rpc_system::AccountNonceApi,
C::Api: mmr_rpc::MmrRuntimeApi::Hash, BlockNumber>,
C::Api: pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi,
C::Api: BabeApi,
@@ -114,7 +125,7 @@ where
P: TransactionPool + 'static,
SC: SelectChain + 'static,
B: sc_client_api::Backend + Send + Sync + 'static,
- B::State: sc_client_api::backend::StateBackend>,
+ B::State: sc_client_api::backend::StateBackend>,
{
use mmr_rpc::{Mmr, MmrApiServer};
use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApiServer};
@@ -130,16 +141,6 @@ where
use substrate_state_trie_migration_rpc::{StateMigration, StateMigrationApiServer};
let mut io = RpcModule::new(());
- let FullDeps {
- client,
- pool,
- select_chain,
- chain_spec,
- deny_unsafe,
- babe,
- grandpa,
- statement_store,
- } = deps;
let BabeDeps { keystore, babe_worker_handle } = babe;
let GrandpaDeps {
@@ -159,7 +160,15 @@ where
// Making synchronous calls in light client freezes the browser currently,
// more context: https://github.com/paritytech/substrate/pull/3480
// These RPCs should use an asynchronous caller instead.
- io.merge(Mmr::new(client.clone()).into_rpc())?;
+ io.merge(
+ Mmr::new(
+ client.clone(),
+ backend
+ .offchain_storage()
+ .ok_or_else(|| "Backend doesn't provide an offchain storage")?,
+ )
+ .into_rpc(),
+ )?;
io.merge(TransactionPayment::new(client.clone()).into_rpc())?;
io.merge(
Babe::new(client.clone(), babe_worker_handle.clone(), keystore, select_chain, deny_unsafe)
diff --git a/bin/node/runtime/Cargo.toml b/bin/node/runtime/Cargo.toml
index 3909eff2af4f0..de0ec1a5489a8 100644
--- a/bin/node/runtime/Cargo.toml
+++ b/bin/node/runtime/Cargo.toml
@@ -16,7 +16,7 @@ targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
# third-party dependencies
-codec = { package = "parity-scale-codec", version = "3.2.2", default-features = false, features = [
+codec = { package = "parity-scale-codec", version = "3.6.1", default-features = false, features = [
"derive",
"max-encoded-len",
] }
@@ -24,6 +24,9 @@ scale-info = { version = "2.5.0", default-features = false, features = ["derive"
static_assertions = "1.1.0"
log = { version = "0.4.17", default-features = false }
+# pallet-asset-conversion: turn on "num-traits" feature
+primitive-types = { version = "0.12.0", default-features = false, features = ["codec", "scale-info", "num-traits"] }
+
# primitives
sp-authority-discovery = { version = "4.0.0-dev", default-features = false, path = "../../../primitives/authority-discovery" }
sp-consensus-babe = { version = "0.10.0-dev", default-features = false, path = "../../../primitives/consensus/babe" }
@@ -32,16 +35,16 @@ sp-block-builder = { path = "../../../primitives/block-builder", default-feature
sp-inherents = { version = "4.0.0-dev", default-features = false, path = "../../../primitives/inherents" }
node-primitives = { version = "2.0.0", default-features = false, path = "../primitives" }
sp-offchain = { version = "4.0.0-dev", default-features = false, path = "../../../primitives/offchain" }
-sp-core = { version = "7.0.0", default-features = false, path = "../../../primitives/core" }
-sp-std = { version = "5.0.0", default-features = false, path = "../../../primitives/std" }
+sp-core = { version = "21.0.0", default-features = false, path = "../../../primitives/core" }
+sp-std = { version = "8.0.0", default-features = false, path = "../../../primitives/std" }
sp-api = { version = "4.0.0-dev", default-features = false, path = "../../../primitives/api" }
-sp-runtime = { version = "7.0.0", default-features = false, path = "../../../primitives/runtime" }
+sp-runtime = { version = "24.0.0", default-features = false, path = "../../../primitives/runtime" }
sp-staking = { version = "4.0.0-dev", default-features = false, path = "../../../primitives/staking" }
sp-session = { version = "4.0.0-dev", default-features = false, path = "../../../primitives/session" }
sp-transaction-pool = { version = "4.0.0-dev", default-features = false, path = "../../../primitives/transaction-pool" }
sp-statement-store = { version = "4.0.0-dev", default-features = false, path = "../../../primitives/statement-store" }
-sp-version = { version = "5.0.0", default-features = false, path = "../../../primitives/version" }
-sp-io = { version = "7.0.0", default-features = false, path = "../../../primitives/io" }
+sp-version = { version = "22.0.0", default-features = false, path = "../../../primitives/version" }
+sp-io = { version = "23.0.0", default-features = false, path = "../../../primitives/io" }
# frame dependencies
frame-executive = { version = "4.0.0-dev", default-features = false, path = "../../../frame/executive" }
@@ -54,6 +57,7 @@ frame-election-provider-support = { version = "4.0.0-dev", default-features = fa
frame-system-rpc-runtime-api = { version = "4.0.0-dev", default-features = false, path = "../../../frame/system/rpc/runtime-api/" }
frame-try-runtime = { version = "0.10.0-dev", default-features = false, path = "../../../frame/try-runtime", optional = true }
pallet-alliance = { version = "4.0.0-dev", default-features = false, path = "../../../frame/alliance" }
+pallet-asset-conversion = { version = "4.0.0-dev", default-features = false, path = "../../../frame/asset-conversion" }
pallet-asset-rate = { version = "4.0.0-dev", default-features = false, path = "../../../frame/asset-rate" }
pallet-assets = { version = "4.0.0-dev", default-features = false, path = "../../../frame/assets" }
pallet-authority-discovery = { version = "4.0.0-dev", default-features = false, path = "../../../frame/authority-discovery" }
@@ -65,7 +69,7 @@ pallet-bounties = { version = "4.0.0-dev", default-features = false, path = "../
pallet-child-bounties = { version = "4.0.0-dev", default-features = false, path = "../../../frame/child-bounties" }
pallet-collective = { version = "4.0.0-dev", default-features = false, path = "../../../frame/collective" }
pallet-contracts = { version = "4.0.0-dev", default-features = false, path = "../../../frame/contracts" }
-pallet-contracts-primitives = { version = "7.0.0", default-features = false, path = "../../../frame/contracts/primitives/" }
+pallet-contracts-primitives = { version = "24.0.0", default-features = false, path = "../../../frame/contracts/primitives/" }
pallet-conviction-voting = { version = "4.0.0-dev", default-features = false, path = "../../../frame/conviction-voting" }
pallet-core-fellowship = { version = "4.0.0-dev", default-features = false, path = "../../../frame/core-fellowship" }
pallet-democracy = { version = "4.0.0-dev", default-features = false, path = "../../../frame/democracy" }
@@ -85,6 +89,7 @@ pallet-mmr = { version = "4.0.0-dev", default-features = false, path = "../../..
pallet-multisig = { version = "4.0.0-dev", default-features = false, path = "../../../frame/multisig" }
pallet-nfts = { version = "4.0.0-dev", default-features = false, path = "../../../frame/nfts" }
pallet-nfts-runtime-api = { version = "4.0.0-dev", default-features = false, path = "../../../frame/nfts/runtime-api" }
+pallet-nft-fractionalization = { version = "4.0.0-dev", default-features = false, path = "../../../frame/nft-fractionalization" }
pallet-nomination-pools = { version = "1.0.0", default-features = false, path = "../../../frame/nomination-pools"}
pallet-nomination-pools-benchmarking = { version = "1.0.0", default-features = false, optional = true, path = "../../../frame/nomination-pools/benchmarking" }
pallet-nomination-pools-runtime-api = { version = "1.0.0-dev", default-features = false, path = "../../../frame/nomination-pools/runtime-api" }
@@ -116,7 +121,8 @@ pallet-treasury = { version = "4.0.0-dev", default-features = false, path = "../
pallet-utility = { version = "4.0.0-dev", default-features = false, path = "../../../frame/utility" }
pallet-transaction-payment = { version = "4.0.0-dev", default-features = false, path = "../../../frame/transaction-payment" }
pallet-transaction-payment-rpc-runtime-api = { version = "4.0.0-dev", default-features = false, path = "../../../frame/transaction-payment/rpc/runtime-api/" }
-pallet-asset-tx-payment = { version = "4.0.0-dev", default-features = false, path = "../../../frame/transaction-payment/asset-tx-payment/" }
+pallet-asset-conversion-tx-payment = { version = "4.0.0-dev", default-features = false, path = "../../../frame/transaction-payment/asset-conversion-tx-payment" }
+pallet-asset-tx-payment = { version = "4.0.0-dev", default-features = false, path = "../../../frame/transaction-payment/asset-tx-payment" }
pallet-transaction-storage = { version = "4.0.0-dev", default-features = false, path = "../../../frame/transaction-storage" }
pallet-uniques = { version = "4.0.0-dev", default-features = false, path = "../../../frame/uniques" }
pallet-vesting = { version = "4.0.0-dev", default-features = false, path = "../../../frame/vesting" }
@@ -132,10 +138,12 @@ std = [
"pallet-whitelist/std",
"pallet-offences-benchmarking?/std",
"pallet-election-provider-support-benchmarking?/std",
+ "pallet-asset-conversion-tx-payment/std",
"pallet-asset-tx-payment/std",
"frame-system-benchmarking?/std",
"frame-election-provider-support/std",
"sp-authority-discovery/std",
+ "pallet-asset-conversion/std",
"pallet-assets/std",
"pallet-authority-discovery/std",
"pallet-authorship/std",
@@ -219,6 +227,7 @@ std = [
"pallet-uniques/std",
"pallet-nfts/std",
"pallet-nfts-runtime-api/std",
+ "pallet-nft-fractionalization/std",
"pallet-vesting/std",
"log/std",
"frame-try-runtime?/std",
@@ -234,6 +243,7 @@ runtime-benchmarks = [
"frame-system/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
"pallet-alliance/runtime-benchmarks",
+ "pallet-asset-conversion/runtime-benchmarks",
"pallet-assets/runtime-benchmarks",
"pallet-babe/runtime-benchmarks",
"pallet-bags-list/runtime-benchmarks",
@@ -283,9 +293,15 @@ runtime-benchmarks = [
"pallet-utility/runtime-benchmarks",
"pallet-uniques/runtime-benchmarks",
"pallet-nfts/runtime-benchmarks",
+ "pallet-nft-fractionalization/runtime-benchmarks",
"pallet-vesting/runtime-benchmarks",
"pallet-whitelist/runtime-benchmarks",
"frame-system-benchmarking/runtime-benchmarks",
+ "frame-election-provider-support/runtime-benchmarks",
+ "pallet-asset-tx-payment/runtime-benchmarks",
+ "pallet-nomination-pools/runtime-benchmarks",
+ "pallet-offences/runtime-benchmarks",
+ "sp-staking/runtime-benchmarks"
]
try-runtime = [
"frame-try-runtime/try-runtime",
@@ -294,6 +310,7 @@ try-runtime = [
"frame-system/try-runtime",
"frame-support/try-runtime",
"pallet-alliance/try-runtime",
+ "pallet-asset-conversion/try-runtime",
"pallet-assets/try-runtime",
"pallet-authority-discovery/try-runtime",
"pallet-authorship/try-runtime",
@@ -345,10 +362,15 @@ try-runtime = [
"pallet-asset-rate/try-runtime",
"pallet-utility/try-runtime",
"pallet-transaction-payment/try-runtime",
+ "pallet-asset-conversion-tx-payment/try-runtime",
"pallet-asset-tx-payment/try-runtime",
"pallet-transaction-storage/try-runtime",
"pallet-uniques/try-runtime",
"pallet-nfts/try-runtime",
+ "pallet-nft-fractionalization/try-runtime",
"pallet-vesting/try-runtime",
"pallet-whitelist/try-runtime",
+ "frame-election-provider-support/try-runtime",
+ "sp-runtime/try-runtime"
]
+unsafe-debug = ["pallet-contracts/unsafe-debug"]
diff --git a/bin/node/runtime/src/impls.rs b/bin/node/runtime/src/impls.rs
index 05531f47c6e05..430a1ac2824b8 100644
--- a/bin/node/runtime/src/impls.rs
+++ b/bin/node/runtime/src/impls.rs
@@ -17,10 +17,6 @@
//! Some configurable implementations as associated type for the substrate runtime.
-use crate::{
- AccountId, AllianceMotion, Assets, Authorship, Balances, Hash, NegativeImbalance, Runtime,
- RuntimeCall,
-};
use frame_support::{
pallet_prelude::*,
traits::{
@@ -32,6 +28,11 @@ use pallet_alliance::{IdentityVerifier, ProposalIndex, ProposalProvider};
use pallet_asset_tx_payment::HandleCredit;
use sp_std::prelude::*;
+use crate::{
+ AccountId, AllianceMotion, Assets, Authorship, Balances, Hash, NegativeImbalance, Runtime,
+ RuntimeCall,
+};
+
pub struct Author;
impl OnUnbalanced for Author {
fn on_nonzero_unbalanced(amount: NegativeImbalance) {
@@ -111,11 +112,15 @@ impl ProposalProvider for AllianceProposalProvider
#[cfg(test)]
mod multiplier_tests {
+ use frame_support::{
+ dispatch::DispatchClass,
+ weights::{Weight, WeightToFee},
+ };
use pallet_transaction_payment::{Multiplier, TargetedFeeAdjustment};
use sp_runtime::{
assert_eq_error_rate,
traits::{Convert, One, Zero},
- FixedPointNumber,
+ BuildStorage, FixedPointNumber,
};
use crate::{
@@ -123,10 +128,6 @@ mod multiplier_tests {
AdjustmentVariable, MaximumMultiplier, MinimumMultiplier, Runtime,
RuntimeBlockWeights as BlockWeights, System, TargetBlockFullness, TransactionPayment,
};
- use frame_support::{
- dispatch::DispatchClass,
- weights::{Weight, WeightToFee},
- };
fn max_normal() -> Weight {
BlockWeights::get()
@@ -161,14 +162,28 @@ mod multiplier_tests {
// bump if it is zero.
let previous_float = previous_float.max(min_multiplier().into_inner() as f64 / accuracy);
+ let max_normal = max_normal();
+ let target_weight = target();
+ let normalized_weight_dimensions = (
+ block_weight.ref_time() as f64 / max_normal.ref_time() as f64,
+ block_weight.proof_size() as f64 / max_normal.proof_size() as f64,
+ );
+
+ let (normal, max, target) =
+ if normalized_weight_dimensions.0 < normalized_weight_dimensions.1 {
+ (block_weight.proof_size(), max_normal.proof_size(), target_weight.proof_size())
+ } else {
+ (block_weight.ref_time(), max_normal.ref_time(), target_weight.ref_time())
+ };
+
// maximum tx weight
- let m = max_normal().ref_time() as f64;
+ let m = max as f64;
// block weight always truncated to max weight
- let block_weight = (block_weight.ref_time() as f64).min(m);
+ let block_weight = (normal as f64).min(m);
let v: f64 = AdjustmentVariable::get().to_float();
// Ideal saturation in terms of weight
- let ss = target().ref_time() as f64;
+ let ss = target as f64;
// Current saturation in terms of weight
let s = block_weight;
@@ -182,8 +197,8 @@ mod multiplier_tests {
where
F: Fn() -> (),
{
- let mut t: sp_io::TestExternalities = frame_system::GenesisConfig::default()
- .build_storage::()
+ let mut t: sp_io::TestExternalities = frame_system::GenesisConfig::::default()
+ .build_storage()
.unwrap()
.into();
t.execute_with(|| {
@@ -218,10 +233,16 @@ mod multiplier_tests {
#[test]
fn multiplier_can_grow_from_zero() {
// if the min is too small, then this will not change, and we are doomed forever.
- // the weight is 1/100th bigger than target.
+ // the block ref time is 1/100th bigger than target.
run_with_system_weight(target().set_ref_time(target().ref_time() * 101 / 100), || {
let next = runtime_multiplier_update(min_multiplier());
- assert!(next > min_multiplier(), "{:?} !>= {:?}", next, min_multiplier());
+ assert!(next > min_multiplier(), "{:?} !> {:?}", next, min_multiplier());
+ });
+
+ // the block proof size is 1/100th bigger than target.
+ run_with_system_weight(target().set_proof_size((target().proof_size() / 100) * 101), || {
+ let next = runtime_multiplier_update(min_multiplier());
+ assert!(next > min_multiplier(), "{:?} !> {:?}", next, min_multiplier());
})
}
@@ -407,23 +428,33 @@ mod multiplier_tests {
#[test]
fn weight_to_fee_should_not_overflow_on_large_weights() {
- let kb = Weight::from_parts(1024, 0);
- let mb = 1024u64 * kb;
+ let kb_time = Weight::from_parts(1024, 0);
+ let kb_size = Weight::from_parts(0, 1024);
+ let mb_time = 1024u64 * kb_time;
let max_fm = Multiplier::saturating_from_integer(i128::MAX);
// check that for all values it can compute, correctly.
vec![
Weight::zero(),
+ // testcases ignoring proof size part of the weight.
Weight::from_parts(1, 0),
Weight::from_parts(10, 0),
Weight::from_parts(1000, 0),
- kb,
- 10u64 * kb,
- 100u64 * kb,
- mb,
- 10u64 * mb,
+ kb_time,
+ 10u64 * kb_time,
+ 100u64 * kb_time,
+ mb_time,
+ 10u64 * mb_time,
Weight::from_parts(2147483647, 0),
Weight::from_parts(4294967295, 0),
+ // testcases ignoring ref time part of the weight.
+ Weight::from_parts(0, 100000000000),
+ 1000000u64 * kb_size,
+ 1000000000u64 * kb_size,
+ Weight::from_parts(0, 18014398509481983),
+ Weight::from_parts(0, 9223372036854775807),
+ // test cases with both parts of the weight.
+ BlockWeights::get().max_block / 1024,
BlockWeights::get().max_block / 2,
BlockWeights::get().max_block,
Weight::MAX / 2,
@@ -440,7 +471,14 @@ mod multiplier_tests {
// Some values that are all above the target and will cause an increase.
let t = target();
- vec![t + Weight::from_parts(100, 0), t * 2, t * 4].into_iter().for_each(|i| {
+ vec![
+ t + Weight::from_parts(100, 0),
+ t + Weight::from_parts(0, t.proof_size() * 2),
+ t * 2,
+ t * 4,
+ ]
+ .into_iter()
+ .for_each(|i| {
run_with_system_weight(i, || {
let fm = runtime_multiplier_update(max_fm);
// won't grow. The convert saturates everything.
diff --git a/bin/node/runtime/src/lib.rs b/bin/node/runtime/src/lib.rs
index a2cb64cadd7c5..4e1b6d4e8bec0 100644
--- a/bin/node/runtime/src/lib.rs
+++ b/bin/node/runtime/src/lib.rs
@@ -19,16 +19,19 @@
//! The Substrate runtime. This can be compiled with `#[no_std]`, ready for Wasm.
#![cfg_attr(not(feature = "std"), no_std)]
-// `construct_runtime!` does a lot of recursion and requires us to increase the limit to 512.
-#![recursion_limit = "512"]
+// `construct_runtime!` does a lot of recursion and requires us to increase the limits.
+#![recursion_limit = "1024"]
use codec::{Decode, Encode, MaxEncodedLen};
use frame_election_provider_support::{
+ bounds::{ElectionBounds, ElectionBoundsBuilder},
onchain, BalancingConfig, ElectionDataProvider, SequentialPhragmen, VoteWeight,
};
use frame_support::{
construct_runtime,
dispatch::DispatchClass,
+ instances::{Instance1, Instance2},
+ ord_parameter_types,
pallet_prelude::Get,
parameter_types,
traits::{
@@ -36,7 +39,7 @@ use frame_support::{
tokens::{nonfungibles_v2::Inspect, GetSalary, PayFromAccount},
AsEnsureOriginWithArg, ConstBool, ConstU128, ConstU16, ConstU32, Currency, EitherOfDiverse,
EqualPrivilegeOnly, Everything, Imbalance, InstanceFilter, KeyOwnerProofSystem,
- LockIdentifier, Nothing, OnUnbalanced, U128CurrencyToVote, WithdrawReasons,
+ LockIdentifier, Nothing, OnUnbalanced, WithdrawReasons,
},
weights::{
constants::{
@@ -44,14 +47,15 @@ use frame_support::{
},
ConstantMultiplier, IdentityFee, Weight,
},
- PalletId, RuntimeDebug,
+ BoundedVec, PalletId, RuntimeDebug,
};
use frame_system::{
limits::{BlockLength, BlockWeights},
- EnsureRoot, EnsureRootWithSuccess, EnsureSigned, EnsureWithSuccess,
+ EnsureRoot, EnsureRootWithSuccess, EnsureSigned, EnsureSignedBy, EnsureWithSuccess,
};
pub use node_primitives::{AccountId, Signature};
-use node_primitives::{AccountIndex, Balance, BlockNumber, Hash, Index, Moment};
+use node_primitives::{AccountIndex, Balance, BlockNumber, Hash, Moment, Nonce};
+use pallet_asset_conversion::{NativeOrAssetId, NativeOrAssetIdConverter};
use pallet_election_provider_multi_phase::SolutionAccuracyOf;
use pallet_im_online::sr25519::AuthorityId as ImOnlineId;
use pallet_nfts::PalletFeatures;
@@ -59,7 +63,6 @@ use pallet_nis::WithMaximumOf;
use pallet_session::historical as pallet_session_historical;
pub use pallet_transaction_payment::{CurrencyAdapter, Multiplier, TargetedFeeAdjustment};
use pallet_transaction_payment::{FeeDetails, RuntimeDispatchInfo};
-use scale_info::TypeInfo;
use sp_api::impl_runtime_apis;
use sp_authority_discovery::AuthorityId as AuthorityDiscoveryId;
use sp_consensus_grandpa::AuthorityId as GrandpaId;
@@ -70,8 +73,8 @@ use sp_runtime::{
curve::PiecewiseLinear,
generic, impl_opaque_keys,
traits::{
- self, BlakeTwo256, Block as BlockT, Bounded, ConvertInto, NumberFor, OpaqueKeys,
- SaturatedConversion, StaticLookup,
+ self, AccountIdConversion, BlakeTwo256, Block as BlockT, Bounded, ConvertInto, NumberFor,
+ OpaqueKeys, SaturatedConversion, StaticLookup,
},
transaction_validity::{TransactionPriority, TransactionSource, TransactionValidity},
ApplyExtrinsicResult, FixedPointNumber, FixedU128, Perbill, Percent, Permill, Perquintill,
@@ -222,13 +225,12 @@ impl frame_system::Config for Runtime {
type DbWeight = RocksDbWeight;
type RuntimeOrigin = RuntimeOrigin;
type RuntimeCall = RuntimeCall;
- type Index = Index;
- type BlockNumber = BlockNumber;
+ type Nonce = Nonce;
type Hash = Hash;
type Hashing = BlakeTwo256;
type AccountId = AccountId;
type Lookup = Indices;
- type Header = generic::Header;
+ type Block = Block;
type RuntimeEvent = RuntimeEvent;
type BlockHashCount = BlockHashCount;
type Version = Version;
@@ -324,8 +326,9 @@ impl InstanceFilter for ProxyType {
RuntimeCall::Elections(..) |
RuntimeCall::Treasury(..)
),
- ProxyType::Staking =>
- matches!(c, RuntimeCall::Staking(..) | RuntimeCall::FastUnstake(..)),
+ ProxyType::Staking => {
+ matches!(c, RuntimeCall::Staking(..) | RuntimeCall::FastUnstake(..))
+ },
}
}
fn is_superset(&self, o: &Self) -> bool {
@@ -377,6 +380,7 @@ impl pallet_scheduler::Config for Runtime {
impl pallet_glutton::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
+ type AdminOrigin = EnsureRoot;
type WeightInfo = pallet_glutton::weights::SubstrateWeight;
}
@@ -412,6 +416,7 @@ impl pallet_babe::Config for Runtime {
type DisabledValidators = Session;
type WeightInfo = ();
type MaxAuthorities = MaxAuthorities;
+ type MaxNominators = MaxNominatorRewardedPerValidator;
type KeyOwnerProof =
>::Proof;
type EquivocationReportSystem =
@@ -438,15 +443,6 @@ parameter_types! {
pub const MaxReserves: u32 = 50;
}
-/// A reason for placing a hold on funds.
-#[derive(
- Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, MaxEncodedLen, Debug, TypeInfo,
-)]
-pub enum HoldReason {
- /// The NIS Pallet has reserved it for a non-fungible receipt.
- Nis,
-}
-
impl pallet_balances::Config for Runtime {
type MaxLocks = MaxLocks;
type MaxReserves = MaxReserves;
@@ -459,8 +455,8 @@ impl pallet_balances::Config for Runtime {
type WeightInfo = pallet_balances::weights::SubstrateWeight;
type FreezeIdentifier = ();
type MaxFreezes = ();
- type HoldIdentifier = HoldReason;
- type MaxHolds = ConstU32<1>;
+ type RuntimeHoldReason = RuntimeHoldReason;
+ type MaxHolds = ConstU32<2>;
}
parameter_types! {
@@ -491,11 +487,18 @@ impl pallet_asset_tx_payment::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type Fungibles = Assets;
type OnChargeAssetTransaction = pallet_asset_tx_payment::FungiblesAdapter<
- pallet_assets::BalanceToAssetBalance,
+ pallet_assets::BalanceToAssetBalance,
CreditToBlockAuthor,
>;
}
+impl pallet_asset_conversion_tx_payment::Config for Runtime {
+ type RuntimeEvent = RuntimeEvent;
+ type Fungibles = Assets;
+ type OnChargeAssetTransaction =
+ pallet_asset_conversion_tx_payment::AssetConversionAdapter;
+}
+
parameter_types! {
pub const MinimumPeriod: Moment = SLOT_DURATION / 2;
}
@@ -560,6 +563,9 @@ parameter_types! {
pub HistoryDepth: u32 = 84;
}
+/// Upper limit on the number of NPOS nominations.
+const MAX_QUOTA_NOMINATIONS: u32 = 16;
+
pub struct StakingBenchmarkingConfig;
impl pallet_staking::BenchmarkingConfig for StakingBenchmarkingConfig {
type MaxNominators = ConstU32<1000>;
@@ -567,11 +573,10 @@ impl pallet_staking::BenchmarkingConfig for StakingBenchmarkingConfig {
}
impl pallet_staking::Config for Runtime {
- type MaxNominations = MaxNominations;
type Currency = Balances;
type CurrencyBalance = Balance;
type UnixTime = Timestamp;
- type CurrencyToVote = U128CurrencyToVote;
+ type CurrencyToVote = sp_staking::currency_to_vote::U128CurrencyToVote;
type RewardRemainder = Treasury;
type RuntimeEvent = RuntimeEvent;
type Slash = Treasury; // send the slashed funds to the treasury.
@@ -592,11 +597,12 @@ impl pallet_staking::Config for Runtime {
type ElectionProvider = ElectionProviderMultiPhase;
type GenesisElectionProvider = onchain::OnChainExecution;
type VoterList = VoterList;
+ type NominationsQuota = pallet_staking::FixedNominationsQuota;
// This a placeholder, to be introduced in the next PR as an instance of bags-list
type TargetList = pallet_staking::UseValidatorsMap;
type MaxUnlockingChunks = ConstU32<32>;
type HistoryDepth = HistoryDepth;
- type OnStakerSlash = NominationPools;
+ type EventListeners = NominationPools;
type WeightInfo = pallet_staking::weights::SubstrateWeight;
type BenchmarkingConfig = StakingBenchmarkingConfig;
}
@@ -645,17 +651,20 @@ frame_election_provider_support::generate_solution_type!(
VoterIndex = u32,
TargetIndex = u16,
Accuracy = sp_runtime::PerU16,
- MaxVoters = MaxElectingVoters,
+ MaxVoters = MaxElectingVotersSolution,
>(16)
);
parameter_types! {
+ // Note: the EPM in this runtime runs the election on-chain. The election bounds must be
+ // carefully set so that an election round fits in one block.
+ pub ElectionBoundsMultiPhase: ElectionBounds = ElectionBoundsBuilder::default()
+ .voters_count(10_000.into()).targets_count(1_500.into()).build();
+ pub ElectionBoundsOnChain: ElectionBounds = ElectionBoundsBuilder::default()
+ .voters_count(5_000.into()).targets_count(1_250.into()).build();
+
pub MaxNominations: u32 = ::LIMIT as u32;
- pub MaxElectingVoters: u32 = 40_000;
- pub MaxElectableTargets: u16 = 10_000;
- // OnChain values are lower.
- pub MaxOnChainElectingVoters: u32 = 5000;
- pub MaxOnChainElectableTargets: u16 = 1250;
+ pub MaxElectingVotersSolution: u32 = 40_000;
// The maximum winners that can be elected by the Election pallet which is equivalent to the
// maximum active validators the staking pallet can have.
pub MaxActiveValidators: u32 = 1000;
@@ -710,8 +719,7 @@ impl onchain::Config for OnChainSeqPhragmen {
type DataProvider = ::DataProvider;
type WeightInfo = frame_election_provider_support::weights::SubstrateWeight;
type MaxWinners = ::MaxWinners;
- type VotersBound = MaxOnChainElectingVoters;
- type TargetsBound = MaxOnChainElectableTargets;
+ type Bounds = ElectionBoundsOnChain;
}
impl pallet_election_provider_multi_phase::MinerConfig for Runtime {
@@ -759,9 +767,8 @@ impl pallet_election_provider_multi_phase::Config for Runtime {
type GovernanceFallback = onchain::OnChainExecution;
type Solver = SequentialPhragmen, OffchainRandomBalancing>;
type ForceOrigin = EnsureRootOrHalfCouncil;
- type MaxElectableTargets = MaxElectableTargets;
type MaxWinners = MaxActiveValidators;
- type MaxElectingVoters = MaxElectingVoters;
+ type ElectionBounds = ElectionBoundsMultiPhase;
type BenchmarkingConfig = ElectionProviderBenchmarkConfig;
type WeightInfo = pallet_election_provider_multi_phase::weights::SubstrateWeight;
}
@@ -1043,7 +1050,7 @@ impl pallet_elections_phragmen::Config for Runtime {
// NOTE: this implies that council's genesis members cannot be set directly and must come from
// this module.
type InitializeMembers = Council;
- type CurrencyToVote = U128CurrencyToVote;
+ type CurrencyToVote = sp_staking::currency_to_vote::U128CurrencyToVote;
type CandidacyBond = CandidacyBond;
type VotingBondBase = VotingBondBase;
type VotingBondFactor = VotingBondFactor;
@@ -1139,11 +1146,12 @@ impl pallet_asset_rate::Config for Runtime {
type CreateOrigin = EnsureRoot;
type RemoveOrigin = EnsureRoot;
type UpdateOrigin = EnsureRoot;
- type Balance = Balance;
type Currency = Balances;
- type AssetId = u32;
+ type AssetKind = u32;
type RuntimeEvent = RuntimeEvent;
type WeightInfo = pallet_asset_rate::weights::SubstrateWeight;
+ #[cfg(feature = "runtime-benchmarks")]
+ type BenchmarkHelper = ();
}
parameter_types! {
@@ -1186,6 +1194,7 @@ impl pallet_message_queue::Config for Runtime {
type MessageProcessor = pallet_message_queue::mock_helpers::NoopMessageProcessor;
type Size = u32;
type QueueChangeHandler = ();
+ type QueuePausedQuery = ();
type HeapSize = ConstU32<{ 64 * 1024 }>;
type MaxStale = ConstU32<128>;
type ServiceWeight = MessageQueueServiceWeight;
@@ -1218,6 +1227,7 @@ parameter_types! {
pub const DepositPerByte: Balance = deposit(0, 1);
pub const DefaultDepositLimit: Balance = deposit(1024, 1024 * 1024);
pub Schedule: pallet_contracts::Schedule = Default::default();
+ pub CodeHashLockupDepositPercent: Perbill = Perbill::from_percent(30);
}
impl pallet_contracts::Config for Runtime {
@@ -1246,6 +1256,15 @@ impl pallet_contracts::Config for Runtime {
type MaxStorageKeyLen = ConstU32<128>;
type UnsafeUnstableInterface = ConstBool;
type MaxDebugBufferLen = ConstU32<{ 2 * 1024 * 1024 }>;
+ type RuntimeHoldReason = RuntimeHoldReason;
+ #[cfg(not(feature = "runtime-benchmarks"))]
+ type Migrations = ();
+ #[cfg(feature = "runtime-benchmarks")]
+ type Migrations = pallet_contracts::migration::codegen::BenchMigrations;
+ type MaxDelegateDependencies = ConstU32<32>;
+ type CodeHashLockupDepositPercent = CodeHashLockupDepositPercent;
+ #[cfg(feature = "unsafe-debug")]
+ type Debug = ();
}
impl pallet_sudo::Config for Runtime {
@@ -1261,7 +1280,6 @@ parameter_types! {
pub const MaxAuthorities: u32 = 100;
pub const MaxKeys: u32 = 10_000;
pub const MaxPeerInHeartbeats: u32 = 10_000;
- pub const MaxPeerDataEncodingSize: u32 = 1_000;
}
impl frame_system::offchain::CreateSignedTransaction for Runtime
@@ -1272,7 +1290,7 @@ where
call: RuntimeCall,
public: ::Signer,
account: AccountId,
- nonce: Index,
+ nonce: Nonce,
) -> Option<(RuntimeCall, ::SignaturePayload)> {
let tip = 0;
// take the biggest period possible.
@@ -1292,7 +1310,7 @@ where
frame_system::CheckEra::::from(era),
frame_system::CheckNonce::::from(nonce),
frame_system::CheckWeight::::new(),
- pallet_asset_tx_payment::ChargeAssetTxPayment::::from(tip, None),
+ pallet_asset_conversion_tx_payment::ChargeAssetTxPayment::::from(tip, None),
);
let raw_payload = SignedPayload::new(call, extra)
.map_err(|e| {
@@ -1329,7 +1347,6 @@ impl pallet_im_online::Config for Runtime {
type WeightInfo = pallet_im_online::weights::SubstrateWeight;
type MaxKeys = MaxKeys;
type MaxPeerInHeartbeats = MaxPeerInHeartbeats;
- type MaxPeerDataEncodingSize = MaxPeerDataEncodingSize;
}
impl pallet_offences::Config for Runtime {
@@ -1350,6 +1367,7 @@ impl pallet_grandpa::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type WeightInfo = ();
type MaxAuthorities = MaxAuthorities;
+ type MaxNominators = MaxNominatorRewardedPerValidator;
type MaxSetIdSessionEntries = MaxSetIdSessionEntries;
type KeyOwnerProof = >::Proof;
type EquivocationReportSystem =
@@ -1399,14 +1417,14 @@ impl pallet_recovery::Config for Runtime {
}
parameter_types! {
- pub const CandidateDeposit: Balance = 10 * DOLLARS;
- pub const WrongSideDeduction: Balance = 2 * DOLLARS;
- pub const MaxStrikes: u32 = 10;
- pub const RotationPeriod: BlockNumber = 80 * HOURS;
+ pub const GraceStrikes: u32 = 10;
+ pub const SocietyVotingPeriod: BlockNumber = 80 * HOURS;
+ pub const ClaimPeriod: BlockNumber = 80 * HOURS;
pub const PeriodSpend: Balance = 500 * DOLLARS;
pub const MaxLockDuration: BlockNumber = 36 * 30 * DAYS;
pub const ChallengePeriod: BlockNumber = 7 * DAYS;
- pub const MaxCandidateIntake: u32 = 10;
+ pub const MaxPayouts: u32 = 10;
+ pub const MaxBids: u32 = 10;
pub const SocietyPalletId: PalletId = PalletId(*b"py/socie");
}
@@ -1415,18 +1433,17 @@ impl pallet_society::Config for Runtime {
type PalletId = SocietyPalletId;
type Currency = Balances;
type Randomness = RandomnessCollectiveFlip;
- type CandidateDeposit = CandidateDeposit;
- type WrongSideDeduction = WrongSideDeduction;
- type MaxStrikes = MaxStrikes;
+ type GraceStrikes = GraceStrikes;
type PeriodSpend = PeriodSpend;
- type MembershipChanged = ();
- type RotationPeriod = RotationPeriod;
+ type VotingPeriod = SocietyVotingPeriod;
+ type ClaimPeriod = ClaimPeriod;
type MaxLockDuration = MaxLockDuration;
type FounderSetOrigin =
pallet_collective::EnsureProportionMoreThan;
- type SuspensionJudgementOrigin = pallet_society::EnsureFounder;
- type MaxCandidateIntake = MaxCandidateIntake;
type ChallengePeriod = ChallengePeriod;
+ type MaxPayouts = MaxPayouts;
+ type MaxBids = MaxBids;
+ type WeightInfo = pallet_society::weights::SubstrateWeight;
}
parameter_types! {
@@ -1450,7 +1467,6 @@ impl pallet_vesting::Config for Runtime {
impl pallet_mmr::Config for Runtime {
const INDEXING_PREFIX: &'static [u8] = b"mmr";
type Hashing = ::Hashing;
- type Hash = ::Hash;
type LeafData = pallet_mmr::ParentNumberAndHash;
type OnNewRoot = ();
type WeightInfo = ();
@@ -1483,7 +1499,7 @@ parameter_types! {
pub const MetadataDepositPerByte: Balance = 1 * DOLLARS;
}
-impl pallet_assets::Config for Runtime {
+impl pallet_assets::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type Balance = u128;
type AssetId = u32;
@@ -1506,6 +1522,66 @@ impl pallet_assets::Config for Runtime {
type BenchmarkHelper = ();
}
+ord_parameter_types! {
+ pub const AssetConversionOrigin: AccountId = AccountIdConversion::::into_account_truncating(&AssetConversionPalletId::get());
+}
+
+impl pallet_assets::Config for Runtime {
+ type RuntimeEvent = RuntimeEvent;
+ type Balance = u128;
+ type AssetId = u32;
+ type AssetIdParameter = codec::Compact;
+ type Currency = Balances;
+ type CreateOrigin = AsEnsureOriginWithArg>;
+ type ForceOrigin = EnsureRoot;
+ type AssetDeposit = AssetDeposit;
+ type AssetAccountDeposit = ConstU128;
+ type MetadataDepositBase = MetadataDepositBase;
+ type MetadataDepositPerByte = MetadataDepositPerByte;
+ type ApprovalDeposit = ApprovalDeposit;
+ type StringLimit = StringLimit;
+ type Freezer = ();
+ type Extra = ();
+ type WeightInfo = pallet_assets::weights::SubstrateWeight;
+ type RemoveItemsLimit = ConstU32<1000>;
+ type CallbackHandle = ();
+ #[cfg(feature = "runtime-benchmarks")]
+ type BenchmarkHelper = ();
+}
+
+parameter_types! {
+ pub const AssetConversionPalletId: PalletId = PalletId(*b"py/ascon");
+ pub AllowMultiAssetPools: bool = true;
+ pub const PoolSetupFee: Balance = 1 * DOLLARS; // should be more or equal to the existential deposit
+ pub const MintMinLiquidity: Balance = 100; // 100 is good enough when the main currency has 10-12 decimals.
+ pub const LiquidityWithdrawalFee: Permill = Permill::from_percent(0); // should be non-zero if AllowMultiAssetPools is true, otherwise can be zero.
+}
+
+impl pallet_asset_conversion::Config for Runtime {
+ type RuntimeEvent = RuntimeEvent;
+ type Currency = Balances;
+ type AssetBalance = ::Balance;
+ type HigherPrecisionBalance = sp_core::U256;
+ type Assets = Assets;
+ type Balance = u128;
+ type PoolAssets = PoolAssets;
+ type AssetId = >::AssetId;
+ type MultiAssetId = NativeOrAssetId;
+ type PoolAssetId = >::AssetId;
+ type PalletId = AssetConversionPalletId;
+ type LPFee = ConstU32<3>; // means 0.3%
+ type PoolSetupFee = PoolSetupFee;
+ type PoolSetupFeeReceiver = AssetConversionOrigin;
+ type LiquidityWithdrawalFee = LiquidityWithdrawalFee;
+ type WeightInfo = pallet_asset_conversion::weights::SubstrateWeight;
+ type AllowMultiAssetPools = AllowMultiAssetPools;
+ type MaxSwapPathLength = ConstU32<4>;
+ type MintMinLiquidity = MintMinLiquidity;
+ type MultiAssetIdConverter = NativeOrAssetIdConverter;
+ #[cfg(feature = "runtime-benchmarks")]
+ type BenchmarkHelper = ();
+}
+
parameter_types! {
pub const QueueCount: u32 = 300;
pub const MaxQueueLen: u32 = 1000;
@@ -1518,7 +1594,6 @@ parameter_types! {
pub const ThawThrottle: (Perquintill, BlockNumber) = (Perquintill::from_percent(25), 5);
pub Target: Perquintill = Perquintill::zero();
pub const NisPalletId: PalletId = PalletId(*b"py/nis ");
- pub const NisHoldReason: HoldReason = HoldReason::Nis;
}
impl pallet_nis::Config for Runtime {
@@ -1542,14 +1617,12 @@ impl pallet_nis::Config for Runtime {
type IntakePeriod = IntakePeriod;
type MaxIntakeWeight = MaxIntakeWeight;
type ThawThrottle = ThawThrottle;
- type HoldReason = NisHoldReason;
+ type RuntimeHoldReason = RuntimeHoldReason;
}
parameter_types! {
pub const CollectionDeposit: Balance = 100 * DOLLARS;
pub const ItemDeposit: Balance = 1 * DOLLARS;
- pub const KeyLimit: u32 = 32;
- pub const ValueLimit: u32 = 256;
pub const ApprovalsLimit: u32 = 20;
pub const ItemAttributesApprovalsLimit: u32 = 20;
pub const MaxTips: u32 = 10;
@@ -1567,9 +1640,9 @@ impl pallet_uniques::Config for Runtime {
type MetadataDepositBase = MetadataDepositBase;
type AttributeDepositBase = MetadataDepositBase;
type DepositPerByte = MetadataDepositPerByte;
- type StringLimit = StringLimit;
- type KeyLimit = KeyLimit;
- type ValueLimit = ValueLimit;
+ type StringLimit = ConstU32<128>;
+ type KeyLimit = ConstU32<32>;
+ type ValueLimit = ConstU32<64>;
type WeightInfo = pallet_uniques::weights::SubstrateWeight;
#[cfg(feature = "runtime-benchmarks")]
type Helper = ();
@@ -1612,6 +1685,32 @@ impl pallet_core_fellowship::Config for Runtime {
type EvidenceSize = ConstU32<16_384>;
}
+parameter_types! {
+ pub const NftFractionalizationPalletId: PalletId = PalletId(*b"fraction");
+ pub NewAssetSymbol: BoundedVec = (*b"FRAC").to_vec().try_into().unwrap();
+ pub NewAssetName: BoundedVec = (*b"Frac").to_vec().try_into().unwrap();
+}
+
+impl pallet_nft_fractionalization::Config for Runtime {
+ type RuntimeEvent = RuntimeEvent;
+ type Deposit = AssetDeposit;
+ type Currency = Balances;
+ type NewAssetSymbol = NewAssetSymbol;
+ type NewAssetName = NewAssetName;
+ type StringLimit = StringLimit;
+ type NftCollectionId = ::CollectionId;
+ type NftId = ::ItemId;
+ type AssetBalance = ::Balance;
+ type AssetId = >::AssetId;
+ type Assets = Assets;
+ type Nfts = Nfts;
+ type PalletId = NftFractionalizationPalletId;
+ type WeightInfo = pallet_nft_fractionalization::weights::SubstrateWeight;
+ type RuntimeHoldReason = RuntimeHoldReason;
+ #[cfg(feature = "runtime-benchmarks")]
+ type BenchmarkHelper = ();
+}
+
parameter_types! {
pub Features: PalletFeatures = PalletFeatures::all_enabled();
pub const MaxAttributesPerCall: u32 = 10;
@@ -1628,9 +1727,9 @@ impl pallet_nfts::Config for Runtime {
type MetadataDepositBase = MetadataDepositBase;
type AttributeDepositBase = MetadataDepositBase;
type DepositPerByte = MetadataDepositPerByte;
- type StringLimit = StringLimit;
- type KeyLimit = KeyLimit;
- type ValueLimit = ValueLimit;
+ type StringLimit = ConstU32<256>;
+ type KeyLimit = ConstU32<64>;
+ type ValueLimit = ConstU32<256>;
type ApprovalsLimit = ApprovalsLimit;
type ItemAttributesApprovalsLimit = ItemAttributesApprovalsLimit;
type MaxTips = MaxTips;
@@ -1778,10 +1877,7 @@ impl pallet_statement::Config for Runtime {
}
construct_runtime!(
- pub struct Runtime where
- Block = Block,
- NodeBlock = node_primitives::Block,
- UncheckedExtrinsic = UncheckedExtrinsic
+ pub struct Runtime
{
System: frame_system,
Utility: pallet_utility,
@@ -1794,6 +1890,7 @@ construct_runtime!(
Balances: pallet_balances,
TransactionPayment: pallet_transaction_payment,
AssetTxPayment: pallet_asset_tx_payment,
+ AssetConversionTxPayment: pallet_asset_conversion_tx_payment,
ElectionProviderMultiPhase: pallet_election_provider_multi_phase,
Staking: pallet_staking,
Session: pallet_session,
@@ -1823,12 +1920,14 @@ construct_runtime!(
Multisig: pallet_multisig,
Bounties: pallet_bounties,
Tips: pallet_tips,
- Assets: pallet_assets,
+ Assets: pallet_assets::,
+ PoolAssets: pallet_assets::,
Mmr: pallet_mmr,
Lottery: pallet_lottery,
Nis: pallet_nis,
Uniques: pallet_uniques,
Nfts: pallet_nfts,
+ NftFractionalization: pallet_nft_fractionalization,
Salary: pallet_salary,
CoreFellowship: pallet_core_fellowship,
TransactionStorage: pallet_transaction_storage,
@@ -1845,6 +1944,7 @@ construct_runtime!(
NominationPools: pallet_nomination_pools,
RankedPolls: pallet_referenda::,
RankedCollective: pallet_ranked_collective,
+ AssetConversion: pallet_asset_conversion,
FastUnstake: pallet_fast_unstake,
MessageQueue: pallet_message_queue,
Pov: frame_benchmarking_pallet_pov,
@@ -1875,7 +1975,7 @@ pub type SignedExtra = (
frame_system::CheckEra,
frame_system::CheckNonce,
frame_system::CheckWeight,
- pallet_asset_tx_payment::ChargeAssetTxPayment,
+ pallet_asset_conversion_tx_payment::ChargeAssetTxPayment,
);
/// Unchecked extrinsic type as expected by this runtime.
@@ -1914,7 +2014,7 @@ mod mmr {
pub use pallet_mmr::primitives::*;
pub type Leaf = <::LeafData as LeafDataProvider>::LeafData;
- pub type Hash = ::Hash;
+ pub type Hash = ::Output;
pub type Hashing = ::Hashing;
}
@@ -1935,6 +2035,7 @@ mod benches {
[pallet_contracts, Contracts]
[pallet_core_fellowship, CoreFellowship]
[pallet_democracy, Democracy]
+ [pallet_asset_conversion, AssetConversion]
[pallet_election_provider_multi_phase, ElectionProviderMultiPhase]
[pallet_election_provider_support_benchmarking, EPSBench::]
[pallet_elections_phragmen, Elections]
@@ -1961,6 +2062,7 @@ mod benches {
[pallet_scheduler, Scheduler]
[pallet_glutton, Glutton]
[pallet_session, SessionBench::]
+ [pallet_society, Society]
[pallet_staking, Staking]
[pallet_state_trie_migration, StateTrieMigration]
[pallet_sudo, Sudo]
@@ -1972,6 +2074,7 @@ mod benches {
[pallet_asset_rate, AssetRate]
[pallet_uniques, Uniques]
[pallet_nfts, Nfts]
+ [pallet_nft_fractionalization, NftFractionalization]
[pallet_utility, Utility]
[pallet_vesting, Vesting]
[pallet_whitelist, Whitelist]
@@ -2161,8 +2264,8 @@ impl_runtime_apis! {
}
}
- impl frame_system_rpc_runtime_api::AccountNonceApi for Runtime {
- fn account_nonce(account: AccountId) -> Index {
+ impl frame_system_rpc_runtime_api::AccountNonceApi for Runtime {
+ fn account_nonce(account: AccountId) -> Nonce {
System::account_nonce(account)
}
}
@@ -2271,6 +2374,26 @@ impl_runtime_apis! {
}
}
+ impl pallet_asset_conversion::AssetConversionApi<
+ Block,
+ Balance,
+ u128,
+ NativeOrAssetId
+ > for Runtime
+ {
+ fn quote_price_exact_tokens_for_tokens(asset1: NativeOrAssetId, asset2: NativeOrAssetId, amount: u128, include_fee: bool) -> Option {
+ AssetConversion::quote_price_exact_tokens_for_tokens(asset1, asset2, amount, include_fee)
+ }
+
+ fn quote_price_tokens_for_exact_tokens(asset1: NativeOrAssetId, asset2: NativeOrAssetId, amount: u128, include_fee: bool) -> Option {
+ AssetConversion::quote_price_tokens_for_exact_tokens(asset1, asset2, amount, include_fee)
+ }
+
+ fn get_reserves(asset1: NativeOrAssetId, asset2: NativeOrAssetId) -> Option<(Balance, Balance)> {
+ AssetConversion::get_reserves(&asset1, &asset2).ok()
+ }
+ }
+
impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi
for Runtime
{
diff --git a/bin/node/testing/Cargo.toml b/bin/node/testing/Cargo.toml
index a43b2b9ba13e5..711c48c34329d 100644
--- a/bin/node/testing/Cargo.toml
+++ b/bin/node/testing/Cargo.toml
@@ -13,7 +13,7 @@ publish = false
targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
-codec = { package = "parity-scale-codec", version = "3.2.2" }
+codec = { package = "parity-scale-codec", version = "3.6.1" }
fs_extra = "1"
futures = "0.3.21"
log = "0.4.17"
@@ -22,9 +22,10 @@ frame-system = { version = "4.0.0-dev", path = "../../../frame/system" }
node-executor = { version = "3.0.0-dev", path = "../executor" }
node-primitives = { version = "2.0.0", path = "../primitives" }
kitchensink-runtime = { version = "3.0.0-dev", path = "../runtime" }
+pallet-asset-conversion = { version = "4.0.0-dev", path = "../../../frame/asset-conversion" }
pallet-assets = { version = "4.0.0-dev", path = "../../../frame/assets" }
+pallet-asset-conversion-tx-payment = { version = "4.0.0-dev", path = "../../../frame/transaction-payment/asset-conversion-tx-payment" }
pallet-asset-tx-payment = { version = "4.0.0-dev", path = "../../../frame/transaction-payment/asset-tx-payment" }
-pallet-transaction-payment = { version = "4.0.0-dev", path = "../../../frame/transaction-payment" }
sc-block-builder = { version = "0.10.0-dev", path = "../../../client/block-builder" }
sc-client-api = { version = "4.0.0-dev", path = "../../../client/api" }
sc-client-db = { version = "0.10.0-dev", features = ["rocksdb"], path = "../../../client/db" }
@@ -38,10 +39,10 @@ sp-api = { version = "4.0.0-dev", path = "../../../primitives/api" }
sp-block-builder = { version = "4.0.0-dev", path = "../../../primitives/block-builder" }
sp-blockchain = { version = "4.0.0-dev", path = "../../../primitives/blockchain" }
sp-consensus = { version = "0.10.0-dev", path = "../../../primitives/consensus/common" }
-sp-core = { version = "7.0.0", path = "../../../primitives/core" }
+sp-core = { version = "21.0.0", path = "../../../primitives/core" }
sp-inherents = { version = "4.0.0-dev", path = "../../../primitives/inherents" }
-sp-io = { version = "7.0.0", path = "../../../primitives/io" }
-sp-keyring = { version = "7.0.0", path = "../../../primitives/keyring" }
-sp-runtime = { version = "7.0.0", path = "../../../primitives/runtime" }
+sp-io = { version = "23.0.0", path = "../../../primitives/io" }
+sp-keyring = { version = "24.0.0", path = "../../../primitives/keyring" }
+sp-runtime = { version = "24.0.0", path = "../../../primitives/runtime" }
sp-timestamp = { version = "4.0.0-dev", default-features = false, path = "../../../primitives/timestamp" }
substrate-test-client = { version = "2.0.0", path = "../../../test-utils/client" }
diff --git a/bin/node/testing/src/bench.rs b/bin/node/testing/src/bench.rs
index 9dbb26a906e6f..f1ab2212239b1 100644
--- a/bin/node/testing/src/bench.rs
+++ b/bin/node/testing/src/bench.rs
@@ -40,17 +40,14 @@ use kitchensink_runtime::{
};
use node_primitives::Block;
use sc_block_builder::BlockBuilderProvider;
-use sc_client_api::{
- execution_extensions::{ExecutionExtensions, ExecutionStrategies},
- ExecutionStrategy,
-};
+use sc_client_api::execution_extensions::ExecutionExtensions;
use sc_client_db::PruningMode;
use sc_consensus::{BlockImport, BlockImportParams, ForkChoiceStrategy, ImportResult, ImportedAux};
use sc_executor::{NativeElseWasmExecutor, WasmExecutionMethod, WasmtimeInstantiationStrategy};
use sp_api::ProvideRuntimeApi;
use sp_block_builder::BlockBuilder;
use sp_consensus::BlockOrigin;
-use sp_core::{blake2_256, ed25519, sr25519, traits::SpawnNamed, ExecutionContext, Pair, Public};
+use sp_core::{blake2_256, ed25519, sr25519, traits::SpawnNamed, Pair, Public};
use sp_inherents::InherentData;
use sp_runtime::{
traits::{Block as BlockT, IdentifyAccount, Verify},
@@ -354,7 +351,7 @@ impl BenchDb {
dir.path().to_string_lossy(),
);
let (_client, _backend, _task_executor) =
- Self::bench_client(database_type, dir.path(), Profile::Native, &keyring);
+ Self::bench_client(database_type, dir.path(), &keyring);
let directory_guard = Guard(dir);
BenchDb { keyring, directory_guard, database_type }
@@ -380,7 +377,6 @@ impl BenchDb {
fn bench_client(
database_type: DatabaseType,
dir: &std::path::Path,
- profile: Profile,
keyring: &BenchKeyring,
) -> (Client, std::sync::Arc, TaskExecutor) {
let db_config = sc_client_db::DatabaseSettings {
@@ -415,12 +411,7 @@ impl BenchDb {
genesis_block_builder,
None,
None,
- ExecutionExtensions::new(
- profile.into_execution_strategies(),
- None,
- None,
- Arc::new(executor),
- ),
+ ExecutionExtensions::new(None, Arc::new(executor)),
Box::new(task_executor.clone()),
None,
None,
@@ -444,11 +435,7 @@ impl BenchDb {
client
.runtime_api()
- .inherent_extrinsics_with_context(
- client.chain_info().genesis_hash,
- ExecutionContext::BlockConstruction,
- inherent_data,
- )
+ .inherent_extrinsics(client.chain_info().genesis_hash, inherent_data)
.expect("Get inherents failed")
}
@@ -459,12 +446,8 @@ impl BenchDb {
/// Get cliet for this database operations.
pub fn client(&mut self) -> Client {
- let (client, _backend, _task_executor) = Self::bench_client(
- self.database_type,
- self.directory_guard.path(),
- Profile::Wasm,
- &self.keyring,
- );
+ let (client, _backend, _task_executor) =
+ Self::bench_client(self.database_type, self.directory_guard.path(), &self.keyring);
client
}
@@ -507,10 +490,10 @@ impl BenchDb {
}
/// Clone this database and create context for testing/benchmarking.
- pub fn create_context(&self, profile: Profile) -> BenchContext {
+ pub fn create_context(&self) -> BenchContext {
let BenchDb { directory_guard, keyring, database_type } = self.clone();
let (client, backend, task_executor) =
- Self::bench_client(database_type, directory_guard.path(), profile, &keyring);
+ Self::bench_client(database_type, directory_guard.path(), &keyring);
BenchContext {
client: Arc::new(client),
@@ -603,7 +586,7 @@ impl BenchKeyring {
}
/// Generate genesis with accounts from this keyring endowed with some balance.
- pub fn generate_genesis(&self) -> kitchensink_runtime::GenesisConfig {
+ pub fn generate_genesis(&self) -> kitchensink_runtime::RuntimeGenesisConfig {
crate::genesis::config_endowed(
Some(kitchensink_runtime::wasm_binary_unwrap()),
self.collect_account_ids(),
@@ -611,36 +594,6 @@ impl BenchKeyring {
}
}
-/// Profile for exetion strategies.
-#[derive(Clone, Copy, Debug)]
-pub enum Profile {
- /// As native as possible.
- Native,
- /// As wasm as possible.
- Wasm,
-}
-
-impl Profile {
- fn into_execution_strategies(self) -> ExecutionStrategies {
- match self {
- Profile::Wasm => ExecutionStrategies {
- syncing: ExecutionStrategy::AlwaysWasm,
- importing: ExecutionStrategy::AlwaysWasm,
- block_construction: ExecutionStrategy::AlwaysWasm,
- offchain_worker: ExecutionStrategy::AlwaysWasm,
- other: ExecutionStrategy::AlwaysWasm,
- },
- Profile::Native => ExecutionStrategies {
- syncing: ExecutionStrategy::NativeElseWasm,
- importing: ExecutionStrategy::NativeElseWasm,
- block_construction: ExecutionStrategy::NativeElseWasm,
- offchain_worker: ExecutionStrategy::NativeElseWasm,
- other: ExecutionStrategy::NativeElseWasm,
- },
- }
- }
-}
-
struct Guard(tempfile::TempDir);
impl Guard {
diff --git a/bin/node/testing/src/client.rs b/bin/node/testing/src/client.rs
index 8594a4a2e2d32..c55867360bd62 100644
--- a/bin/node/testing/src/client.rs
+++ b/bin/node/testing/src/client.rs
@@ -18,7 +18,6 @@
//! Utilities to build a `TestClient` for `kitchensink-runtime`.
-use sc_service::client;
use sp_runtime::BuildStorage;
/// Re-export test-client utilities.
pub use substrate_test_client::*;
@@ -37,9 +36,6 @@ pub type Client = client::Client<
kitchensink_runtime::RuntimeApi,
>;
-/// Transaction for kitchensink-runtime.
-pub type Transaction = sc_client_api::backend::TransactionFor;
-
/// Genesis configuration parameters for `TestClient`.
#[derive(Default)]
pub struct GenesisParameters;
diff --git a/bin/node/testing/src/genesis.rs b/bin/node/testing/src/genesis.rs
index d542bb29c2539..8063b8ef45708 100644
--- a/bin/node/testing/src/genesis.rs
+++ b/bin/node/testing/src/genesis.rs
@@ -21,20 +21,21 @@
use crate::keyring::*;
use kitchensink_runtime::{
constants::currency::*, wasm_binary_unwrap, AccountId, AssetsConfig, BabeConfig,
- BalancesConfig, GenesisConfig, GrandpaConfig, IndicesConfig, SessionConfig, SocietyConfig,
- StakerStatus, StakingConfig, SystemConfig, BABE_GENESIS_EPOCH_CONFIG,
+ BalancesConfig, GluttonConfig, GrandpaConfig, IndicesConfig, RuntimeGenesisConfig,
+ SessionConfig, SocietyConfig, StakerStatus, StakingConfig, SystemConfig,
+ BABE_GENESIS_EPOCH_CONFIG,
};
use sp_keyring::{Ed25519Keyring, Sr25519Keyring};
use sp_runtime::Perbill;
/// Create genesis runtime configuration for tests.
-pub fn config(code: Option<&[u8]>) -> GenesisConfig {
+pub fn config(code: Option<&[u8]>) -> RuntimeGenesisConfig {
config_endowed(code, Default::default())
}
/// Create genesis runtime configuration for tests with some extra
/// endowed accounts.
-pub fn config_endowed(code: Option<&[u8]>, extra_endowed: Vec) -> GenesisConfig {
+pub fn config_endowed(code: Option<&[u8]>, extra_endowed: Vec) -> RuntimeGenesisConfig {
let mut endowed = vec![
(alice(), 111 * DOLLARS),
(bob(), 100 * DOLLARS),
@@ -46,9 +47,10 @@ pub fn config_endowed(code: Option<&[u8]>, extra_endowed: Vec