From a0acc6793bfee9d4eedd75aef93170b3347e46bc Mon Sep 17 00:00:00 2001 From: Xiliang Chen Date: Fri, 18 Sep 2020 23:23:18 +1200 Subject: [PATCH] Companion PR for Bounties #5715 (#1336) * update for treasury bounty * update trait * add weightinfo * remove old weight tests * "Update Substrate" * remove unused deps Co-authored-by: Shawn Tabrizi Co-authored-by: parity-processbot <> --- polkadot/Cargo.lock | 268 +++++++++--------- polkadot/runtime/common/src/crowdfund.rs | 18 +- polkadot/runtime/kusama/src/lib.rs | 22 +- polkadot/runtime/kusama/src/weights/mod.rs | 1 + .../kusama/src/weights/pallet_treasury.rs | 138 +++++++++ polkadot/runtime/polkadot/src/lib.rs | 20 +- polkadot/runtime/polkadot/src/weights/mod.rs | 1 + .../polkadot/src/weights/pallet_treasury.rs | 138 +++++++++ polkadot/runtime/polkadot/tests/weights.rs | 122 +------- 9 files changed, 461 insertions(+), 267 deletions(-) create mode 100644 polkadot/runtime/kusama/src/weights/pallet_treasury.rs create mode 100644 polkadot/runtime/polkadot/src/weights/pallet_treasury.rs diff --git a/polkadot/Cargo.lock b/polkadot/Cargo.lock index 499869ad24..3d50c9e2e3 100644 --- a/polkadot/Cargo.lock +++ b/polkadot/Cargo.lock @@ -1429,7 +1429,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "parity-scale-codec", ] @@ -1437,7 +1437,7 @@ dependencies = [ [[package]] name = "frame-benchmarking" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "frame-support", "frame-system", @@ -1455,7 +1455,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "frame-benchmarking", "parity-scale-codec", @@ -1473,7 +1473,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "frame-support", "frame-system", @@ -1489,7 +1489,7 @@ dependencies = [ [[package]] name = "frame-metadata" version = "11.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "parity-scale-codec", "serde", @@ -1500,7 +1500,7 @@ dependencies = [ [[package]] name = "frame-support" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "bitmask", "frame-metadata", @@ -1525,7 +1525,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "frame-support-procedural-tools", "proc-macro2 1.0.18", @@ -1536,7 +1536,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -1548,7 +1548,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "proc-macro2 1.0.18", "quote 1.0.7", @@ -1558,7 +1558,7 @@ dependencies = [ [[package]] name = "frame-system" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "frame-support", "impl-trait-for-tuples", @@ -1574,7 +1574,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "frame-benchmarking", "frame-support", @@ -1588,7 +1588,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "parity-scale-codec", "sp-api", @@ -3756,7 +3756,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "frame-support", "frame-system", @@ -3772,7 +3772,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "frame-support", "frame-system", @@ -3787,7 +3787,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "frame-benchmarking", "frame-support", @@ -3812,7 +3812,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "frame-benchmarking", "frame-support", @@ -3826,7 +3826,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "frame-benchmarking", "frame-support", @@ -3842,7 +3842,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "frame-benchmarking", "frame-support", @@ -3857,7 +3857,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "frame-benchmarking", "frame-support", @@ -3872,7 +3872,7 @@ dependencies = [ [[package]] name = "pallet-finality-tracker" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "frame-support", "frame-system", @@ -3888,7 +3888,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "frame-benchmarking", "frame-support", @@ -3910,7 +3910,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "enumflags2", "frame-benchmarking", @@ -3926,7 +3926,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "frame-benchmarking", "frame-support", @@ -3946,7 +3946,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "frame-support", "frame-system", @@ -3962,7 +3962,7 @@ dependencies = [ [[package]] name = "pallet-membership" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "frame-support", "frame-system", @@ -3976,7 +3976,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "frame-support", "frame-system", @@ -3991,7 +3991,7 @@ dependencies = [ [[package]] name = "pallet-nicks" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "frame-support", "frame-system", @@ -4005,7 +4005,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "frame-support", "frame-system", @@ -4020,7 +4020,7 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "frame-benchmarking", "frame-support", @@ -4041,7 +4041,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "frame-support", "frame-system", @@ -4056,7 +4056,7 @@ dependencies = [ [[package]] name = "pallet-randomness-collective-flip" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "frame-support", "frame-system", @@ -4069,7 +4069,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "enumflags2", "frame-support", @@ -4084,7 +4084,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "frame-benchmarking", "frame-support", @@ -4099,7 +4099,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "frame-support", "frame-system", @@ -4119,7 +4119,7 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "frame-benchmarking", "frame-support", @@ -4135,7 +4135,7 @@ dependencies = [ [[package]] name = "pallet-society" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "frame-support", "frame-system", @@ -4149,7 +4149,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "frame-benchmarking", "frame-support", @@ -4171,7 +4171,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "proc-macro-crate", "proc-macro2 1.0.18", @@ -4182,7 +4182,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "frame-support", "frame-system", @@ -4196,7 +4196,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "frame-benchmarking", "frame-support", @@ -4214,7 +4214,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "frame-support", "frame-system", @@ -4231,7 +4231,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -4249,7 +4249,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "frame-support", "parity-scale-codec", @@ -4262,7 +4262,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "frame-benchmarking", "frame-support", @@ -4277,7 +4277,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "frame-benchmarking", "frame-support", @@ -4293,7 +4293,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "enumflags2", "frame-benchmarking", @@ -6462,7 +6462,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.8.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "bytes 0.5.6", "derive_more 0.99.9", @@ -6490,7 +6490,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.8.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "futures 0.3.5", "futures-timer 3.0.2", @@ -6514,7 +6514,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.8.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -6531,7 +6531,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -6548,7 +6548,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "proc-macro-crate", "proc-macro2 1.0.18", @@ -6559,7 +6559,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.8.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "ansi_term 0.12.1", "atty", @@ -6608,7 +6608,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "derive_more 0.99.9", "fnv", @@ -6644,7 +6644,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.8.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "blake2-rfc", "hash-db", @@ -6674,7 +6674,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.8.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "sc-client-api", "sp-blockchain", @@ -6685,7 +6685,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.8.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "derive_more 0.99.9", "fork-tree", @@ -6729,7 +6729,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.8.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "derive_more 0.99.9", "futures 0.3.5", @@ -6753,7 +6753,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.8.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "fork-tree", "parity-scale-codec", @@ -6766,7 +6766,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.8.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "futures 0.3.5", "futures-timer 3.0.2", @@ -6789,7 +6789,7 @@ dependencies = [ [[package]] name = "sc-consensus-uncles" version = "0.8.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "log 0.4.11", "sc-client-api", @@ -6803,7 +6803,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.8.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "derive_more 0.99.9", "lazy_static", @@ -6831,7 +6831,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.8.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "derive_more 0.99.9", "log 0.4.11", @@ -6848,7 +6848,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.8.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "log 0.4.11", "parity-scale-codec", @@ -6863,7 +6863,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.8.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "log 0.4.11", "parity-scale-codec", @@ -6881,7 +6881,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" version = "0.8.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "derive_more 0.99.9", "finality-grandpa", @@ -6918,7 +6918,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa-rpc" version = "0.8.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "derive_more 0.99.9", "finality-grandpa", @@ -6940,7 +6940,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.8.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "ansi_term 0.12.1", "futures 0.3.5", @@ -6958,7 +6958,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "derive_more 0.99.9", "hex", @@ -6974,7 +6974,7 @@ dependencies = [ [[package]] name = "sc-light" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "hash-db", "lazy_static", @@ -6993,7 +6993,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.8.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "async-std", "async-trait", @@ -7047,7 +7047,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.8.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "futures 0.3.5", "futures-timer 3.0.2", @@ -7062,7 +7062,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "bytes 0.5.6", "fnv", @@ -7089,7 +7089,7 @@ dependencies = [ [[package]] name = "sc-peerset" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "futures 0.3.5", "libp2p", @@ -7102,7 +7102,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.8.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "log 0.4.11", "substrate-prometheus-endpoint", @@ -7111,7 +7111,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "futures 0.3.5", "hash-db", @@ -7143,7 +7143,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.8.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "derive_more 0.99.9", "futures 0.3.5", @@ -7167,7 +7167,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "jsonrpc-core", "jsonrpc-http-server", @@ -7183,7 +7183,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.8.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "derive_more 0.99.9", "directories", @@ -7245,7 +7245,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.8.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "log 0.4.11", "parity-scale-codec", @@ -7259,7 +7259,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "futures 0.3.5", "futures-timer 3.0.2", @@ -7280,7 +7280,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "erased-serde", "log 0.4.11", @@ -7299,7 +7299,7 @@ dependencies = [ [[package]] name = "sc-transaction-graph" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "derive_more 0.99.9", "futures 0.3.5", @@ -7320,7 +7320,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "derive_more 0.99.9", "futures 0.3.5", @@ -7787,7 +7787,7 @@ dependencies = [ [[package]] name = "sp-allocator" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "derive_more 0.99.9", "log 0.4.11", @@ -7799,7 +7799,7 @@ dependencies = [ [[package]] name = "sp-api" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "hash-db", "parity-scale-codec", @@ -7814,7 +7814,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "blake2-rfc", "proc-macro-crate", @@ -7826,7 +7826,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "parity-scale-codec", "serde", @@ -7838,7 +7838,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "integer-sqrt", "num-traits 0.2.12", @@ -7851,7 +7851,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "parity-scale-codec", "sp-api", @@ -7863,7 +7863,7 @@ dependencies = [ [[package]] name = "sp-authorship" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "parity-scale-codec", "sp-inherents", @@ -7874,7 +7874,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "parity-scale-codec", "sp-api", @@ -7886,7 +7886,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "derive_more 0.99.9", "log 0.4.11", @@ -7903,7 +7903,7 @@ dependencies = [ [[package]] name = "sp-chain-spec" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "serde", "serde_json", @@ -7912,7 +7912,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.8.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "derive_more 0.99.9", "futures 0.3.5", @@ -7938,7 +7938,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.8.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "merlin", "parity-scale-codec", @@ -7957,7 +7957,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.8.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "parity-scale-codec", "sp-runtime", @@ -7966,7 +7966,7 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.8.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "parity-scale-codec", "schnorrkel", @@ -7978,7 +7978,7 @@ dependencies = [ [[package]] name = "sp-core" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "base58", "blake2-rfc", @@ -8022,7 +8022,7 @@ dependencies = [ [[package]] name = "sp-database" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "kvdb", "parking_lot 0.10.2", @@ -8031,7 +8031,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "proc-macro2 1.0.18", "quote 1.0.7", @@ -8041,7 +8041,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.8.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "environmental", "parity-scale-codec", @@ -8052,7 +8052,7 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "finality-grandpa", "log 0.4.11", @@ -8068,7 +8068,7 @@ dependencies = [ [[package]] name = "sp-finality-tracker" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "parity-scale-codec", "sp-inherents", @@ -8078,7 +8078,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "derive_more 0.99.9", "parity-scale-codec", @@ -8090,7 +8090,7 @@ dependencies = [ [[package]] name = "sp-io" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "futures 0.3.5", "hash-db", @@ -8113,7 +8113,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "lazy_static", "sp-core", @@ -8124,7 +8124,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "parity-scale-codec", "serde", @@ -8136,7 +8136,7 @@ dependencies = [ [[package]] name = "sp-npos-elections-compact" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "proc-macro-crate", "proc-macro2 1.0.18", @@ -8147,7 +8147,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "sp-api", "sp-core", @@ -8157,7 +8157,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "backtrace", "log 0.4.11", @@ -8166,7 +8166,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "serde", "sp-core", @@ -8175,7 +8175,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "either", "hash256-std-hasher", @@ -8197,7 +8197,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "parity-scale-codec", "primitive-types", @@ -8213,7 +8213,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "Inflector", "proc-macro-crate", @@ -8225,7 +8225,7 @@ dependencies = [ [[package]] name = "sp-serializer" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "serde", "serde_json", @@ -8234,7 +8234,7 @@ dependencies = [ [[package]] name = "sp-session" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "parity-scale-codec", "sp-api", @@ -8247,7 +8247,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "parity-scale-codec", "sp-runtime", @@ -8257,7 +8257,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.8.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "hash-db", "log 0.4.11", @@ -8278,12 +8278,12 @@ dependencies = [ [[package]] name = "sp-std" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" [[package]] name = "sp-storage" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "impl-serde", "parity-scale-codec", @@ -8296,7 +8296,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -8310,7 +8310,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "log 0.4.11", "parity-scale-codec", @@ -8323,7 +8323,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "derive_more 0.99.9", "futures 0.3.5", @@ -8338,7 +8338,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "hash-db", "memory-db", @@ -8352,7 +8352,7 @@ dependencies = [ [[package]] name = "sp-utils" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "futures 0.3.5", "futures-core", @@ -8364,7 +8364,7 @@ dependencies = [ [[package]] name = "sp-version" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "impl-serde", "parity-scale-codec", @@ -8376,7 +8376,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -8517,7 +8517,7 @@ dependencies = [ [[package]] name = "substrate-browser-utils" version = "0.8.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "chrono", "console_error_panic_hook", @@ -8543,7 +8543,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "platforms", ] @@ -8551,7 +8551,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "frame-system-rpc-runtime-api", "futures 0.3.5", @@ -8574,7 +8574,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.8.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "async-std", "derive_more 0.99.9", @@ -8588,7 +8588,7 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "futures 0.1.29", "futures 0.3.5", @@ -8614,7 +8614,7 @@ dependencies = [ [[package]] name = "substrate-test-utils" version = "2.0.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "futures 0.3.5", "substrate-test-utils-derive", @@ -8624,7 +8624,7 @@ dependencies = [ [[package]] name = "substrate-test-utils-derive" version = "0.8.0-rc6" -source = "git+https://github.com/paritytech/substrate#83284b9fd9e85657b031ee263bfae9d1141e027b" +source = "git+https://github.com/paritytech/substrate#a0a6809b1b50eaf4d1c76609da15dd255c9d6bfc" dependencies = [ "proc-macro-crate", "quote 1.0.7", diff --git a/polkadot/runtime/common/src/crowdfund.rs b/polkadot/runtime/common/src/crowdfund.rs index 89e4e28354..fba53daa67 100644 --- a/polkadot/runtime/common/src/crowdfund.rs +++ b/polkadot/runtime/common/src/crowdfund.rs @@ -647,8 +647,14 @@ mod tests { pub const TipCountdown: u64 = 1; pub const TipFindersFee: Percent = Percent::from_percent(20); pub const TipReportDepositBase: u64 = 1; - pub const TipReportDepositPerByte: u64 = 1; pub const TreasuryModuleId: ModuleId = ModuleId(*b"py/trsry"); + pub const DataDepositPerByte: u64 = 1; + pub const BountyDepositBase: u64 = 1; + pub const BountyDepositPayoutDelay: u64 = 1; + pub const BountyUpdatePeriod: u64 = 1; + pub const MaximumReasonLength: u32 = 16384; + pub const BountyCuratorDeposit: Permill = Permill::from_percent(50); + pub const BountyValueMinimum: u64 = 1; } pub struct Nobody; impl Contains for Nobody { @@ -666,7 +672,7 @@ mod tests { type ApproveOrigin = frame_system::EnsureRoot; type RejectOrigin = frame_system::EnsureRoot; type Event = (); - type ProposalRejection = (); + type OnSlash = (); type ProposalBond = ProposalBond; type ProposalBondMinimum = ProposalBondMinimum; type SpendPeriod = SpendPeriod; @@ -676,7 +682,13 @@ mod tests { type TipCountdown = TipCountdown; type TipFindersFee = TipFindersFee; type TipReportDepositBase = TipReportDepositBase; - type TipReportDepositPerByte = TipReportDepositPerByte; + type DataDepositPerByte = DataDepositPerByte; + type BountyDepositBase = BountyDepositBase; + type BountyDepositPayoutDelay = BountyDepositPayoutDelay; + type BountyUpdatePeriod = BountyUpdatePeriod; + type MaximumReasonLength = MaximumReasonLength; + type BountyCuratorDeposit = BountyCuratorDeposit; + type BountyValueMinimum = BountyValueMinimum; type ModuleId = TreasuryModuleId; type WeightInfo = (); } diff --git a/polkadot/runtime/kusama/src/lib.rs b/polkadot/runtime/kusama/src/lib.rs index 6b5a04cbf1..5cafcb8274 100644 --- a/polkadot/runtime/kusama/src/lib.rs +++ b/polkadot/runtime/kusama/src/lib.rs @@ -494,7 +494,13 @@ parameter_types! { pub const TipCountdown: BlockNumber = 1 * DAYS; pub const TipFindersFee: Percent = Percent::from_percent(20); pub const TipReportDepositBase: Balance = 1 * DOLLARS; - pub const TipReportDepositPerByte: Balance = 1 * CENTS; + pub const DataDepositPerByte: Balance = 1 * CENTS; + pub const BountyDepositBase: Balance = 1 * DOLLARS; + pub const BountyDepositPayoutDelay: BlockNumber = 4 * DAYS; + pub const BountyUpdatePeriod: BlockNumber = 90 * DAYS; + pub const MaximumReasonLength: u32 = 16384; + pub const BountyCuratorDeposit: Permill = Permill::from_percent(50); + pub const BountyValueMinimum: Balance = 2 * DOLLARS; } type ApproveOrigin = EnsureOneOf< @@ -504,6 +510,7 @@ type ApproveOrigin = EnsureOneOf< >; impl pallet_treasury::Trait for Runtime { + type ModuleId = TreasuryModuleId; type Currency = Balances; type ApproveOrigin = ApproveOrigin; type RejectOrigin = MoreThanHalfCouncil; @@ -511,16 +518,21 @@ impl pallet_treasury::Trait for Runtime { type TipCountdown = TipCountdown; type TipFindersFee = TipFindersFee; type TipReportDepositBase = TipReportDepositBase; - type TipReportDepositPerByte = TipReportDepositPerByte; + type DataDepositPerByte = DataDepositPerByte; type Event = Event; - type ProposalRejection = Treasury; + type OnSlash = Treasury; type ProposalBond = ProposalBond; type ProposalBondMinimum = ProposalBondMinimum; type SpendPeriod = SpendPeriod; type Burn = Burn; + type BountyDepositBase = BountyDepositBase; + type BountyDepositPayoutDelay = BountyDepositPayoutDelay; + type BountyUpdatePeriod = BountyUpdatePeriod; + type MaximumReasonLength = MaximumReasonLength; + type BountyCuratorDeposit = BountyCuratorDeposit; + type BountyValueMinimum = BountyValueMinimum; type BurnDestination = Society; - type ModuleId = TreasuryModuleId; - type WeightInfo = (); + type WeightInfo = weights::pallet_treasury::WeightInfo; } parameter_types! { diff --git a/polkadot/runtime/kusama/src/weights/mod.rs b/polkadot/runtime/kusama/src/weights/mod.rs index dc4792cab6..e8eaca2eba 100644 --- a/polkadot/runtime/kusama/src/weights/mod.rs +++ b/polkadot/runtime/kusama/src/weights/mod.rs @@ -23,5 +23,6 @@ pub mod pallet_democracy; pub mod pallet_proxy; pub mod pallet_staking; pub mod pallet_timestamp; +pub mod pallet_treasury; pub mod pallet_utility; pub mod pallet_vesting; diff --git a/polkadot/runtime/kusama/src/weights/pallet_treasury.rs b/polkadot/runtime/kusama/src/weights/pallet_treasury.rs new file mode 100644 index 0000000000..e668baf390 --- /dev/null +++ b/polkadot/runtime/kusama/src/weights/pallet_treasury.rs @@ -0,0 +1,138 @@ +// Copyright (C) 2020 Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 2.0.0-rc6 + +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::weights::{Weight, constants::RocksDbWeight as DbWeight}; + +pub struct WeightInfo; +impl pallet_treasury::WeightInfo for WeightInfo { + fn propose_spend() -> Weight { + (79604000 as Weight) + .saturating_add(DbWeight::get().reads(1 as Weight)) + .saturating_add(DbWeight::get().writes(2 as Weight)) + } + fn reject_proposal() -> Weight { + (61001000 as Weight) + .saturating_add(DbWeight::get().reads(2 as Weight)) + .saturating_add(DbWeight::get().writes(2 as Weight)) + } + fn approve_proposal() -> Weight { + (17835000 as Weight) + .saturating_add(DbWeight::get().reads(2 as Weight)) + .saturating_add(DbWeight::get().writes(1 as Weight)) + } + fn report_awesome(r: u32, ) -> Weight { + (101602000 as Weight) + .saturating_add((2000 as Weight).saturating_mul(r as Weight)) + .saturating_add(DbWeight::get().reads(2 as Weight)) + .saturating_add(DbWeight::get().writes(2 as Weight)) + } + // WARNING! Some components were not used: ["r"] + fn retract_tip() -> Weight { + (82970000 as Weight) + .saturating_add(DbWeight::get().reads(1 as Weight)) + .saturating_add(DbWeight::get().writes(2 as Weight)) + } + fn tip_new(r: u32, t: u32, ) -> Weight { + (63995000 as Weight) + .saturating_add((2000 as Weight).saturating_mul(r as Weight)) + .saturating_add((153000 as Weight).saturating_mul(t as Weight)) + .saturating_add(DbWeight::get().reads(2 as Weight)) + .saturating_add(DbWeight::get().writes(2 as Weight)) + } + fn tip(t: u32, ) -> Weight { + (46765000 as Weight) + .saturating_add((711000 as Weight).saturating_mul(t as Weight)) + .saturating_add(DbWeight::get().reads(2 as Weight)) + .saturating_add(DbWeight::get().writes(1 as Weight)) + } + fn close_tip(t: u32, ) -> Weight { + (160874000 as Weight) + .saturating_add((379000 as Weight).saturating_mul(t as Weight)) + .saturating_add(DbWeight::get().reads(3 as Weight)) + .saturating_add(DbWeight::get().writes(3 as Weight)) + } + fn propose_bounty(d: u32, ) -> Weight { + (86198000 as Weight) + .saturating_add((1000 as Weight).saturating_mul(d as Weight)) + .saturating_add(DbWeight::get().reads(2 as Weight)) + .saturating_add(DbWeight::get().writes(4 as Weight)) + } + fn approve_bounty() -> Weight { + (23063000 as Weight) + .saturating_add(DbWeight::get().reads(2 as Weight)) + .saturating_add(DbWeight::get().writes(2 as Weight)) + } + fn propose_curator() -> Weight { + (18890000 as Weight) + .saturating_add(DbWeight::get().reads(1 as Weight)) + .saturating_add(DbWeight::get().writes(1 as Weight)) + } + fn unassign_curator() -> Weight { + (66768000 as Weight) + .saturating_add(DbWeight::get().reads(2 as Weight)) + .saturating_add(DbWeight::get().writes(2 as Weight)) + } + fn accept_curator() -> Weight { + (69131000 as Weight) + .saturating_add(DbWeight::get().reads(2 as Weight)) + .saturating_add(DbWeight::get().writes(2 as Weight)) + } + fn award_bounty() -> Weight { + (48184000 as Weight) + .saturating_add(DbWeight::get().reads(1 as Weight)) + .saturating_add(DbWeight::get().writes(1 as Weight)) + } + fn claim_bounty() -> Weight { + (243104000 as Weight) + .saturating_add(DbWeight::get().reads(4 as Weight)) + .saturating_add(DbWeight::get().writes(5 as Weight)) + } + fn close_bounty_proposed() -> Weight { + (65917000 as Weight) + .saturating_add(DbWeight::get().reads(2 as Weight)) + .saturating_add(DbWeight::get().writes(3 as Weight)) + } + fn close_bounty_active() -> Weight { + (157232000 as Weight) + .saturating_add(DbWeight::get().reads(3 as Weight)) + .saturating_add(DbWeight::get().writes(4 as Weight)) + } + fn extend_bounty_expiry() -> Weight { + (46216000 as Weight) + .saturating_add(DbWeight::get().reads(1 as Weight)) + .saturating_add(DbWeight::get().writes(1 as Weight)) + } + fn on_initialize_proposals(p: u32, ) -> Weight { + (119765000 as Weight) + .saturating_add((108368000 as Weight).saturating_mul(p as Weight)) + .saturating_add(DbWeight::get().reads(2 as Weight)) + .saturating_add(DbWeight::get().reads((3 as Weight).saturating_mul(p as Weight))) + .saturating_add(DbWeight::get().writes(2 as Weight)) + .saturating_add(DbWeight::get().writes((3 as Weight).saturating_mul(p as Weight))) + } + fn on_initialize_bounties(b: u32, ) -> Weight { + (112536000 as Weight) + .saturating_add((107132000 as Weight).saturating_mul(b as Weight)) + .saturating_add(DbWeight::get().reads(2 as Weight)) + .saturating_add(DbWeight::get().reads((3 as Weight).saturating_mul(b as Weight))) + .saturating_add(DbWeight::get().writes(2 as Weight)) + .saturating_add(DbWeight::get().writes((3 as Weight).saturating_mul(b as Weight))) + } +} diff --git a/polkadot/runtime/polkadot/src/lib.rs b/polkadot/runtime/polkadot/src/lib.rs index f14e0ce185..4217ea6612 100644 --- a/polkadot/runtime/polkadot/src/lib.rs +++ b/polkadot/runtime/polkadot/src/lib.rs @@ -550,7 +550,13 @@ parameter_types! { pub const TipCountdown: BlockNumber = 1 * DAYS; pub const TipFindersFee: Percent = Percent::from_percent(20); pub const TipReportDepositBase: Balance = 1 * DOLLARS; - pub const TipReportDepositPerByte: Balance = 1 * CENTS; + pub const DataDepositPerByte: Balance = 1 * CENTS; + pub const BountyDepositBase: Balance = 1 * DOLLARS; + pub const BountyDepositPayoutDelay: BlockNumber = 8 * DAYS; + pub const BountyUpdatePeriod: BlockNumber = 90 * DAYS; + pub const MaximumReasonLength: u32 = 16384; + pub const BountyCuratorDeposit: Permill = Permill::from_percent(50); + pub const BountyValueMinimum: Balance = 10 * DOLLARS; } type ApproveOrigin = EnsureOneOf< @@ -568,15 +574,21 @@ impl pallet_treasury::Trait for Runtime { type TipCountdown = TipCountdown; type TipFindersFee = TipFindersFee; type TipReportDepositBase = TipReportDepositBase; - type TipReportDepositPerByte = TipReportDepositPerByte; + type DataDepositPerByte = DataDepositPerByte; type Event = Event; - type ProposalRejection = Treasury; + type OnSlash = Treasury; type ProposalBond = ProposalBond; type ProposalBondMinimum = ProposalBondMinimum; type SpendPeriod = SpendPeriod; type Burn = Burn; + type BountyDepositBase = BountyDepositBase; + type BountyDepositPayoutDelay = BountyDepositPayoutDelay; + type BountyUpdatePeriod = BountyUpdatePeriod; + type MaximumReasonLength = MaximumReasonLength; + type BountyCuratorDeposit = BountyCuratorDeposit; + type BountyValueMinimum = BountyValueMinimum; type BurnDestination = (); - type WeightInfo = (); + type WeightInfo = weights::pallet_treasury::WeightInfo; } parameter_types! { diff --git a/polkadot/runtime/polkadot/src/weights/mod.rs b/polkadot/runtime/polkadot/src/weights/mod.rs index dc4792cab6..e8eaca2eba 100644 --- a/polkadot/runtime/polkadot/src/weights/mod.rs +++ b/polkadot/runtime/polkadot/src/weights/mod.rs @@ -23,5 +23,6 @@ pub mod pallet_democracy; pub mod pallet_proxy; pub mod pallet_staking; pub mod pallet_timestamp; +pub mod pallet_treasury; pub mod pallet_utility; pub mod pallet_vesting; diff --git a/polkadot/runtime/polkadot/src/weights/pallet_treasury.rs b/polkadot/runtime/polkadot/src/weights/pallet_treasury.rs new file mode 100644 index 0000000000..e668baf390 --- /dev/null +++ b/polkadot/runtime/polkadot/src/weights/pallet_treasury.rs @@ -0,0 +1,138 @@ +// Copyright (C) 2020 Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 2.0.0-rc6 + +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::weights::{Weight, constants::RocksDbWeight as DbWeight}; + +pub struct WeightInfo; +impl pallet_treasury::WeightInfo for WeightInfo { + fn propose_spend() -> Weight { + (79604000 as Weight) + .saturating_add(DbWeight::get().reads(1 as Weight)) + .saturating_add(DbWeight::get().writes(2 as Weight)) + } + fn reject_proposal() -> Weight { + (61001000 as Weight) + .saturating_add(DbWeight::get().reads(2 as Weight)) + .saturating_add(DbWeight::get().writes(2 as Weight)) + } + fn approve_proposal() -> Weight { + (17835000 as Weight) + .saturating_add(DbWeight::get().reads(2 as Weight)) + .saturating_add(DbWeight::get().writes(1 as Weight)) + } + fn report_awesome(r: u32, ) -> Weight { + (101602000 as Weight) + .saturating_add((2000 as Weight).saturating_mul(r as Weight)) + .saturating_add(DbWeight::get().reads(2 as Weight)) + .saturating_add(DbWeight::get().writes(2 as Weight)) + } + // WARNING! Some components were not used: ["r"] + fn retract_tip() -> Weight { + (82970000 as Weight) + .saturating_add(DbWeight::get().reads(1 as Weight)) + .saturating_add(DbWeight::get().writes(2 as Weight)) + } + fn tip_new(r: u32, t: u32, ) -> Weight { + (63995000 as Weight) + .saturating_add((2000 as Weight).saturating_mul(r as Weight)) + .saturating_add((153000 as Weight).saturating_mul(t as Weight)) + .saturating_add(DbWeight::get().reads(2 as Weight)) + .saturating_add(DbWeight::get().writes(2 as Weight)) + } + fn tip(t: u32, ) -> Weight { + (46765000 as Weight) + .saturating_add((711000 as Weight).saturating_mul(t as Weight)) + .saturating_add(DbWeight::get().reads(2 as Weight)) + .saturating_add(DbWeight::get().writes(1 as Weight)) + } + fn close_tip(t: u32, ) -> Weight { + (160874000 as Weight) + .saturating_add((379000 as Weight).saturating_mul(t as Weight)) + .saturating_add(DbWeight::get().reads(3 as Weight)) + .saturating_add(DbWeight::get().writes(3 as Weight)) + } + fn propose_bounty(d: u32, ) -> Weight { + (86198000 as Weight) + .saturating_add((1000 as Weight).saturating_mul(d as Weight)) + .saturating_add(DbWeight::get().reads(2 as Weight)) + .saturating_add(DbWeight::get().writes(4 as Weight)) + } + fn approve_bounty() -> Weight { + (23063000 as Weight) + .saturating_add(DbWeight::get().reads(2 as Weight)) + .saturating_add(DbWeight::get().writes(2 as Weight)) + } + fn propose_curator() -> Weight { + (18890000 as Weight) + .saturating_add(DbWeight::get().reads(1 as Weight)) + .saturating_add(DbWeight::get().writes(1 as Weight)) + } + fn unassign_curator() -> Weight { + (66768000 as Weight) + .saturating_add(DbWeight::get().reads(2 as Weight)) + .saturating_add(DbWeight::get().writes(2 as Weight)) + } + fn accept_curator() -> Weight { + (69131000 as Weight) + .saturating_add(DbWeight::get().reads(2 as Weight)) + .saturating_add(DbWeight::get().writes(2 as Weight)) + } + fn award_bounty() -> Weight { + (48184000 as Weight) + .saturating_add(DbWeight::get().reads(1 as Weight)) + .saturating_add(DbWeight::get().writes(1 as Weight)) + } + fn claim_bounty() -> Weight { + (243104000 as Weight) + .saturating_add(DbWeight::get().reads(4 as Weight)) + .saturating_add(DbWeight::get().writes(5 as Weight)) + } + fn close_bounty_proposed() -> Weight { + (65917000 as Weight) + .saturating_add(DbWeight::get().reads(2 as Weight)) + .saturating_add(DbWeight::get().writes(3 as Weight)) + } + fn close_bounty_active() -> Weight { + (157232000 as Weight) + .saturating_add(DbWeight::get().reads(3 as Weight)) + .saturating_add(DbWeight::get().writes(4 as Weight)) + } + fn extend_bounty_expiry() -> Weight { + (46216000 as Weight) + .saturating_add(DbWeight::get().reads(1 as Weight)) + .saturating_add(DbWeight::get().writes(1 as Weight)) + } + fn on_initialize_proposals(p: u32, ) -> Weight { + (119765000 as Weight) + .saturating_add((108368000 as Weight).saturating_mul(p as Weight)) + .saturating_add(DbWeight::get().reads(2 as Weight)) + .saturating_add(DbWeight::get().reads((3 as Weight).saturating_mul(p as Weight))) + .saturating_add(DbWeight::get().writes(2 as Weight)) + .saturating_add(DbWeight::get().writes((3 as Weight).saturating_mul(p as Weight))) + } + fn on_initialize_bounties(b: u32, ) -> Weight { + (112536000 as Weight) + .saturating_add((107132000 as Weight).saturating_mul(b as Weight)) + .saturating_add(DbWeight::get().reads(2 as Weight)) + .saturating_add(DbWeight::get().reads((3 as Weight).saturating_mul(b as Weight))) + .saturating_add(DbWeight::get().writes(2 as Weight)) + .saturating_add(DbWeight::get().writes((3 as Weight).saturating_mul(b as Weight))) + } +} diff --git a/polkadot/runtime/polkadot/tests/weights.rs b/polkadot/runtime/polkadot/tests/weights.rs index 76bcfeae7d..be9fd79ad4 100644 --- a/polkadot/runtime/polkadot/tests/weights.rs +++ b/polkadot/runtime/polkadot/tests/weights.rs @@ -28,41 +28,16 @@ //! $ cargo test -p polkadot-runtime -- --nocapture --test-threads=1 //! ``` -use codec::Encode; -use frame_support::{ - traits::ContainsLengthBound, - weights::{constants::*, GetDispatchInfo, Weight, DispatchInfo}, -}; -use keyring::AccountKeyring; -use polkadot_runtime::constants::currency::*; +use frame_support::weights::{constants::*, GetDispatchInfo}; use polkadot_runtime::{self, Runtime}; -use primitives::v0::AccountId; use runtime_common::MaximumBlockWeight; use pallet_elections_phragmen::Call as PhragmenCall; use pallet_session::Call as SessionCall; -use pallet_staking::Call as StakingCall; use frame_system::Call as SystemCall; -use pallet_treasury::Call as TreasuryCall; type DbWeight = ::DbWeight; - -fn report_portion(name: &'static str, info: DispatchInfo, len: usize) { - let maximum_weight = ::MaximumBlockWeight::get(); - let fee = sp_io::TestExternalities::new(Default::default()).execute_with(|| { - >::compute_fee(len as u32, &info, 0) - }); - - let portion = info.weight as f64 / maximum_weight as f64; - - if portion > 0.5 { - panic!("Weight of some call seem to have exceeded half of the block. Probably something is wrong."); - } - - println!("\nCall {} (with default args) takes {} of the block weight, pays {} in fee.", name, portion, fee); -} - #[test] fn sanity_check_weight_per_time_constants_are_as_expected() { // These values comes from Substrate, we want to make sure that if it @@ -73,70 +48,6 @@ fn sanity_check_weight_per_time_constants_are_as_expected() { assert_eq!(WEIGHT_PER_NANOS, WEIGHT_PER_MICROS / 1000); } -#[test] -fn weight_of_staking_bond_is_correct() { - let controller: AccountId = AccountKeyring::Alice.into(); - - // (144278000 as Weight) - // .saturating_add(DbWeight::get().reads(5 as Weight)) - // .saturating_add(DbWeight::get().writes(4 as Weight)) - let expected_weight = 144278000 + (DbWeight::get().read * 5) + (DbWeight::get().write * 4); - let call = StakingCall::bond::(controller, 1 * DOLLARS, Default::default()); - let info = call.get_dispatch_info(); - - assert_eq!(info.weight, expected_weight); - report_portion("staking_bond", info, call.encode().len()) -} - -#[test] -fn weight_of_staking_validate_is_correct() { - // (35539000 as Weight) - // .saturating_add(DbWeight::get().reads(2 as Weight)) - // .saturating_add(DbWeight::get().writes(2 as Weight)) - let expected_weight = 35539000 + (DbWeight::get().read * 2) + (DbWeight::get().write * 2); - let call = StakingCall::validate::(Default::default()); - let info = call.get_dispatch_info(); - - assert_eq!(info.weight, expected_weight); - report_portion("staking_validate", info, call.encode().len()) -} - -#[test] -fn weight_of_staking_nominate_is_correct() { - let targets: Vec = vec![Default::default(), Default::default(), Default::default()]; - - // (48596000 as Weight) - // .saturating_add((308000 as Weight).saturating_mul(n as Weight)) - // .saturating_add(DbWeight::get().reads(3 as Weight)) - // .saturating_add(DbWeight::get().writes(2 as Weight)) - let db_weight = (DbWeight::get().read * 3) + (DbWeight::get().write * 2); - let targets_weight = (308 * WEIGHT_PER_NANOS).saturating_mul(targets.len() as Weight); - - let expected_weight = db_weight.saturating_add(48596000).saturating_add(targets_weight); - let call = StakingCall::nominate::(targets); - let info = call.get_dispatch_info(); - - assert_eq!(info.weight, expected_weight); - report_portion("staking_nominate", info, call.encode().len()) -} - -#[test] -fn weight_of_staking_payout_staker_is_correct() { - // (0 as Weight) - // .saturating_add((117324000 as Weight).saturating_mul(n as Weight)) - // .saturating_add(DbWeight::get().reads((5 as Weight).saturating_mul(n as Weight))) - // .saturating_add(DbWeight::get().writes((3 as Weight).saturating_mul(n as Weight))) - let call = StakingCall::payout_stakers::(Default::default(), 0u32); - let info = call.get_dispatch_info(); - - let n = ::MaxNominatorRewardedPerValidator::get() as Weight; - let mut expected_weight = (117324000 as Weight).saturating_mul(n as Weight); - expected_weight += (DbWeight::get().read * 5 * n) + (DbWeight::get().write * 3 * n); - - assert_eq!(info.weight, expected_weight); - report_portion("staking_payout_stakers", info, call.encode().len()) -} - #[test] fn weight_of_system_set_code_is_correct() { // #[weight = (T::MaximumBlockWeight::get(), DispatchClass::Operational)] @@ -196,34 +107,3 @@ fn weight_of_phragmen_renounce_candidacy_is_correct() { assert_eq!(weight, expected_weight); } - -#[test] -fn weight_of_treasury_propose_spend_is_correct() { - // #[weight = 120_000_000 + T::DbWeight::get().reads_writes(1, 2)] - let expected_weight = 120_000_000 + DbWeight::get().read + 2 * DbWeight::get().write; - let weight = - TreasuryCall::propose_spend::(Default::default(), Default::default()).get_dispatch_info().weight; - - assert_eq!(weight, expected_weight); -} - -#[test] -fn weight_of_treasury_approve_proposal_is_correct() { - // #[weight = (34_000_000 + T::DbWeight::get().reads_writes(2, 1), DispatchClass::Operational)] - let expected_weight = 34_000_000 + 2 * DbWeight::get().read + DbWeight::get().write; - let weight = TreasuryCall::approve_proposal::(Default::default()).get_dispatch_info().weight; - - assert_eq!(weight, expected_weight); -} - -#[test] -fn weight_of_treasury_tip_is_correct() { - let max_len: Weight = ::Tippers::max_len() as Weight; - - // #[weight = 68_000_000 + 2_000_000 * T::Tippers::max_len() as Weight - // + T::DbWeight::get().reads_writes(2, 1)] - let expected_weight = 68_000_000 + 2_000_000 * max_len + 2 * DbWeight::get().read + DbWeight::get().write; - let weight = TreasuryCall::tip::(Default::default(), Default::default()).get_dispatch_info().weight; - - assert_eq!(weight, expected_weight); -}