From b360360544b007de8f0f418722b4f468b14c7c4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Silva?= <123550+andresilva@users.noreply.github.com> Date: Wed, 10 Mar 2021 17:22:59 +0000 Subject: [PATCH] runtime: use babe as randomness source (#2504) * runtime: use babe as randomness source * runtime: fix randomness api * bridges: fix random_seed * parachains: use mock TestRandomness from frame_support_test * parachains: use mock TestRandomness from frame_support_test * runtime: update randomness source in test-runtime * runtime: remove unused import * parachains: add todo to audit usage of randomness api * "Update Substrate" Co-authored-by: parity-processbot <> --- polkadot/Cargo.lock | 317 ++++++++++-------- .../bridges/bin/millau/runtime/src/lib.rs | 2 +- .../bridges/bin/rialto/runtime/src/lib.rs | 2 +- polkadot/runtime/common/Cargo.toml | 1 + .../runtime/common/src/paras_registrar.rs | 13 +- polkadot/runtime/common/src/slots.rs | 5 +- polkadot/runtime/kusama/src/lib.rs | 4 +- polkadot/runtime/parachains/Cargo.toml | 1 + .../runtime/parachains/src/initializer.rs | 6 +- polkadot/runtime/parachains/src/mock.rs | 13 +- polkadot/runtime/polkadot/src/lib.rs | 2 +- polkadot/runtime/rococo/src/lib.rs | 8 +- polkadot/runtime/test-runtime/src/lib.rs | 4 +- polkadot/runtime/westend/src/lib.rs | 2 +- 14 files changed, 201 insertions(+), 179 deletions(-) diff --git a/polkadot/Cargo.lock b/polkadot/Cargo.lock index 33c7139700..b02fcf75f7 100644 --- a/polkadot/Cargo.lock +++ b/polkadot/Cargo.lock @@ -1646,7 +1646,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "parity-scale-codec", ] @@ -1664,7 +1664,7 @@ dependencies = [ [[package]] name = "frame-benchmarking" version = "3.1.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "frame-support", "frame-system", @@ -1683,7 +1683,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "Inflector", "chrono", @@ -1706,7 +1706,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "frame-support", "frame-system", @@ -1722,7 +1722,7 @@ dependencies = [ [[package]] name = "frame-metadata" version = "13.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "parity-scale-codec", "serde", @@ -1733,7 +1733,7 @@ dependencies = [ [[package]] name = "frame-support" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "bitflags", "frame-metadata", @@ -1759,7 +1759,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "Inflector", "frame-support-procedural-tools", @@ -1771,7 +1771,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate 1.0.0", @@ -1783,17 +1783,38 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "proc-macro2", "quote", "syn", ] +[[package]] +name = "frame-support-test" +version = "3.0.0" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" +dependencies = [ + "frame-metadata", + "frame-support", + "frame-system", + "parity-scale-codec", + "pretty_assertions", + "rustversion", + "serde", + "sp-core", + "sp-inherents", + "sp-io", + "sp-runtime", + "sp-state-machine", + "sp-std", + "trybuild", +] + [[package]] name = "frame-system" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "frame-support", "impl-trait-for-tuples", @@ -1810,7 +1831,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "frame-benchmarking", "frame-support", @@ -1824,7 +1845,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "parity-scale-codec", "sp-api", @@ -1833,7 +1854,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "frame-support", "parity-scale-codec", @@ -4135,7 +4156,7 @@ checksum = "13370dae44474229701bb69b90b4f4dca6404cb0357a2d50d635f1171dc3aa7b" [[package]] name = "pallet-authority-discovery" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "frame-support", "frame-system", @@ -4151,7 +4172,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "frame-support", "frame-system", @@ -4166,7 +4187,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "frame-benchmarking", "frame-support", @@ -4191,7 +4212,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "frame-benchmarking", "frame-support", @@ -4206,7 +4227,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "frame-benchmarking", "frame-support", @@ -4221,7 +4242,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "frame-benchmarking", "frame-support", @@ -4238,7 +4259,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "frame-benchmarking", "frame-support", @@ -4253,7 +4274,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "frame-benchmarking", "frame-support", @@ -4274,7 +4295,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "frame-benchmarking", "frame-support", @@ -4290,7 +4311,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "frame-benchmarking", "frame-support", @@ -4312,7 +4333,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "enumflags2", "frame-benchmarking", @@ -4328,7 +4349,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "frame-benchmarking", "frame-support", @@ -4348,7 +4369,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "frame-benchmarking", "frame-support", @@ -4365,7 +4386,7 @@ dependencies = [ [[package]] name = "pallet-membership" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "frame-support", "frame-system", @@ -4379,7 +4400,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "frame-benchmarking", "frame-support", @@ -4395,7 +4416,7 @@ dependencies = [ [[package]] name = "pallet-nicks" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "frame-support", "frame-system", @@ -4409,7 +4430,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "frame-support", "frame-system", @@ -4425,7 +4446,7 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "frame-benchmarking", "frame-support", @@ -4447,7 +4468,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "frame-benchmarking", "frame-support", @@ -4463,7 +4484,7 @@ dependencies = [ [[package]] name = "pallet-randomness-collective-flip" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "frame-support", "frame-system", @@ -4476,7 +4497,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "enumflags2", "frame-support", @@ -4491,7 +4512,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "frame-benchmarking", "frame-support", @@ -4507,7 +4528,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "frame-support", "frame-system", @@ -4527,7 +4548,7 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "frame-benchmarking", "frame-support", @@ -4543,7 +4564,7 @@ dependencies = [ [[package]] name = "pallet-society" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "frame-support", "frame-system", @@ -4557,7 +4578,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "frame-benchmarking", "frame-support", @@ -4581,7 +4602,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "proc-macro-crate 1.0.0", "proc-macro2", @@ -4592,7 +4613,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "frame-support", "frame-system", @@ -4606,7 +4627,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "frame-benchmarking", "frame-support", @@ -4625,7 +4646,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "frame-benchmarking", "frame-support", @@ -4640,7 +4661,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "frame-support", "frame-system", @@ -4656,7 +4677,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -4673,7 +4694,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -4684,7 +4705,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "frame-benchmarking", "frame-support", @@ -4700,7 +4721,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "frame-benchmarking", "frame-support", @@ -4716,7 +4737,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "enumflags2", "frame-benchmarking", @@ -5959,6 +5980,7 @@ dependencies = [ "bitvec", "frame-benchmarking", "frame-support", + "frame-support-test", "frame-system", "hex-literal", "libsecp256k1", @@ -6008,6 +6030,7 @@ dependencies = [ "derive_more", "frame-benchmarking", "frame-support", + "frame-support-test", "frame-system", "futures 0.3.12", "hex-literal", @@ -6906,7 +6929,7 @@ dependencies = [ [[package]] name = "remote-externalities" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "env_logger 0.8.2", "hex-literal", @@ -7109,6 +7132,12 @@ dependencies = [ "security-framework", ] +[[package]] +name = "rustversion" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb5d2a036dc6d2d8fd16fde3498b04306e29bd193bf306a57427019b823d5acd" + [[package]] name = "rw-stream-sink" version = "0.2.1" @@ -7156,7 +7185,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "async-trait", "derive_more", @@ -7184,7 +7213,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "futures 0.3.12", "futures-timer 3.0.2", @@ -7207,7 +7236,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -7223,7 +7252,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -7244,7 +7273,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "proc-macro-crate 1.0.0", "proc-macro2", @@ -7255,7 +7284,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "chrono", "fdlimit", @@ -7293,7 +7322,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "derive_more", "fnv", @@ -7327,7 +7356,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "blake2-rfc", "hash-db", @@ -7357,7 +7386,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "sc-client-api", "sp-blockchain", @@ -7368,7 +7397,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "derive_more", "fork-tree", @@ -7414,7 +7443,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "derive_more", "futures 0.3.12", @@ -7438,7 +7467,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "fork-tree", "parity-scale-codec", @@ -7451,7 +7480,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "futures 0.3.12", "futures-timer 3.0.2", @@ -7477,7 +7506,7 @@ dependencies = [ [[package]] name = "sc-consensus-uncles" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "log", "sc-client-api", @@ -7491,7 +7520,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "derive_more", "lazy_static", @@ -7520,7 +7549,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "derive_more", "parity-scale-codec", @@ -7536,7 +7565,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "log", "parity-scale-codec", @@ -7551,7 +7580,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "log", "parity-scale-codec", @@ -7569,7 +7598,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "derive_more", "dyn-clone", @@ -7608,7 +7637,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa-rpc" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "derive_more", "finality-grandpa", @@ -7632,7 +7661,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa-warp-sync" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "derive_more", "futures 0.3.12", @@ -7653,7 +7682,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "ansi_term 0.12.1", "futures 0.3.12", @@ -7671,7 +7700,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "async-trait", "derive_more", @@ -7691,7 +7720,7 @@ dependencies = [ [[package]] name = "sc-light" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "hash-db", "lazy_static", @@ -7710,7 +7739,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "async-std", "async-trait", @@ -7763,7 +7792,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "futures 0.3.12", "futures-timer 3.0.2", @@ -7779,7 +7808,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "bytes 0.5.6", "fnv", @@ -7807,7 +7836,7 @@ dependencies = [ [[package]] name = "sc-peerset" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "futures 0.3.12", "libp2p", @@ -7820,7 +7849,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -7829,7 +7858,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "futures 0.3.12", "hash-db", @@ -7863,7 +7892,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "derive_more", "futures 0.3.12", @@ -7887,7 +7916,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "futures 0.1.29", "jsonrpc-core", @@ -7905,7 +7934,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "directories", "exit-future", @@ -7968,7 +7997,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "log", "parity-scale-codec", @@ -7983,7 +8012,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -8003,7 +8032,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "chrono", "futures 0.3.12", @@ -8025,7 +8054,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "ansi_term 0.12.1", "atty", @@ -8053,7 +8082,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "proc-macro-crate 1.0.0", "proc-macro2", @@ -8064,7 +8093,7 @@ dependencies = [ [[package]] name = "sc-transaction-graph" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "derive_more", "futures 0.3.12", @@ -8086,7 +8115,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "futures 0.3.12", "futures-diagnose", @@ -8492,7 +8521,7 @@ dependencies = [ [[package]] name = "sp-allocator" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "log", "sp-core", @@ -8504,7 +8533,7 @@ dependencies = [ [[package]] name = "sp-api" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "hash-db", "log", @@ -8521,7 +8550,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "blake2-rfc", "proc-macro-crate 1.0.0", @@ -8533,7 +8562,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "parity-scale-codec", "serde", @@ -8545,7 +8574,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "integer-sqrt", "num-traits", @@ -8558,7 +8587,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "parity-scale-codec", "sp-api", @@ -8570,7 +8599,7 @@ dependencies = [ [[package]] name = "sp-authorship" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "parity-scale-codec", "sp-inherents", @@ -8581,7 +8610,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "parity-scale-codec", "sp-api", @@ -8593,7 +8622,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "futures 0.3.12", "log", @@ -8611,7 +8640,7 @@ dependencies = [ [[package]] name = "sp-chain-spec" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "serde", "serde_json", @@ -8620,7 +8649,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "futures 0.3.12", "futures-timer 3.0.2", @@ -8646,7 +8675,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "merlin", "parity-scale-codec", @@ -8667,7 +8696,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "parity-scale-codec", "sp-arithmetic", @@ -8677,7 +8706,7 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "parity-scale-codec", "schnorrkel", @@ -8689,7 +8718,7 @@ dependencies = [ [[package]] name = "sp-core" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "base58", "blake2-rfc", @@ -8733,7 +8762,7 @@ dependencies = [ [[package]] name = "sp-database" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "kvdb", "parking_lot 0.11.1", @@ -8742,7 +8771,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "proc-macro2", "quote", @@ -8752,7 +8781,7 @@ dependencies = [ [[package]] name = "sp-election-providers" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "parity-scale-codec", "sp-arithmetic", @@ -8763,7 +8792,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "environmental", "parity-scale-codec", @@ -8774,7 +8803,7 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "finality-grandpa", "log", @@ -8791,7 +8820,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "parity-scale-codec", "parking_lot 0.11.1", @@ -8803,7 +8832,7 @@ dependencies = [ [[package]] name = "sp-io" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "futures 0.3.12", "hash-db", @@ -8827,7 +8856,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "lazy_static", "sp-core", @@ -8838,7 +8867,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "async-trait", "derive_more", @@ -8855,7 +8884,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "parity-scale-codec", "serde", @@ -8868,7 +8897,7 @@ dependencies = [ [[package]] name = "sp-npos-elections-compact" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "proc-macro-crate 1.0.0", "proc-macro2", @@ -8879,7 +8908,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "sp-api", "sp-core", @@ -8889,7 +8918,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "backtrace", ] @@ -8897,7 +8926,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "serde", "sp-core", @@ -8906,7 +8935,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "either", "hash256-std-hasher", @@ -8927,7 +8956,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -8944,7 +8973,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "Inflector", "proc-macro-crate 1.0.0", @@ -8956,7 +8985,7 @@ dependencies = [ [[package]] name = "sp-serializer" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "serde", "serde_json", @@ -8965,7 +8994,7 @@ dependencies = [ [[package]] name = "sp-session" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "parity-scale-codec", "sp-api", @@ -8978,7 +9007,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "parity-scale-codec", "sp-runtime", @@ -8988,7 +9017,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "hash-db", "log", @@ -9010,12 +9039,12 @@ dependencies = [ [[package]] name = "sp-std" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" [[package]] name = "sp-storage" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "impl-serde", "parity-scale-codec", @@ -9028,7 +9057,7 @@ dependencies = [ [[package]] name = "sp-tasks" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "log", "sp-core", @@ -9041,7 +9070,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -9055,7 +9084,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "log", "parity-scale-codec", @@ -9068,7 +9097,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "derive_more", "futures 0.3.12", @@ -9084,7 +9113,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "hash-db", "memory-db", @@ -9098,7 +9127,7 @@ dependencies = [ [[package]] name = "sp-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "futures 0.3.12", "futures-core", @@ -9110,7 +9139,7 @@ dependencies = [ [[package]] name = "sp-version" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "impl-serde", "parity-scale-codec", @@ -9122,7 +9151,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -9254,7 +9283,7 @@ dependencies = [ [[package]] name = "substrate-browser-utils" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "chrono", "console_error_panic_hook", @@ -9281,7 +9310,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "platforms", ] @@ -9289,7 +9318,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "frame-system-rpc-runtime-api", "futures 0.3.12", @@ -9312,7 +9341,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "async-std", "derive_more", @@ -9326,7 +9355,7 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "futures 0.1.29", "futures 0.3.12", @@ -9354,7 +9383,7 @@ dependencies = [ [[package]] name = "substrate-test-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "futures 0.3.12", "substrate-test-utils-derive", @@ -9364,7 +9393,7 @@ dependencies = [ [[package]] name = "substrate-test-utils-derive" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "proc-macro-crate 1.0.0", "quote", @@ -10047,7 +10076,7 @@ checksum = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382" [[package]] name = "try-runtime-cli" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#3adefdcea47a26c4904651e108129fd6b6ce132a" +source = "git+https://github.com/paritytech/substrate#b24c43af1a77168feed445136ea4569f1d132c3a" dependencies = [ "frame-try-runtime", "log", diff --git a/polkadot/bridges/bin/millau/runtime/src/lib.rs b/polkadot/bridges/bin/millau/runtime/src/lib.rs index bee7881f26..7446a72f2b 100644 --- a/polkadot/bridges/bin/millau/runtime/src/lib.rs +++ b/polkadot/bridges/bin/millau/runtime/src/lib.rs @@ -458,7 +458,7 @@ impl_runtime_apis! { } fn random_seed() -> ::Hash { - RandomnessCollectiveFlip::random_seed() + RandomnessCollectiveFlip::random_seed().0 } } diff --git a/polkadot/bridges/bin/rialto/runtime/src/lib.rs b/polkadot/bridges/bin/rialto/runtime/src/lib.rs index af1d7c6c9f..a904fb2c08 100644 --- a/polkadot/bridges/bin/rialto/runtime/src/lib.rs +++ b/polkadot/bridges/bin/rialto/runtime/src/lib.rs @@ -569,7 +569,7 @@ impl_runtime_apis! { } fn random_seed() -> ::Hash { - RandomnessCollectiveFlip::random_seed() + RandomnessCollectiveFlip::random_seed().0 } } diff --git a/polkadot/runtime/common/Cargo.toml b/polkadot/runtime/common/Cargo.toml index ec272f5e70..55c3b30973 100644 --- a/polkadot/runtime/common/Cargo.toml +++ b/polkadot/runtime/common/Cargo.toml @@ -48,6 +48,7 @@ sp-trie = { git = "https://github.com/paritytech/substrate", branch = "master" } pallet-babe = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-election-providers = { git = "https://github.com/paritytech/substrate", branch = "master" } +frame-support-test = { git = "https://github.com/paritytech/substrate", branch = "master" } pallet-randomness-collective-flip = { git = "https://github.com/paritytech/substrate", branch = "master" } pallet-staking-reward-curve = { git = "https://github.com/paritytech/substrate", branch = "master" } pallet-treasury = { git = "https://github.com/paritytech/substrate", branch = "master" } diff --git a/polkadot/runtime/common/src/paras_registrar.rs b/polkadot/runtime/common/src/paras_registrar.rs index e91e43b52d..11bad845f5 100644 --- a/polkadot/runtime/common/src/paras_registrar.rs +++ b/polkadot/runtime/common/src/paras_registrar.rs @@ -262,9 +262,10 @@ mod tests { }; use frame_system::limits; use frame_support::{ - traits::{Randomness, OnInitialize, OnFinalize}, + traits::{OnInitialize, OnFinalize}, assert_ok, assert_noop, parameter_types, }; + use frame_support_test::TestRandomness; use keyring::Sr25519Keyring; use runtime_parachains::{ initializer, configuration, inclusion, session_info, scheduler, dmp, ump, hrmp, shared, @@ -511,16 +512,8 @@ mod tests { impl session_info::Config for Test { } - pub struct TestRandomness; - - impl Randomness for TestRandomness { - fn random(_subject: &[u8]) -> H256 { - Default::default() - } - } - impl initializer::Config for Test { - type Randomness = TestRandomness; + type Randomness = TestRandomness; } impl scheduler::Config for Test { } diff --git a/polkadot/runtime/common/src/slots.rs b/polkadot/runtime/common/src/slots.rs index 122c010b2a..88c5400eab 100644 --- a/polkadot/runtime/common/src/slots.rs +++ b/polkadot/runtime/common/src/slots.rs @@ -54,7 +54,7 @@ pub trait Config: frame_system::Config { type LeasePeriod: Get; /// Something that provides randomness in the runtime. - type Randomness: Randomness; + type Randomness: Randomness; } /// Parachain registration API. @@ -582,7 +582,8 @@ impl Module { let ending_period = T::EndingPeriod::get(); if early_end + ending_period == now { // Just ended! - let offset = T::BlockNumber::decode(&mut T::Randomness::random_seed().as_ref()) + let (seed, _) = T::Randomness::random_seed(); + let offset = T::BlockNumber::decode(&mut seed.as_ref()) .expect("secure hashes always bigger than block numbers; qed") % ending_period; let res = >::get(offset).unwrap_or_default(); let mut i = T::BlockNumber::zero(); diff --git a/polkadot/runtime/kusama/src/lib.rs b/polkadot/runtime/kusama/src/lib.rs index 49abd6dd28..33c167283f 100644 --- a/polkadot/runtime/kusama/src/lib.rs +++ b/polkadot/runtime/kusama/src/lib.rs @@ -818,7 +818,7 @@ parameter_types! { impl pallet_society::Config for Runtime { type Event = Event; type Currency = Balances; - type Randomness = RandomnessCollectiveFlip; + type Randomness = pallet_babe::RandomnessFromOneEpochAgo; type CandidateDeposit = CandidateDeposit; type WrongSideDeduction = WrongSideDeduction; type MaxStrikes = MaxStrikes; @@ -1140,7 +1140,7 @@ sp_api::impl_runtime_apis! { } fn random_seed() -> ::Hash { - RandomnessCollectiveFlip::random_seed() + pallet_babe::RandomnessFromOneEpochAgo::::random_seed().0 } } diff --git a/polkadot/runtime/parachains/Cargo.toml b/polkadot/runtime/parachains/Cargo.toml index 3423fbd0c3..520fc5bcbe 100644 --- a/polkadot/runtime/parachains/Cargo.toml +++ b/polkadot/runtime/parachains/Cargo.toml @@ -49,6 +49,7 @@ keyring = { package = "sp-keyring", git = "https://github.com/paritytech/substra sp-trie = { git = "https://github.com/paritytech/substrate", branch = "master" } pallet-babe = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "master" } +frame-support-test = { git = "https://github.com/paritytech/substrate", branch = "master" } pallet-randomness-collective-flip = { git = "https://github.com/paritytech/substrate", branch = "master" } pallet-staking-reward-curve = { git = "https://github.com/paritytech/substrate", branch = "master" } pallet-treasury = { git = "https://github.com/paritytech/substrate", branch = "master" } diff --git a/polkadot/runtime/parachains/src/initializer.rs b/polkadot/runtime/parachains/src/initializer.rs index 8dc1365527..be2ecd3d24 100644 --- a/polkadot/runtime/parachains/src/initializer.rs +++ b/polkadot/runtime/parachains/src/initializer.rs @@ -81,7 +81,7 @@ pub trait Config: + hrmp::Config { /// A randomness beacon. - type Randomness: Randomness; + type Randomness: Randomness; } decl_storage! { @@ -181,7 +181,9 @@ impl Module { let random_seed = { let mut buf = [0u8; 32]; - let random_hash = T::Randomness::random(&b"paras"[..]); + // TODO: audit usage of randomness API + // https://github.com/paritytech/polkadot/issues/2601 + let (random_hash, _) = T::Randomness::random(&b"paras"[..]); let len = sp_std::cmp::min(32, random_hash.as_ref().len()); buf[..len].copy_from_slice(&random_hash.as_ref()[..len]); buf diff --git a/polkadot/runtime/parachains/src/mock.rs b/polkadot/runtime/parachains/src/mock.rs index 0d42d3733e..433f08813b 100644 --- a/polkadot/runtime/parachains/src/mock.rs +++ b/polkadot/runtime/parachains/src/mock.rs @@ -22,7 +22,8 @@ use sp_runtime::traits::{ BlakeTwo256, IdentityLookup, }; use primitives::v1::{AuthorityDiscoveryId, Balance, BlockNumber, Header, ValidatorIndex}; -use frame_support::{parameter_types, traits::Randomness as RandomnessT}; +use frame_support::parameter_types; +use frame_support_test::TestRandomness; use std::cell::RefCell; use std::collections::HashMap; use crate::{ @@ -54,14 +55,6 @@ frame_support::construct_runtime!( } ); -pub struct TestRandomness; - -impl RandomnessT for TestRandomness { - fn random(_subject: &[u8]) -> H256 { - Default::default() - } -} - parameter_types! { pub const BlockHashCount: u32 = 250; pub BlockWeights: frame_system::limits::BlockWeights = @@ -108,7 +101,7 @@ impl pallet_balances::Config for Test { } impl crate::initializer::Config for Test { - type Randomness = TestRandomness; + type Randomness = TestRandomness; } impl crate::configuration::Config for Test { } diff --git a/polkadot/runtime/polkadot/src/lib.rs b/polkadot/runtime/polkadot/src/lib.rs index 125facdb6a..4472d3c37a 100644 --- a/polkadot/runtime/polkadot/src/lib.rs +++ b/polkadot/runtime/polkadot/src/lib.rs @@ -1133,7 +1133,7 @@ sp_api::impl_runtime_apis! { } fn random_seed() -> ::Hash { - RandomnessCollectiveFlip::random_seed() + pallet_babe::RandomnessFromOneEpochAgo::::random_seed().0 } } diff --git a/polkadot/runtime/rococo/src/lib.rs b/polkadot/runtime/rococo/src/lib.rs index b45b21d601..07b0108575 100644 --- a/polkadot/runtime/rococo/src/lib.rs +++ b/polkadot/runtime/rococo/src/lib.rs @@ -39,7 +39,9 @@ use runtime_parachains::{ runtime_api_impl::v1 as runtime_api_impl, }; use frame_support::{ - parameter_types, construct_runtime, traits::{KeyOwnerProofSystem, Filter, EnsureOrigin}, weights::Weight, + construct_runtime, parameter_types, + traits::{EnsureOrigin, Filter, KeyOwnerProofSystem, Randomness}, + weights::Weight, }; use sp_runtime::{ create_runtime_str, generic, impl_opaque_keys, @@ -587,7 +589,7 @@ impl parachains_inclusion_inherent::Config for Runtime {} impl parachains_scheduler::Config for Runtime {} impl parachains_initializer::Config for Runtime { - type Randomness = Babe; + type Randomness = pallet_babe::RandomnessFromOneEpochAgo; } impl paras_sudo_wrapper::Config for Runtime {} @@ -681,7 +683,7 @@ sp_api::impl_runtime_apis! { } fn random_seed() -> ::Hash { - Babe::randomness().into() + pallet_babe::RandomnessFromOneEpochAgo::::random_seed().0 } } diff --git a/polkadot/runtime/test-runtime/src/lib.rs b/polkadot/runtime/test-runtime/src/lib.rs index 992ef48a15..dafde1d74e 100644 --- a/polkadot/runtime/test-runtime/src/lib.rs +++ b/polkadot/runtime/test-runtime/src/lib.rs @@ -470,7 +470,7 @@ impl parachains_inclusion::Config for Runtime { impl parachains_inclusion_inherent::Config for Runtime {} impl parachains_initializer::Config for Runtime { - type Randomness = Babe; + type Randomness = pallet_babe::RandomnessFromOneEpochAgo; } impl parachains_session_info::Config for Runtime {} @@ -617,7 +617,7 @@ sp_api::impl_runtime_apis! { } fn random_seed() -> ::Hash { - RandomnessCollectiveFlip::random_seed() + RandomnessCollectiveFlip::random_seed().0 } } diff --git a/polkadot/runtime/westend/src/lib.rs b/polkadot/runtime/westend/src/lib.rs index c6006bc0c6..50a08f98c1 100644 --- a/polkadot/runtime/westend/src/lib.rs +++ b/polkadot/runtime/westend/src/lib.rs @@ -851,7 +851,7 @@ sp_api::impl_runtime_apis! { } fn random_seed() -> ::Hash { - RandomnessCollectiveFlip::random_seed() + pallet_babe::RandomnessFromOneEpochAgo::::random_seed().0 } }