diff --git a/Cargo.lock b/Cargo.lock index b4620b5e91a..b89b017b44f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -451,7 +451,7 @@ dependencies = [ [[package]] name = "beefy-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "async-trait", "beefy-primitives", @@ -487,7 +487,7 @@ dependencies = [ [[package]] name = "beefy-gadget-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "beefy-gadget", "beefy-primitives", @@ -507,7 +507,7 @@ dependencies = [ [[package]] name = "beefy-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "beefy-primitives", "sp-api", @@ -516,7 +516,7 @@ dependencies = [ [[package]] name = "beefy-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "parity-scale-codec", "scale-info", @@ -2786,7 +2786,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "parity-scale-codec", ] @@ -2804,7 +2804,7 @@ dependencies = [ [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "frame-support", "frame-system", @@ -2827,7 +2827,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "Inflector", "chrono", @@ -2878,7 +2878,7 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2889,7 +2889,7 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -2905,7 +2905,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "frame-support", "frame-system", @@ -2933,7 +2933,7 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "bitflags", "frame-metadata", @@ -2964,7 +2964,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "Inflector", "cfg-expr", @@ -2978,7 +2978,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -2990,7 +2990,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "proc-macro2", "quote", @@ -3000,7 +3000,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "frame-support", "log", @@ -3017,7 +3017,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "frame-benchmarking", "frame-support", @@ -3032,7 +3032,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "parity-scale-codec", "sp-api", @@ -3041,7 +3041,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "frame-support", "sp-api", @@ -3915,7 +3915,7 @@ checksum = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" [[package]] name = "kusama-runtime" version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "beefy-primitives", "bitvec", @@ -4008,7 +4008,7 @@ dependencies = [ [[package]] name = "kusama-runtime-constants" version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "frame-support", "polkadot-primitives", @@ -5367,7 +5367,7 @@ checksum = "28988d872ab76095a6e6ac88d99b54fd267702734fd7ffe610ca27f533ddb95a" [[package]] name = "orchestra" version = "0.0.1" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "async-trait", "dyn-clonable", @@ -5383,7 +5383,7 @@ dependencies = [ [[package]] name = "orchestra-proc-macro" version = "0.0.1" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "expander 0.0.6", "itertools", @@ -5421,7 +5421,7 @@ dependencies = [ [[package]] name = "pallet-alliance" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "frame-benchmarking", "frame-support", @@ -5442,7 +5442,7 @@ dependencies = [ [[package]] name = "pallet-asset-tx-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "frame-support", "frame-system", @@ -5459,7 +5459,7 @@ dependencies = [ [[package]] name = "pallet-assets" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "frame-benchmarking", "frame-support", @@ -5473,7 +5473,7 @@ dependencies = [ [[package]] name = "pallet-aura" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "frame-support", "frame-system", @@ -5489,7 +5489,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "frame-support", "frame-system", @@ -5505,7 +5505,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "frame-support", "frame-system", @@ -5520,7 +5520,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "frame-benchmarking", "frame-support", @@ -5544,7 +5544,7 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5564,7 +5564,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "frame-benchmarking", "frame-support", @@ -5579,7 +5579,7 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "beefy-primitives", "frame-support", @@ -5595,7 +5595,7 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "beefy-merkle-tree", "beefy-primitives", @@ -5618,7 +5618,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "frame-benchmarking", "frame-support", @@ -5636,7 +5636,7 @@ dependencies = [ [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "frame-benchmarking", "frame-support", @@ -5681,7 +5681,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "frame-benchmarking", "frame-support", @@ -5698,7 +5698,7 @@ dependencies = [ [[package]] name = "pallet-contracts" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "bitflags", "frame-benchmarking", @@ -5726,7 +5726,7 @@ dependencies = [ [[package]] name = "pallet-contracts-primitives" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "bitflags", "parity-scale-codec", @@ -5741,7 +5741,7 @@ dependencies = [ [[package]] name = "pallet-contracts-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "proc-macro2", "quote", @@ -5751,7 +5751,7 @@ dependencies = [ [[package]] name = "pallet-contracts-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "jsonrpsee", "pallet-contracts-primitives", @@ -5768,7 +5768,7 @@ dependencies = [ [[package]] name = "pallet-contracts-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "pallet-contracts-primitives", "parity-scale-codec", @@ -5781,7 +5781,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "frame-benchmarking", "frame-support", @@ -5797,7 +5797,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5820,7 +5820,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-support-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5833,7 +5833,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "frame-benchmarking", "frame-support", @@ -5851,7 +5851,7 @@ dependencies = [ [[package]] name = "pallet-gilt" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "frame-benchmarking", "frame-support", @@ -5866,7 +5866,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "frame-benchmarking", "frame-support", @@ -5889,7 +5889,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "enumflags2", "frame-benchmarking", @@ -5905,7 +5905,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "frame-benchmarking", "frame-support", @@ -5925,7 +5925,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "frame-benchmarking", "frame-support", @@ -5942,7 +5942,7 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "frame-benchmarking", "frame-support", @@ -5959,7 +5959,7 @@ dependencies = [ [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "ckb-merkle-mountain-range", "frame-benchmarking", @@ -5977,7 +5977,7 @@ dependencies = [ [[package]] name = "pallet-mmr-rpc" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -5992,7 +5992,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "frame-benchmarking", "frame-support", @@ -6007,7 +6007,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "frame-support", "frame-system", @@ -6024,7 +6024,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-benchmarking" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6043,7 +6043,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-runtime-api" version = "1.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "parity-scale-codec", "sp-api", @@ -6053,7 +6053,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "frame-support", "frame-system", @@ -6070,7 +6070,7 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6093,7 +6093,7 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "frame-benchmarking", "frame-support", @@ -6109,7 +6109,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "frame-benchmarking", "frame-support", @@ -6124,7 +6124,7 @@ dependencies = [ [[package]] name = "pallet-randomness-collective-flip" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "frame-support", "frame-system", @@ -6138,7 +6138,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "frame-benchmarking", "frame-support", @@ -6153,7 +6153,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "frame-benchmarking", "frame-support", @@ -6169,7 +6169,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "frame-support", "frame-system", @@ -6190,7 +6190,7 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "frame-benchmarking", "frame-support", @@ -6206,7 +6206,7 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "frame-support", "frame-system", @@ -6220,7 +6220,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6243,7 +6243,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -6254,7 +6254,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "log", "sp-arithmetic", @@ -6263,7 +6263,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "frame-support", "frame-system", @@ -6292,7 +6292,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "frame-benchmarking", "frame-support", @@ -6310,7 +6310,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "frame-benchmarking", "frame-support", @@ -6329,7 +6329,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "frame-support", "frame-system", @@ -6345,7 +6345,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -6360,7 +6360,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -6371,7 +6371,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "frame-benchmarking", "frame-support", @@ -6388,7 +6388,7 @@ dependencies = [ [[package]] name = "pallet-uniques" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "frame-benchmarking", "frame-support", @@ -6403,7 +6403,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "frame-benchmarking", "frame-support", @@ -6419,7 +6419,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "frame-benchmarking", "frame-support", @@ -6434,7 +6434,7 @@ dependencies = [ [[package]] name = "pallet-xcm" version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "frame-support", "frame-system", @@ -6452,7 +6452,7 @@ dependencies = [ [[package]] name = "pallet-xcm-benchmarks" version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "frame-benchmarking", "frame-support", @@ -7010,7 +7010,7 @@ dependencies = [ [[package]] name = "polkadot-approval-distribution" version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "futures", "polkadot-node-network-protocol", @@ -7025,7 +7025,7 @@ dependencies = [ [[package]] name = "polkadot-availability-bitfield-distribution" version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "futures", "polkadot-node-network-protocol", @@ -7039,7 +7039,7 @@ dependencies = [ [[package]] name = "polkadot-availability-distribution" version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "derive_more", "fatality", @@ -7062,7 +7062,7 @@ dependencies = [ [[package]] name = "polkadot-availability-recovery" version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "fatality", "futures", @@ -7083,7 +7083,7 @@ dependencies = [ [[package]] name = "polkadot-cli" version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "clap 3.2.19", "frame-benchmarking-cli", @@ -7109,7 +7109,7 @@ dependencies = [ [[package]] name = "polkadot-client" version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "beefy-primitives", "frame-benchmarking", @@ -7150,7 +7150,7 @@ dependencies = [ [[package]] name = "polkadot-collator-protocol" version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "always-assert", "fatality", @@ -7171,7 +7171,7 @@ dependencies = [ [[package]] name = "polkadot-core-primitives" version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "parity-scale-codec", "parity-util-mem", @@ -7184,7 +7184,7 @@ dependencies = [ [[package]] name = "polkadot-dispute-distribution" version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "derive_more", "fatality", @@ -7207,7 +7207,7 @@ dependencies = [ [[package]] name = "polkadot-erasure-coding" version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "parity-scale-codec", "polkadot-node-primitives", @@ -7221,7 +7221,7 @@ dependencies = [ [[package]] name = "polkadot-gossip-support" version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "futures", "futures-timer", @@ -7241,7 +7241,7 @@ dependencies = [ [[package]] name = "polkadot-network-bridge" version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "always-assert", "async-trait", @@ -7265,7 +7265,7 @@ dependencies = [ [[package]] name = "polkadot-node-collation-generation" version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "futures", "parity-scale-codec", @@ -7283,7 +7283,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-approval-voting" version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "bitvec", "derive_more", @@ -7312,7 +7312,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-av-store" version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "bitvec", "futures", @@ -7332,7 +7332,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-backing" version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "bitvec", "fatality", @@ -7351,7 +7351,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-bitfield-signing" version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "futures", "polkadot-node-subsystem", @@ -7366,7 +7366,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-candidate-validation" version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "async-trait", "futures", @@ -7384,7 +7384,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-api" version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "futures", "polkadot-node-subsystem", @@ -7399,7 +7399,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-selection" version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "futures", "futures-timer", @@ -7416,7 +7416,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-dispute-coordinator" version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "fatality", "futures", @@ -7435,7 +7435,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-parachains-inherent" version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "async-trait", "futures", @@ -7452,7 +7452,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-provisioner" version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "bitvec", "fatality", @@ -7470,7 +7470,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf" version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "always-assert", "assert_matches", @@ -7502,7 +7502,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf-checker" version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "futures", "polkadot-node-primitives", @@ -7518,7 +7518,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-runtime-api" version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "futures", "memory-lru", @@ -7534,7 +7534,7 @@ dependencies = [ [[package]] name = "polkadot-node-jaeger" version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "async-std", "lazy_static", @@ -7552,7 +7552,7 @@ dependencies = [ [[package]] name = "polkadot-node-metrics" version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "bs58", "futures", @@ -7571,7 +7571,7 @@ dependencies = [ [[package]] name = "polkadot-node-network-protocol" version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "async-trait", "derive_more", @@ -7593,7 +7593,7 @@ dependencies = [ [[package]] name = "polkadot-node-primitives" version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "bounded-vec", "futures", @@ -7615,7 +7615,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem" version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "polkadot-node-jaeger", "polkadot-node-subsystem-types", @@ -7625,7 +7625,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-test-helpers" version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "async-trait", "futures", @@ -7643,7 +7643,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-types" version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "async-trait", "derive_more", @@ -7666,7 +7666,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-util" version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "async-trait", "derive_more", @@ -7699,7 +7699,7 @@ dependencies = [ [[package]] name = "polkadot-overseer" version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "async-trait", "futures", @@ -7722,7 +7722,7 @@ dependencies = [ [[package]] name = "polkadot-parachain" version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "derive_more", "frame-support", @@ -7822,7 +7822,7 @@ dependencies = [ [[package]] name = "polkadot-performance-test" version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "env_logger 0.9.0", "kusama-runtime", @@ -7837,7 +7837,7 @@ dependencies = [ [[package]] name = "polkadot-primitives" version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "bitvec", "frame-system", @@ -7867,7 +7867,7 @@ dependencies = [ [[package]] name = "polkadot-rpc" version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "beefy-gadget", "beefy-gadget-rpc", @@ -7899,7 +7899,7 @@ dependencies = [ [[package]] name = "polkadot-runtime" version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "beefy-primitives", "bitvec", @@ -7987,7 +7987,7 @@ dependencies = [ [[package]] name = "polkadot-runtime-common" version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "beefy-primitives", "bitvec", @@ -8034,7 +8034,7 @@ dependencies = [ [[package]] name = "polkadot-runtime-constants" version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "frame-support", "polkadot-primitives", @@ -8046,7 +8046,7 @@ dependencies = [ [[package]] name = "polkadot-runtime-metrics" version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "bs58", "parity-scale-codec", @@ -8058,7 +8058,7 @@ dependencies = [ [[package]] name = "polkadot-runtime-parachains" version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "bitflags", "bitvec", @@ -8101,11 +8101,12 @@ dependencies = [ [[package]] name = "polkadot-service" version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "async-trait", "beefy-gadget", "beefy-primitives", + "frame-support", "frame-system-rpc-runtime-api", "futures", "hex-literal", @@ -8205,7 +8206,7 @@ dependencies = [ [[package]] name = "polkadot-statement-distribution" version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "arrayvec 0.5.2", "fatality", @@ -8226,7 +8227,7 @@ dependencies = [ [[package]] name = "polkadot-statement-table" version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "parity-scale-codec", "polkadot-primitives", @@ -8236,7 +8237,7 @@ dependencies = [ [[package]] name = "polkadot-test-client" version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "parity-scale-codec", "polkadot-node-subsystem", @@ -8261,7 +8262,7 @@ dependencies = [ [[package]] name = "polkadot-test-runtime" version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "beefy-primitives", "bitvec", @@ -8322,7 +8323,7 @@ dependencies = [ [[package]] name = "polkadot-test-service" version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "frame-benchmarking", "frame-system", @@ -8467,7 +8468,7 @@ dependencies = [ [[package]] name = "prioritized-metered-channel" version = "0.2.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "coarsetime", "crossbeam-queue", @@ -8911,7 +8912,7 @@ dependencies = [ [[package]] name = "remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "env_logger 0.9.0", "jsonrpsee", @@ -9033,7 +9034,7 @@ dependencies = [ [[package]] name = "rococo-runtime" version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "beefy-merkle-tree", "beefy-primitives", @@ -9102,7 +9103,7 @@ dependencies = [ [[package]] name = "rococo-runtime-constants" version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "frame-support", "polkadot-primitives", @@ -9286,7 +9287,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "log", "sp-core", @@ -9297,7 +9298,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "futures", "futures-timer", @@ -9323,7 +9324,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "futures", "futures-timer", @@ -9346,7 +9347,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -9362,7 +9363,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "impl-trait-for-tuples", "memmap2 0.5.0", @@ -9379,7 +9380,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -9390,7 +9391,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "chrono", "clap 3.2.19", @@ -9429,7 +9430,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "fnv", "futures", @@ -9457,7 +9458,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "hash-db", "kvdb", @@ -9482,7 +9483,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "async-trait", "futures", @@ -9506,7 +9507,7 @@ dependencies = [ [[package]] name = "sc-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "async-trait", "futures", @@ -9535,7 +9536,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "async-trait", "fork-tree", @@ -9577,7 +9578,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "futures", "jsonrpsee", @@ -9599,7 +9600,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "fork-tree", "parity-scale-codec", @@ -9612,7 +9613,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "async-trait", "futures", @@ -9637,7 +9638,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "lazy_static", "lru 0.7.7", @@ -9664,7 +9665,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "environmental", "parity-scale-codec", @@ -9680,7 +9681,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "log", "parity-scale-codec", @@ -9695,7 +9696,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "cfg-if 1.0.0", "libc", @@ -9716,7 +9717,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "ahash", "async-trait", @@ -9757,7 +9758,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "finality-grandpa", "futures", @@ -9778,7 +9779,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "ansi_term", "futures", @@ -9795,7 +9796,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "async-trait", "hex", @@ -9810,7 +9811,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "async-trait", "asynchronous-codec", @@ -9859,7 +9860,7 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "async-trait", "bitflags", @@ -9881,7 +9882,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "ahash", "futures", @@ -9899,7 +9900,7 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "futures", "hex", @@ -9920,7 +9921,7 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "fork-tree", "futures", @@ -9948,7 +9949,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "bytes", "fnv", @@ -9978,7 +9979,7 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "futures", "libp2p", @@ -9991,7 +9992,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -10000,7 +10001,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "futures", "hash-db", @@ -10030,7 +10031,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "futures", "jsonrpsee", @@ -10053,7 +10054,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "futures", "jsonrpsee", @@ -10066,7 +10067,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "async-trait", "directories", @@ -10133,7 +10134,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "log", "parity-scale-codec", @@ -10147,7 +10148,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -10166,7 +10167,7 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "futures", "libc", @@ -10185,7 +10186,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "chrono", "futures", @@ -10203,7 +10204,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "ansi_term", "atty", @@ -10234,7 +10235,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -10245,7 +10246,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "futures", "futures-timer", @@ -10271,7 +10272,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "futures", "log", @@ -10284,7 +10285,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "futures", "futures-timer", @@ -10731,7 +10732,7 @@ checksum = "03b634d87b960ab1a38c4fe143b508576f075e7c978bfad18217645ebfdfa2ec" [[package]] name = "slot-range-helper" version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "enumn", "parity-scale-codec", @@ -10807,7 +10808,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "hash-db", "log", @@ -10825,7 +10826,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "blake2", "proc-macro-crate", @@ -10837,7 +10838,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "parity-scale-codec", "scale-info", @@ -10850,7 +10851,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "integer-sqrt", "num-traits", @@ -10865,7 +10866,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "parity-scale-codec", "scale-info", @@ -10878,7 +10879,7 @@ dependencies = [ [[package]] name = "sp-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "async-trait", "parity-scale-codec", @@ -10890,7 +10891,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "parity-scale-codec", "sp-api", @@ -10902,7 +10903,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "futures", "log", @@ -10920,7 +10921,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "async-trait", "futures", @@ -10939,7 +10940,7 @@ dependencies = [ [[package]] name = "sp-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "async-trait", "parity-scale-codec", @@ -10957,7 +10958,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "async-trait", "merlin", @@ -10980,7 +10981,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "parity-scale-codec", "scale-info", @@ -10994,7 +10995,7 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "parity-scale-codec", "scale-info", @@ -11007,7 +11008,7 @@ dependencies = [ [[package]] name = "sp-core" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "base58", "bitflags", @@ -11053,7 +11054,7 @@ dependencies = [ [[package]] name = "sp-core-hashing" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "blake2", "byteorder", @@ -11067,7 +11068,7 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "proc-macro2", "quote", @@ -11078,7 +11079,7 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -11087,7 +11088,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "proc-macro2", "quote", @@ -11097,7 +11098,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.12.0" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "environmental", "parity-scale-codec", @@ -11108,7 +11109,7 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "finality-grandpa", "log", @@ -11126,7 +11127,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -11140,7 +11141,7 @@ dependencies = [ [[package]] name = "sp-io" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "bytes", "futures", @@ -11166,7 +11167,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "lazy_static", "sp-core", @@ -11177,7 +11178,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.12.0" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "async-trait", "futures", @@ -11194,7 +11195,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "thiserror", "zstd", @@ -11203,7 +11204,7 @@ dependencies = [ [[package]] name = "sp-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "log", "parity-scale-codec", @@ -11218,7 +11219,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "parity-scale-codec", "scale-info", @@ -11232,7 +11233,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "sp-api", "sp-core", @@ -11242,7 +11243,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "backtrace", "lazy_static", @@ -11252,7 +11253,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "rustc-hash", "serde", @@ -11262,7 +11263,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "either", "hash256-std-hasher", @@ -11284,7 +11285,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -11302,7 +11303,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "Inflector", "proc-macro-crate", @@ -11314,7 +11315,7 @@ dependencies = [ [[package]] name = "sp-sandbox" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "log", "parity-scale-codec", @@ -11328,7 +11329,7 @@ dependencies = [ [[package]] name = "sp-serializer" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "serde", "serde_json", @@ -11337,7 +11338,7 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "parity-scale-codec", "scale-info", @@ -11351,7 +11352,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "parity-scale-codec", "scale-info", @@ -11362,7 +11363,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.12.0" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "hash-db", "log", @@ -11384,12 +11385,12 @@ dependencies = [ [[package]] name = "sp-std" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" [[package]] name = "sp-storage" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "impl-serde", "parity-scale-codec", @@ -11402,7 +11403,7 @@ dependencies = [ [[package]] name = "sp-tasks" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "log", "sp-core", @@ -11415,7 +11416,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "async-trait", "futures-timer", @@ -11431,7 +11432,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "parity-scale-codec", "sp-std", @@ -11443,7 +11444,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "sp-api", "sp-runtime", @@ -11452,7 +11453,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "async-trait", "log", @@ -11468,7 +11469,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "ahash", "hash-db", @@ -11491,7 +11492,7 @@ dependencies = [ [[package]] name = "sp-version" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "impl-serde", "parity-scale-codec", @@ -11508,7 +11509,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -11519,7 +11520,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "impl-trait-for-tuples", "log", @@ -11778,7 +11779,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "platforms", ] @@ -11786,7 +11787,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "frame-system-rpc-runtime-api", "futures", @@ -11807,7 +11808,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "futures-util", "hyper", @@ -11820,7 +11821,7 @@ dependencies = [ [[package]] name = "substrate-state-trie-migration-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "jsonrpsee", "log", @@ -11841,7 +11842,7 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "async-trait", "futures", @@ -11867,7 +11868,7 @@ dependencies = [ [[package]] name = "substrate-test-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "futures", "substrate-test-utils-derive", @@ -11877,7 +11878,7 @@ dependencies = [ [[package]] name = "substrate-test-utils-derive" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -11888,7 +11889,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "ansi_term", "build-helper", @@ -11996,7 +11997,7 @@ checksum = "13a4ec180a2de59b57434704ccfad967f789b12737738798fa08798cd5824c16" [[package]] name = "test-runtime-constants" version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "frame-support", "polkadot-primitives", @@ -12285,7 +12286,7 @@ dependencies = [ [[package]] name = "tracing-gum" version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "polkadot-node-jaeger", "polkadot-primitives", @@ -12296,7 +12297,7 @@ dependencies = [ [[package]] name = "tracing-gum-proc-macro" version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "expander 0.0.6", "proc-macro-crate", @@ -12423,7 +12424,7 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#5cdb054049980eecb449c36a7ccfe4990329c494" +source = "git+https://github.com/paritytech/substrate?branch=master#0246883c404d498090f33e795feb8075fa8d3b6b" dependencies = [ "clap 3.2.19", "jsonrpsee", @@ -13001,7 +13002,7 @@ dependencies = [ [[package]] name = "westend-runtime" version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "beefy-primitives", "bitvec", @@ -13090,7 +13091,7 @@ dependencies = [ [[package]] name = "westend-runtime-constants" version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "frame-support", "polkadot-primitives", @@ -13375,7 +13376,7 @@ dependencies = [ [[package]] name = "xcm" version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "derivative", "impl-trait-for-tuples", @@ -13389,7 +13390,7 @@ dependencies = [ [[package]] name = "xcm-builder" version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "frame-support", "frame-system", @@ -13409,7 +13410,7 @@ dependencies = [ [[package]] name = "xcm-executor" version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "frame-benchmarking", "frame-support", @@ -13427,7 +13428,7 @@ dependencies = [ [[package]] name = "xcm-procedural" version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot?branch=master#99d6b557c0594a35198be84d03833e5af692d109" +source = "git+https://github.com/paritytech/polkadot?branch=master#2eb7672905d99971fc11ad7ff4d57e68967401d2" dependencies = [ "Inflector", "proc-macro2", diff --git a/pallets/collator-selection/src/weights.rs b/pallets/collator-selection/src/weights.rs index 513e780834a..fa99567734f 100644 --- a/pallets/collator-selection/src/weights.rs +++ b/pallets/collator-selection/src/weights.rs @@ -20,7 +20,7 @@ use frame_support::{ traits::Get, - weights::{constants::RocksDbWeight, Weight}, + weights::{constants::RocksDbWeight, RefTimeWeight, Weight}, }; use sp_std::marker::PhantomData; @@ -39,91 +39,143 @@ pub trait WeightInfo { pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { fn set_invulnerables(b: u32) -> Weight { - (18_563_000 as Weight) + Weight::from_ref_time(18_563_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add((68_000 as Weight).saturating_mul(b as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add( + Weight::from_ref_time(68_000 as RefTimeWeight) + .scalar_saturating_mul(b as RefTimeWeight), + ) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } fn set_desired_candidates() -> Weight { - (16_363_000 as Weight).saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(16_363_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } fn set_candidacy_bond() -> Weight { - (16_840_000 as Weight).saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(16_840_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } fn register_as_candidate(c: u32) -> Weight { - (71_196_000 as Weight) + Weight::from_ref_time(71_196_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add((198_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add( + Weight::from_ref_time(198_000 as RefTimeWeight) + .scalar_saturating_mul(c as RefTimeWeight), + ) + .saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } fn leave_intent(c: u32) -> Weight { - (55_336_000 as Weight) + Weight::from_ref_time(55_336_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add((151_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add( + Weight::from_ref_time(151_000 as RefTimeWeight) + .scalar_saturating_mul(c as RefTimeWeight), + ) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } fn note_author() -> Weight { - (71_461_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(71_461_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight)) } fn new_session(r: u32, c: u32) -> Weight { - (0 as Weight) + Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 1_010_000 - .saturating_add((109_961_000 as Weight).saturating_mul(r as Weight)) + .saturating_add( + Weight::from_ref_time(109_961_000 as RefTimeWeight) + .scalar_saturating_mul(r as RefTimeWeight), + ) // Standard Error: 1_010_000 - .saturating_add((151_952_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(r as Weight))) - .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(c as Weight))) - .saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(r as Weight))) - .saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(c as Weight))) + .saturating_add( + Weight::from_ref_time(151_952_000 as RefTimeWeight) + .scalar_saturating_mul(c as RefTimeWeight), + ) + .saturating_add( + T::DbWeight::get().reads((1 as RefTimeWeight).saturating_mul(r as RefTimeWeight)), + ) + .saturating_add( + T::DbWeight::get().reads((2 as RefTimeWeight).saturating_mul(c as RefTimeWeight)), + ) + .saturating_add( + T::DbWeight::get().writes((2 as RefTimeWeight).saturating_mul(r as RefTimeWeight)), + ) + .saturating_add( + T::DbWeight::get().writes((2 as RefTimeWeight).saturating_mul(c as RefTimeWeight)), + ) } } // For backwards compatibility and tests impl WeightInfo for () { fn set_invulnerables(b: u32) -> Weight { - (18_563_000 as Weight) + Weight::from_ref_time(18_563_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add((68_000 as Weight).saturating_mul(b as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) + .saturating_add( + Weight::from_ref_time(68_000 as RefTimeWeight) + .scalar_saturating_mul(b as RefTimeWeight), + ) + .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } fn set_desired_candidates() -> Weight { - (16_363_000 as Weight).saturating_add(RocksDbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(16_363_000 as RefTimeWeight) + .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } fn set_candidacy_bond() -> Weight { - (16_840_000 as Weight).saturating_add(RocksDbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(16_840_000 as RefTimeWeight) + .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } fn register_as_candidate(c: u32) -> Weight { - (71_196_000 as Weight) + Weight::from_ref_time(71_196_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add((198_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(RocksDbWeight::get().reads(4 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + .saturating_add( + Weight::from_ref_time(198_000 as RefTimeWeight) + .scalar_saturating_mul(c as RefTimeWeight), + ) + .saturating_add(RocksDbWeight::get().reads(4 as RefTimeWeight)) + .saturating_add(RocksDbWeight::get().writes(2 as RefTimeWeight)) } fn leave_intent(c: u32) -> Weight { - (55_336_000 as Weight) + Weight::from_ref_time(55_336_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add((151_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + .saturating_add( + Weight::from_ref_time(151_000 as RefTimeWeight) + .scalar_saturating_mul(c as RefTimeWeight), + ) + .saturating_add(RocksDbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(RocksDbWeight::get().writes(2 as RefTimeWeight)) } fn note_author() -> Weight { - (71_461_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(71_461_000 as RefTimeWeight) + .saturating_add(RocksDbWeight::get().reads(3 as RefTimeWeight)) + .saturating_add(RocksDbWeight::get().writes(4 as RefTimeWeight)) } fn new_session(r: u32, c: u32) -> Weight { - (0 as Weight) + Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 1_010_000 - .saturating_add((109_961_000 as Weight).saturating_mul(r as Weight)) + .saturating_add( + Weight::from_ref_time(109_961_000 as RefTimeWeight) + .scalar_saturating_mul(r as RefTimeWeight), + ) // Standard Error: 1_010_000 - .saturating_add((151_952_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(r as Weight))) - .saturating_add(RocksDbWeight::get().reads((2 as Weight).saturating_mul(c as Weight))) - .saturating_add(RocksDbWeight::get().writes((2 as Weight).saturating_mul(r as Weight))) - .saturating_add(RocksDbWeight::get().writes((2 as Weight).saturating_mul(c as Weight))) + .saturating_add( + Weight::from_ref_time(151_952_000 as RefTimeWeight) + .scalar_saturating_mul(c as RefTimeWeight), + ) + .saturating_add( + RocksDbWeight::get().reads((1 as RefTimeWeight).saturating_mul(r as RefTimeWeight)), + ) + .saturating_add( + RocksDbWeight::get().reads((2 as RefTimeWeight).saturating_mul(c as RefTimeWeight)), + ) + .saturating_add( + RocksDbWeight::get() + .writes((2 as RefTimeWeight).saturating_mul(r as RefTimeWeight)), + ) + .saturating_add( + RocksDbWeight::get() + .writes((2 as RefTimeWeight).saturating_mul(c as RefTimeWeight)), + ) } } diff --git a/pallets/dmp-queue/src/lib.rs b/pallets/dmp-queue/src/lib.rs index a811bf54054..838368b76df 100644 --- a/pallets/dmp-queue/src/lib.rs +++ b/pallets/dmp-queue/src/lib.rs @@ -140,7 +140,7 @@ pub mod pallet { /// /// Events: /// - `OverweightServiced`: On success. - #[pallet::weight(weight_limit.saturating_add(1_000_000))] + #[pallet::weight(weight_limit.saturating_add(Weight::from_ref_time(1_000_000)))] pub fn service_overweight( origin: OriginFor, index: OverweightIndex, @@ -153,7 +153,7 @@ pub mod pallet { .map_err(|_| Error::::OverLimit)?; Overweight::::remove(index); Self::deposit_event(Event::OverweightServiced { overweight_index: index, weight_used }); - Ok(Some(weight_used.saturating_add(1_000_000)).into()) + Ok(Some(weight_used.saturating_add(Weight::from_ref_time(1_000_000))).into()) } } @@ -189,7 +189,7 @@ pub mod pallet { /// Exactly equivalent to `service_queue` but expects a mutable `page_index` to be passed /// in and any changes stored. fn do_service_queue(limit: Weight, page_index: &mut PageIndexData) -> Weight { - let mut used = 0; + let mut used = Weight::new(); while page_index.begin_used < page_index.end_used { let page = Pages::::take(page_index.begin_used); for (i, &(sent_at, ref data)) in page.iter().enumerate() { @@ -232,19 +232,19 @@ pub mod pallet { match maybe_msg { Err(_) => { Self::deposit_event(Event::InvalidFormat { message_id }); - Ok(0) + Ok(Weight::zero()) }, Ok(Err(())) => { Self::deposit_event(Event::UnsupportedVersion { message_id }); - Ok(0) + Ok(Weight::zero()) }, Ok(Ok(x)) => { - let outcome = T::XcmExecutor::execute_xcm(Parent, x, limit); + let outcome = T::XcmExecutor::execute_xcm(Parent, x, limit.ref_time()); match outcome { Outcome::Error(XcmError::WeightLimitReached(required)) => - Err((message_id, required)), + Err((message_id, Weight::from_ref_time(required))), outcome => { - let weight_used = outcome.weight_used(); + let weight_used = Weight::from_ref_time(outcome.weight_used()); Self::deposit_event(Event::ExecutedDownward { message_id, outcome }); Ok(weight_used) }, @@ -349,7 +349,7 @@ mod tests { }; use sp_version::RuntimeVersion; use std::cell::RefCell; - use xcm::latest::{MultiLocation, OriginKind}; + use xcm::latest::{MultiLocation, OriginKind, Weight as XCMWeight}; type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; @@ -379,8 +379,8 @@ mod tests { state_version: 1, }; pub const ParachainId: ParaId = ParaId::new(200); - pub const ReservedXcmpWeight: Weight = 0; - pub const ReservedDmpWeight: Weight = 0; + pub const ReservedXcmpWeight: Weight = Weight::zero(); + pub const ReservedDmpWeight: Weight = Weight::zero(); } type AccountId = u64; @@ -429,8 +429,8 @@ mod tests { fn execute_xcm_in_credit( _origin: impl Into, message: Xcm, - weight_limit: Weight, - _credit: Weight, + weight_limit: XCMWeight, + _credit: XCMWeight, ) -> Outcome { let o = match (message.0.len(), &message.0.first()) { (1, Some(Transact { require_weight_at_most, .. })) => { @@ -478,7 +478,7 @@ mod tests { DmpQueue::handle_dmp_messages(iter, limit) } - fn msg(weight: Weight) -> Xcm { + fn msg(weight: XCMWeight) -> Xcm { Xcm(vec![Transact { origin_type: OriginKind::Native, require_weight_at_most: weight, @@ -486,11 +486,11 @@ mod tests { }]) } - fn msg_complete(weight: Weight) -> (Xcm, Outcome) { + fn msg_complete(weight: XCMWeight) -> (Xcm, Outcome) { (msg(weight), Outcome::Complete(weight)) } - fn msg_limit_reached(weight: Weight) -> (Xcm, Outcome) { + fn msg_limit_reached(weight: XCMWeight) -> (Xcm, Outcome) { (msg(weight), Outcome::Error(XcmError::WeightLimitReached(weight))) } @@ -511,8 +511,8 @@ mod tests { #[test] fn basic_setup_works() { new_test_ext().execute_with(|| { - let weight_used = handle_messages(&[], 1000); - assert_eq!(weight_used, 0); + let weight_used = handle_messages(&[], Weight::from_ref_time(1000)); + assert_eq!(weight_used, Weight::zero()); assert_eq!(take_trace(), Vec::new()); assert!(queue_is_empty()); }); @@ -522,8 +522,8 @@ mod tests { fn service_inline_complete_works() { new_test_ext().execute_with(|| { let incoming = vec![msg(1000), msg(1001)]; - let weight_used = handle_messages(&incoming, 2500); - assert_eq!(weight_used, 2001); + let weight_used = handle_messages(&incoming, Weight::from_ref_time(2500)); + assert_eq!(weight_used, Weight::from_ref_time(2001)); assert_eq!(take_trace(), vec![msg_complete(1000), msg_complete(1001)]); assert!(queue_is_empty()); }); @@ -534,8 +534,8 @@ mod tests { new_test_ext().execute_with(|| { let enqueued = vec![msg(1000), msg(1001), msg(1002)]; enqueue(&enqueued); - let weight_used = handle_messages(&[], 2500); - assert_eq!(weight_used, 2001); + let weight_used = handle_messages(&[], Weight::from_ref_time(2500)); + assert_eq!(weight_used, Weight::from_ref_time(2001)); assert_eq!( take_trace(), vec![msg_complete(1000), msg_complete(1001), msg_limit_reached(1002),] @@ -547,8 +547,8 @@ mod tests { fn enqueue_works() { new_test_ext().execute_with(|| { let incoming = vec![msg(1000), msg(1001), msg(1002)]; - let weight_used = handle_messages(&incoming, 999); - assert_eq!(weight_used, 0); + let weight_used = handle_messages(&incoming, Weight::from_ref_time(999)); + assert_eq!(weight_used, Weight::zero()); assert_eq!( PageIndex::::get(), PageIndexData { begin_used: 0, end_used: 1, overweight_count: 0 } @@ -556,15 +556,15 @@ mod tests { assert_eq!(Pages::::get(0).len(), 3); assert_eq!(take_trace(), vec![msg_limit_reached(1000)]); - let weight_used = handle_messages(&[], 2500); - assert_eq!(weight_used, 2001); + let weight_used = handle_messages(&[], Weight::from_ref_time(2500)); + assert_eq!(weight_used, Weight::from_ref_time(2001)); assert_eq!( take_trace(), vec![msg_complete(1000), msg_complete(1001), msg_limit_reached(1002),] ); - let weight_used = handle_messages(&[], 2500); - assert_eq!(weight_used, 1002); + let weight_used = handle_messages(&[], Weight::from_ref_time(2500)); + assert_eq!(weight_used, Weight::from_ref_time(1002)); assert_eq!(take_trace(), vec![msg_complete(1002),]); assert!(queue_is_empty()); }); @@ -574,14 +574,14 @@ mod tests { fn service_inline_then_enqueue_works() { new_test_ext().execute_with(|| { let incoming = vec![msg(1000), msg(1001), msg(1002)]; - let weight_used = handle_messages(&incoming, 1500); - assert_eq!(weight_used, 1000); + let weight_used = handle_messages(&incoming, Weight::from_ref_time(1500)); + assert_eq!(weight_used, Weight::from_ref_time(1000)); assert_eq!(pages_queued(), 1); assert_eq!(Pages::::get(0).len(), 2); assert_eq!(take_trace(), vec![msg_complete(1000), msg_limit_reached(1001),]); - let weight_used = handle_messages(&[], 2500); - assert_eq!(weight_used, 2003); + let weight_used = handle_messages(&[], Weight::from_ref_time(2500)); + assert_eq!(weight_used, Weight::from_ref_time(2003)); assert_eq!(take_trace(), vec![msg_complete(1001), msg_complete(1002),]); assert!(queue_is_empty()); }); @@ -593,8 +593,8 @@ mod tests { let enqueued = vec![msg(1000), msg(1001)]; let incoming = vec![msg(1002), msg(1003)]; enqueue(&enqueued); - let weight_used = handle_messages(&incoming, 5000); - assert_eq!(weight_used, 4006); + let weight_used = handle_messages(&incoming, Weight::from_ref_time(5000)); + assert_eq!(weight_used, Weight::from_ref_time(4006)); assert_eq!( take_trace(), vec![ @@ -614,19 +614,19 @@ mod tests { let enqueued = vec![msg(1000), msg(10001)]; let incoming = vec![msg(1002), msg(1003)]; enqueue(&enqueued); - let weight_used = handle_messages(&incoming, 5000); - assert_eq!(weight_used, 1000); + let weight_used = handle_messages(&incoming, Weight::from_ref_time(5000)); + assert_eq!(weight_used, Weight::from_ref_time(1000)); assert_eq!(take_trace(), vec![msg_complete(1000), msg_limit_reached(10001),]); assert_eq!(pages_queued(), 2); // 5000 is not enough to process the 10001 blocker, so nothing happens. - let weight_used = handle_messages(&[], 5000); - assert_eq!(weight_used, 0); + let weight_used = handle_messages(&[], Weight::from_ref_time(5000)); + assert_eq!(weight_used, Weight::zero()); assert_eq!(take_trace(), vec![msg_limit_reached(10001),]); // 20000 is now enough to process everything. - let weight_used = handle_messages(&[], 20000); - assert_eq!(weight_used, 12006); + let weight_used = handle_messages(&[], Weight::from_ref_time(20000)); + assert_eq!(weight_used, Weight::from_ref_time(12006)); assert_eq!( take_trace(), vec![msg_complete(10001), msg_complete(1002), msg_complete(1003),] @@ -641,8 +641,8 @@ mod tests { let enqueued = vec![msg(1000), msg(1001)]; let incoming = vec![msg(10002), msg(1003)]; enqueue(&enqueued); - let weight_used = handle_messages(&incoming, 5000); - assert_eq!(weight_used, 2001); + let weight_used = handle_messages(&incoming, Weight::from_ref_time(5000)); + assert_eq!(weight_used, Weight::from_ref_time(2001)); assert_eq!( take_trace(), vec![msg_complete(1000), msg_complete(1001), msg_limit_reached(10002),] @@ -650,8 +650,8 @@ mod tests { assert_eq!(pages_queued(), 1); // 20000 is now enough to process everything. - let weight_used = handle_messages(&[], 20000); - assert_eq!(weight_used, 11005); + let weight_used = handle_messages(&[], Weight::from_ref_time(20000)); + assert_eq!(weight_used, Weight::from_ref_time(11005)); assert_eq!(take_trace(), vec![msg_complete(10002), msg_complete(1003),]); assert!(queue_is_empty()); }); @@ -663,8 +663,8 @@ mod tests { let enqueued = vec![msg(1000), msg(1001)]; let incoming = vec![msg(1002), msg(10003)]; enqueue(&enqueued); - let weight_used = handle_messages(&incoming, 5000); - assert_eq!(weight_used, 3003); + let weight_used = handle_messages(&incoming, Weight::from_ref_time(5000)); + assert_eq!(weight_used, Weight::from_ref_time(3003)); assert_eq!( take_trace(), vec![ @@ -677,8 +677,8 @@ mod tests { assert_eq!(pages_queued(), 1); // 20000 is now enough to process everything. - let weight_used = handle_messages(&[], 20000); - assert_eq!(weight_used, 10003); + let weight_used = handle_messages(&[], Weight::from_ref_time(20000)); + assert_eq!(weight_used, Weight::from_ref_time(10003)); assert_eq!(take_trace(), vec![msg_complete(10003),]); assert!(queue_is_empty()); }); @@ -689,20 +689,20 @@ mod tests { new_test_ext().execute_with(|| { let enqueued = vec![msg(1000), msg(1001)]; enqueue(&enqueued); - let weight_used = handle_messages(&vec![msg(1002)], 1500); - assert_eq!(weight_used, 1000); + let weight_used = handle_messages(&vec![msg(1002)], Weight::from_ref_time(1500)); + assert_eq!(weight_used, Weight::from_ref_time(1000)); assert_eq!(take_trace(), vec![msg_complete(1000), msg_limit_reached(1001),]); assert_eq!(pages_queued(), 2); assert_eq!(PageIndex::::get().begin_used, 0); - let weight_used = handle_messages(&vec![msg(1003)], 1500); - assert_eq!(weight_used, 1001); + let weight_used = handle_messages(&vec![msg(1003)], Weight::from_ref_time(1500)); + assert_eq!(weight_used, Weight::from_ref_time(1001)); assert_eq!(take_trace(), vec![msg_complete(1001), msg_limit_reached(1002),]); assert_eq!(pages_queued(), 2); assert_eq!(PageIndex::::get().begin_used, 1); - let weight_used = handle_messages(&vec![msg(1004)], 1500); - assert_eq!(weight_used, 1002); + let weight_used = handle_messages(&vec![msg(1004)], Weight::from_ref_time(1500)); + assert_eq!(weight_used, Weight::from_ref_time(1002)); assert_eq!(take_trace(), vec![msg_complete(1002), msg_limit_reached(1003),]); assert_eq!(pages_queued(), 2); assert_eq!(PageIndex::::get().begin_used, 2); @@ -713,11 +713,11 @@ mod tests { fn overweight_should_not_block_queue() { new_test_ext().execute_with(|| { // Set the overweight threshold to 9999. - Configuration::::put(ConfigData { max_individual: 9999 }); + Configuration::::put(ConfigData { max_individual: Weight::from_ref_time(9999) }); let incoming = vec![msg(1000), msg(10001), msg(1002)]; - let weight_used = handle_messages(&incoming, 2500); - assert_eq!(weight_used, 2002); + let weight_used = handle_messages(&incoming, Weight::from_ref_time(2500)); + assert_eq!(weight_used, Weight::from_ref_time(2002)); assert!(queue_is_empty()); assert_eq!( take_trace(), @@ -732,37 +732,43 @@ mod tests { fn overweights_should_be_manually_executable() { new_test_ext().execute_with(|| { // Set the overweight threshold to 9999. - Configuration::::put(ConfigData { max_individual: 9999 }); + Configuration::::put(ConfigData { max_individual: Weight::from_ref_time(9999) }); let incoming = vec![msg(10000)]; - let weight_used = handle_messages(&incoming, 2500); - assert_eq!(weight_used, 0); + let weight_used = handle_messages(&incoming, Weight::from_ref_time(2500)); + assert_eq!(weight_used, Weight::zero()); assert_eq!(take_trace(), vec![msg_limit_reached(10000)]); assert_eq!(overweights(), vec![0]); - assert_noop!(DmpQueue::service_overweight(Origin::signed(1), 0, 20000), BadOrigin); assert_noop!( - DmpQueue::service_overweight(Origin::root(), 1, 20000), + DmpQueue::service_overweight(Origin::signed(1), 0, Weight::from_ref_time(20000)), + BadOrigin + ); + assert_noop!( + DmpQueue::service_overweight(Origin::root(), 1, Weight::from_ref_time(20000)), Error::::Unknown ); assert_noop!( - DmpQueue::service_overweight(Origin::root(), 0, 9999), + DmpQueue::service_overweight(Origin::root(), 0, Weight::from_ref_time(9999)), Error::::OverLimit ); assert_eq!(take_trace(), vec![msg_limit_reached(10000)]); - let base_weight = super::Call::::service_overweight { index: 0, weight_limit: 0 } - .get_dispatch_info() - .weight; + let base_weight = + super::Call::::service_overweight { index: 0, weight_limit: Weight::zero() } + .get_dispatch_info() + .weight; use frame_support::weights::GetDispatchInfo; - let info = DmpQueue::service_overweight(Origin::root(), 0, 20000).unwrap(); + let info = + DmpQueue::service_overweight(Origin::root(), 0, Weight::from_ref_time(20000)) + .unwrap(); let actual_weight = info.actual_weight.unwrap(); - assert_eq!(actual_weight, base_weight + 10000); + assert_eq!(actual_weight, base_weight + Weight::from_ref_time(10000)); assert_eq!(take_trace(), vec![msg_complete(10000)]); assert!(overweights().is_empty()); assert_noop!( - DmpQueue::service_overweight(Origin::root(), 0, 20000), + DmpQueue::service_overweight(Origin::root(), 0, Weight::from_ref_time(20000)), Error::::Unknown ); }); @@ -775,8 +781,8 @@ mod tests { enqueue(&vec![msg(1002), msg(1003)]); enqueue(&vec![msg(1004), msg(1005)]); - let weight_used = DmpQueue::on_idle(1, 6000); - assert_eq!(weight_used, 5010); + let weight_used = DmpQueue::on_idle(1, Weight::from_ref_time(6000)); + assert_eq!(weight_used, Weight::from_ref_time(5010)); assert_eq!( take_trace(), vec![ diff --git a/pallets/parachain-system/src/lib.rs b/pallets/parachain-system/src/lib.rs index b9056d5dcad..f897d5943bc 100644 --- a/pallets/parachain-system/src/lib.rs +++ b/pallets/parachain-system/src/lib.rs @@ -269,7 +269,7 @@ pub mod pallet { } fn on_initialize(_n: T::BlockNumber) -> Weight { - let mut weight = 0; + let mut weight = Weight::new(); // To prevent removing `NewValidationCode` that was set by another `on_initialize` // like for example from scheduler, we only kill the storage entry if it was not yet @@ -416,7 +416,7 @@ pub mod pallet { ::on_validation_data(&vfp); // TODO: This is more than zero, but will need benchmarking to figure out what. - let mut total_weight = 0; + let mut total_weight = Weight::zero(); total_weight += Self::process_inbound_downward_messages( relevant_messaging_state.dmq_mqc_head, downward_messages, @@ -808,7 +808,7 @@ impl Pallet { let dm_count = downward_messages.len() as u32; let mut dmq_head = >::get(); - let mut weight_used = 0; + let mut weight_used = Weight::new(); if dm_count != 0 { Self::deposit_event(Event::DownwardMessagesReceived { count: dm_count }); let max_weight = diff --git a/pallets/parachain-system/src/migration.rs b/pallets/parachain-system/src/migration.rs index b3738d21512..4826ec741dd 100644 --- a/pallets/parachain-system/src/migration.rs +++ b/pallets/parachain-system/src/migration.rs @@ -25,7 +25,7 @@ pub const STORAGE_VERSION: StorageVersion = StorageVersion::new(1); /// Call this during the next runtime upgrade for this module. pub fn on_runtime_upgrade() -> Weight { - let mut weight: Weight = 0; + let mut weight: Weight = Weight::new(); if StorageVersion::get::>() == 0 { weight = weight diff --git a/pallets/parachain-system/src/tests.rs b/pallets/parachain-system/src/tests.rs index 65896fa9b29..9e3fa908e30 100755 --- a/pallets/parachain-system/src/tests.rs +++ b/pallets/parachain-system/src/tests.rs @@ -69,8 +69,8 @@ parameter_types! { state_version: 1, }; pub const ParachainId: ParaId = ParaId::new(200); - pub const ReservedXcmpWeight: Weight = 0; - pub const ReservedDmpWeight: Weight = 0; + pub const ReservedXcmpWeight: Weight = Weight::zero(); + pub const ReservedDmpWeight: Weight = Weight::zero(); } impl frame_system::Config for Test { type Origin = Origin; @@ -155,7 +155,7 @@ impl DmpMessageHandler for SaveIntoThreadLocal { for i in iter { m.borrow_mut().push(i); } - 0 + Weight::zero() }) } } @@ -169,7 +169,7 @@ impl XcmpMessageHandler for SaveIntoThreadLocal { for (sender, sent_at, message) in iter { m.borrow_mut().push((sender, sent_at, message.to_vec())); } - 0 + Weight::zero() }) } } diff --git a/pallets/solo-to-para/src/lib.rs b/pallets/solo-to-para/src/lib.rs index 202d91cae9a..8a0b7dd2f22 100644 --- a/pallets/solo-to-para/src/lib.rs +++ b/pallets/solo-to-para/src/lib.rs @@ -169,7 +169,7 @@ pub mod pallet { if *who == root_account { Ok(ValidTransaction { - priority: info.weight as TransactionPriority, + priority: info.weight.ref_time() as TransactionPriority, longevity: TransactionLongevity::max_value(), propagate: true, ..Default::default() diff --git a/pallets/xcm/src/lib.rs b/pallets/xcm/src/lib.rs index 9659e65b7ff..d33e3c669d0 100644 --- a/pallets/xcm/src/lib.rs +++ b/pallets/xcm/src/lib.rs @@ -111,7 +111,7 @@ impl DmpMessageHandler for UnlimitedDmpExecution { iter: impl Iterator)>, limit: Weight, ) -> Weight { - let mut used = 0; + let mut used = Weight::new(); for (_sent_at, data) in iter { let id = sp_io::hashing::twox_64(&data[..]); let msg = VersionedXcm::::decode_all_with_depth_limit( @@ -123,8 +123,8 @@ impl DmpMessageHandler for UnlimitedDmpExecution { Err(_) => Pallet::::deposit_event(Event::InvalidFormat(id)), Ok(Err(())) => Pallet::::deposit_event(Event::UnsupportedVersion(id)), Ok(Ok(x)) => { - let outcome = T::XcmExecutor::execute_xcm(Parent, x, limit); - used += outcome.weight_used(); + let outcome = T::XcmExecutor::execute_xcm(Parent, x, limit.ref_time()); + used += Weight::from_ref_time(outcome.weight_used()); Pallet::::deposit_event(Event::ExecutedDownward(id, outcome)); }, } @@ -144,7 +144,7 @@ impl DmpMessageHandler for LimitAndDropDmpExecution { iter: impl Iterator)>, limit: Weight, ) -> Weight { - let mut used = 0; + let mut used = Weight::new(); for (_sent_at, data) in iter { let id = sp_io::hashing::twox_64(&data[..]); let msg = VersionedXcm::::decode_all_with_depth_limit( @@ -157,8 +157,8 @@ impl DmpMessageHandler for LimitAndDropDmpExecution { Ok(Err(())) => Pallet::::deposit_event(Event::UnsupportedVersion(id)), Ok(Ok(x)) => { let weight_limit = limit.saturating_sub(used); - let outcome = T::XcmExecutor::execute_xcm(Parent, x, weight_limit); - used += outcome.weight_used(); + let outcome = T::XcmExecutor::execute_xcm(Parent, x, weight_limit.ref_time()); + used += Weight::from_ref_time(outcome.weight_used()); Pallet::::deposit_event(Event::ExecutedDownward(id, outcome)); }, } diff --git a/pallets/xcmp-queue/src/benchmarking.rs b/pallets/xcmp-queue/src/benchmarking.rs index 29245870a3a..5ac78bee763 100644 --- a/pallets/xcmp-queue/src/benchmarking.rs +++ b/pallets/xcmp-queue/src/benchmarking.rs @@ -22,7 +22,7 @@ use frame_system::RawOrigin; benchmarks! { set_config_with_u32 {}: update_resume_threshold(RawOrigin::Root, 100) - set_config_with_weight {}: update_weight_restrict_decay(RawOrigin::Root, 3_000_000 as Weight) + set_config_with_weight {}: update_weight_restrict_decay(RawOrigin::Root, Weight::from_ref_time(3_000_000)) } impl_benchmark_test_suite!(Pallet, crate::mock::new_test_ext(), crate::mock::Test); diff --git a/pallets/xcmp-queue/src/lib.rs b/pallets/xcmp-queue/src/lib.rs index 2b1bdac2b8b..85e1ea7cfea 100644 --- a/pallets/xcmp-queue/src/lib.rs +++ b/pallets/xcmp-queue/src/lib.rs @@ -130,7 +130,7 @@ pub mod pallet { /// /// Events: /// - `OverweightServiced`: On success. - #[pallet::weight((weight_limit.saturating_add(1_000_000), DispatchClass::Operational,))] + #[pallet::weight((weight_limit.saturating_add(Weight::from_ref_time(1_000_000)), DispatchClass::Operational,))] pub fn service_overweight( origin: OriginFor, index: OverweightIndex, @@ -149,7 +149,7 @@ pub mod pallet { .map_err(|_| Error::::WeightOverLimit)?; Overweight::::remove(index); Self::deposit_event(Event::OverweightServiced { index, used }); - Ok(Some(used.saturating_add(1_000_000)).into()) + Ok(Some(used.saturating_add(Weight::from_ref_time(1_000_000))).into()) } /// Suspends all XCM executions for the XCMP queue, regardless of the sender's origin. @@ -449,8 +449,8 @@ impl Default for QueueConfigData { suspend_threshold: 2, drop_threshold: 5, resume_threshold: 1, - threshold_weight: 100_000, - weight_restrict_decay: 2, + threshold_weight: Weight::from_ref_time(100_000), + weight_restrict_decay: Weight::from_ref_time(2), xcmp_max_individual_weight: 20 * WEIGHT_PER_MILLIS, } } @@ -605,15 +605,28 @@ impl Pallet { Ok(xcm) => { let location = (1, Parachain(sender.into())); - match T::XcmExecutor::execute_xcm(location, xcm, max_weight) { - Outcome::Error(e) => - (Err(e), Event::Fail { message_hash: Some(hash), error: e, weight: 0 }), - Outcome::Complete(w) => - (Ok(w), Event::Success { message_hash: Some(hash), weight: w }), + match T::XcmExecutor::execute_xcm(location, xcm, max_weight.ref_time()) { + Outcome::Error(e) => ( + Err(e), + Event::Fail { message_hash: Some(hash), error: e, weight: Weight::zero() }, + ), + Outcome::Complete(w) => ( + Ok(Weight::from_ref_time(w)), + Event::Success { + message_hash: Some(hash), + weight: Weight::from_ref_time(w), + }, + ), // As far as the caller is concerned, this was dispatched without error, so // we just report the weight used. - Outcome::Incomplete(w, e) => - (Ok(w), Event::Fail { message_hash: Some(hash), error: e, weight: w }), + Outcome::Incomplete(w, e) => ( + Ok(Weight::from_ref_time(w)), + Event::Fail { + message_hash: Some(hash), + error: e, + weight: Weight::from_ref_time(w), + }, + ), } }, Err(()) => @@ -632,7 +645,7 @@ impl Pallet { let data = >::get(sender, sent_at); let mut last_remaining_fragments; let mut remaining_fragments = &data[..]; - let mut weight_used = 0; + let mut weight_used = Weight::zero(); match format { XcmpMessageFormat::ConcatenatedVersionedXcm => { while !remaining_fragments.is_empty() { @@ -645,7 +658,7 @@ impl Pallet { match Self::handle_xcm_message(sender, sent_at, xcm, weight) { Ok(used) => weight_used = weight_used.saturating_add(used), Err(XcmError::WeightLimitReached(required)) - if required > max_individual_weight => + if required > max_individual_weight.ref_time() => { // overweight - add to overweight queue and continue with message // execution consuming the message. @@ -654,12 +667,16 @@ impl Pallet { .saturating_sub(remaining_fragments.len()); let overweight_xcm = last_remaining_fragments[..msg_len].to_vec(); let index = Self::stash_overweight(sender, sent_at, overweight_xcm); - let e = - Event::OverweightEnqueued { sender, sent_at, index, required }; + let e = Event::OverweightEnqueued { + sender, + sent_at, + index, + required: Weight::from_ref_time(required), + }; Self::deposit_event(e); }, Err(XcmError::WeightLimitReached(required)) - if required <= max_weight => + if required <= max_weight.ref_time() => { // That message didn't get processed this time because of being // too heavy. We leave it around for next time and bail. @@ -766,7 +783,7 @@ impl Pallet { let mut status = >::get(); // <- sorted. if status.is_empty() { - return 0 + return Weight::zero() } let QueueConfigData { @@ -778,8 +795,8 @@ impl Pallet { } = >::get(); let mut shuffled = Self::create_shuffle(status.len()); - let mut weight_used = 0; - let mut weight_available = 0; + let mut weight_used = Weight::new(); + let mut weight_available = Weight::new(); // We don't want the possibility of a chain sending a series of really heavy messages and // tying up the block's execution time from other chains. Therefore we execute any remaining @@ -813,7 +830,7 @@ impl Pallet { // on the first round to unlocking everything, then we do so. if shuffle_index < status.len() { weight_available += - (max_weight - weight_available) / (weight_restrict_decay + 1); + (max_weight - weight_available) / (weight_restrict_decay.ref_time() + 1); if weight_available + threshold_weight > max_weight { weight_available = max_weight; } @@ -824,7 +841,7 @@ impl Pallet { let weight_processed = if status[index].message_metadata.is_empty() { debug_assert!(false, "channel exists in status; there must be messages; qed"); - 0 + Weight::zero() } else { // Process up to one block's worth for now. let weight_remaining = weight_available.saturating_sub(weight_used); @@ -854,7 +871,7 @@ impl Pallet { // other channels a look in. If we've still not unlocked all weight, then we set them // up for processing a second time anyway. if !status[index].message_metadata.is_empty() && - (weight_processed > 0 || weight_available != max_weight) + (weight_processed > Weight::zero() || weight_available != max_weight) { if shuffle_index + 1 == shuffled.len() { // Only this queue left. Just run around this loop once more. diff --git a/pallets/xcmp-queue/src/migration.rs b/pallets/xcmp-queue/src/migration.rs index db5833e2df7..77da447e8d1 100644 --- a/pallets/xcmp-queue/src/migration.rs +++ b/pallets/xcmp-queue/src/migration.rs @@ -25,7 +25,7 @@ pub const STORAGE_VERSION: StorageVersion = StorageVersion::new(1); /// Migrates the pallet storage to the most recent version, checking and setting the /// `StorageVersion`. pub fn migrate_to_latest() -> Weight { - let mut weight = 0; + let mut weight = Weight::new(); if StorageVersion::get::>() == 0 { weight += migrate_to_v1::(); @@ -54,8 +54,8 @@ mod v0 { suspend_threshold: 2, drop_threshold: 5, resume_threshold: 1, - threshold_weight: 100_000, - weight_restrict_decay: 2, + threshold_weight: Weight::from_ref_time(100_000), + weight_restrict_decay: Weight::from_ref_time(2), } } } @@ -102,8 +102,8 @@ mod tests { suspend_threshold: 5, drop_threshold: 12, resume_threshold: 3, - threshold_weight: 333_333, - weight_restrict_decay: 1, + threshold_weight: Weight::from_ref_time(333_333), + weight_restrict_decay: Weight::one(), }; new_test_ext().execute_with(|| { @@ -122,7 +122,7 @@ mod tests { assert_eq!(v0.resume_threshold, v1.resume_threshold); assert_eq!(v0.threshold_weight, v1.threshold_weight); assert_eq!(v0.weight_restrict_decay, v1.weight_restrict_decay); - assert_eq!(v1.xcmp_max_individual_weight, 20_000_000_000); + assert_eq!(v1.xcmp_max_individual_weight, Weight::from_ref_time(20_000_000_000)); }); } } diff --git a/pallets/xcmp-queue/src/mock.rs b/pallets/xcmp-queue/src/mock.rs index 60aff179b82..9d945314e39 100644 --- a/pallets/xcmp-queue/src/mock.rs +++ b/pallets/xcmp-queue/src/mock.rs @@ -116,7 +116,7 @@ impl cumulus_pallet_parachain_system::Config for Test { parameter_types! { pub const RelayChain: MultiLocation = MultiLocation::parent(); pub Ancestry: MultiLocation = X1(Parachain(1u32.into())).into(); - pub UnitWeightCost: Weight = 1_000_000; + pub UnitWeightCost: u64 = 1_000_000; pub const MaxInstructions: u32 = 100; } diff --git a/pallets/xcmp-queue/src/tests.rs b/pallets/xcmp-queue/src/tests.rs index 62e674004ec..de0ab7e6126 100644 --- a/pallets/xcmp-queue/src/tests.rs +++ b/pallets/xcmp-queue/src/tests.rs @@ -26,7 +26,7 @@ fn one_message_does_not_panic() { let messages = vec![(Default::default(), 1u32.into(), message_format.as_slice())]; // This shouldn't cause a panic - XcmpQueue::handle_xcmp_messages(messages.into_iter(), Weight::max_value()); + XcmpQueue::handle_xcmp_messages(messages.into_iter(), Weight::MAX); }) } @@ -43,7 +43,12 @@ fn bad_message_is_handled() { InboundXcmpMessages::::insert(ParaId::from(1000), 1, bad_data); let format = XcmpMessageFormat::ConcatenatedEncodedBlob; // This should exit with an error. - XcmpQueue::process_xcmp_message(1000.into(), (1, format), 10_000_000_000, 10_000_000_000); + XcmpQueue::process_xcmp_message( + 1000.into(), + (1, format), + Weight::from_ref_time(10_000_000_000), + Weight::from_ref_time(10_000_000_000), + ); }); } @@ -61,7 +66,12 @@ fn handle_blob_message() { ]; InboundXcmpMessages::::insert(ParaId::from(1000), 1, bad_data); let format = XcmpMessageFormat::ConcatenatedEncodedBlob; - XcmpQueue::process_xcmp_message(1000.into(), (1, format), 10_000_000_000, 10_000_000_000); + XcmpQueue::process_xcmp_message( + 1000.into(), + (1, format), + Weight::from_ref_time(10_000_000_000), + Weight::from_ref_time(10_000_000_000), + ); }); } @@ -73,7 +83,12 @@ fn handle_invalid_data() { let data = Xcm::(vec![]).encode(); InboundXcmpMessages::::insert(ParaId::from(1000), 1, data); let format = XcmpMessageFormat::ConcatenatedVersionedXcm; - XcmpQueue::process_xcmp_message(1000.into(), (1, format), 10_000_000_000, 10_000_000_000); + XcmpQueue::process_xcmp_message( + 1000.into(), + (1, format), + Weight::from_ref_time(10_000_000_000), + Weight::from_ref_time(10_000_000_000), + ); }); } @@ -81,7 +96,7 @@ fn handle_invalid_data() { fn service_overweight_unknown() { new_test_ext().execute_with(|| { assert_noop!( - XcmpQueue::service_overweight(Origin::root(), 0, 1000), + XcmpQueue::service_overweight(Origin::root(), 0, Weight::from_ref_time(1000)), Error::::BadOverweightIndex, ); }); @@ -93,7 +108,10 @@ fn service_overweight_bad_xcm_format() { let bad_xcm = vec![255]; Overweight::::insert(0, (ParaId::from(1000), 0, bad_xcm)); - assert_noop!(XcmpQueue::service_overweight(Origin::root(), 0, 1000), Error::::BadXcm); + assert_noop!( + XcmpQueue::service_overweight(Origin::root(), 0, Weight::from_ref_time(1000)), + Error::::BadXcm + ); }); } @@ -108,7 +126,7 @@ fn suspend_xcm_execution_works() { let messages = vec![(ParaId::from(999), 1u32.into(), message_format.as_slice())]; // This should have executed the incoming XCM, because it came from a system parachain - XcmpQueue::handle_xcmp_messages(messages.into_iter(), Weight::max_value()); + XcmpQueue::handle_xcmp_messages(messages.into_iter(), Weight::MAX); let queued_xcm = InboundXcmpMessages::::get(ParaId::from(999), 1u32); assert!(queued_xcm.is_empty()); @@ -116,7 +134,7 @@ fn suspend_xcm_execution_works() { let messages = vec![(ParaId::from(2000), 1u32.into(), message_format.as_slice())]; // This shouldn't have executed the incoming XCM - XcmpQueue::handle_xcmp_messages(messages.into_iter(), Weight::max_value()); + XcmpQueue::handle_xcmp_messages(messages.into_iter(), Weight::MAX); let queued_xcm = InboundXcmpMessages::::get(ParaId::from(2000), 1u32); assert_eq!(queued_xcm, xcm); @@ -166,12 +184,21 @@ fn update_resume_threshold_works() { fn update_threshold_weight_works() { new_test_ext().execute_with(|| { let data: QueueConfigData = >::get(); - assert_eq!(data.threshold_weight, 100_000); - assert_ok!(XcmpQueue::update_threshold_weight(Origin::root(), 10_000)); - assert_noop!(XcmpQueue::update_threshold_weight(Origin::signed(5), 10_000_000), BadOrigin); + assert_eq!(data.threshold_weight, Weight::from_ref_time(100_000)); + assert_ok!(XcmpQueue::update_threshold_weight( + Origin::root(), + Weight::from_ref_time(10_000) + )); + assert_noop!( + XcmpQueue::update_threshold_weight( + Origin::signed(5), + Weight::from_ref_time(10_000_000) + ), + BadOrigin + ); let data: QueueConfigData = >::get(); - assert_eq!(data.threshold_weight, 10_000); + assert_eq!(data.threshold_weight, Weight::from_ref_time(10_000)); }); } @@ -179,12 +206,18 @@ fn update_threshold_weight_works() { fn update_weight_restrict_decay_works() { new_test_ext().execute_with(|| { let data: QueueConfigData = >::get(); - assert_eq!(data.weight_restrict_decay, 2); - assert_ok!(XcmpQueue::update_weight_restrict_decay(Origin::root(), 5)); - assert_noop!(XcmpQueue::update_weight_restrict_decay(Origin::signed(6), 4), BadOrigin); + assert_eq!(data.weight_restrict_decay, Weight::from_ref_time(2)); + assert_ok!(XcmpQueue::update_weight_restrict_decay( + Origin::root(), + Weight::from_ref_time(5) + )); + assert_noop!( + XcmpQueue::update_weight_restrict_decay(Origin::signed(6), Weight::from_ref_time(4)), + BadOrigin + ); let data: QueueConfigData = >::get(); - assert_eq!(data.weight_restrict_decay, 5); + assert_eq!(data.weight_restrict_decay, Weight::from_ref_time(5)); }); } diff --git a/pallets/xcmp-queue/src/weights.rs b/pallets/xcmp-queue/src/weights.rs index 559ff644e8a..0124804a80d 100644 --- a/pallets/xcmp-queue/src/weights.rs +++ b/pallets/xcmp-queue/src/weights.rs @@ -3,7 +3,7 @@ use frame_support::{ traits::Get, - weights::{constants::RocksDbWeight, Weight}, + weights::{constants::RocksDbWeight, RefTimeWeight, Weight}, }; use sp_std::marker::PhantomData; @@ -18,31 +18,31 @@ pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { // Storage: XcmpQueue QueueConfig (r:1 w:1) fn set_config_with_u32() -> Weight { - (2_717_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(2_717_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: XcmpQueue QueueConfig (r:1 w:1) fn set_config_with_weight() -> Weight { - (2_717_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(2_717_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } } impl WeightInfo for () { // Storage: XcmpQueue QueueConfig (r:1 w:1) fn set_config_with_u32() -> Weight { - (2_717_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(2_717_000 as RefTimeWeight) + .saturating_add(RocksDbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } // Storage: XcmpQueue QueueConfig (r:1 w:1) fn set_config_with_weight() -> Weight { - (2_717_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(2_717_000 as RefTimeWeight) + .saturating_add(RocksDbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } } diff --git a/parachain-template/pallets/template/src/lib.rs b/parachain-template/pallets/template/src/lib.rs index 0afd7c6d72e..36a07d2c5e7 100644 --- a/parachain-template/pallets/template/src/lib.rs +++ b/parachain-template/pallets/template/src/lib.rs @@ -67,7 +67,7 @@ pub mod pallet { impl Pallet { /// An example dispatchable that takes a singles value as a parameter, writes the value to /// storage and emits an event. This function must be dispatched by a signed extrinsic. - #[pallet::weight(10_000 + T::DbWeight::get().writes(1))] + #[pallet::weight(Weight::from_ref_time(10_000) + T::DbWeight::get().writes(1))] pub fn do_something(origin: OriginFor, something: u32) -> DispatchResultWithPostInfo { // Check that the extrinsic was signed and get the signer. // This function will return an error if the extrinsic is not signed. @@ -84,7 +84,7 @@ pub mod pallet { } /// An example dispatchable that may throw a custom error. - #[pallet::weight(10_000 + T::DbWeight::get().reads_writes(1,1))] + #[pallet::weight(Weight::from_ref_time(10_000) + T::DbWeight::get().reads_writes(1,1))] pub fn cause_error(origin: OriginFor) -> DispatchResultWithPostInfo { let _who = ensure_signed(origin)?; diff --git a/parachain-template/runtime/src/lib.rs b/parachain-template/runtime/src/lib.rs index 56bfe43a160..dee56fea42c 100644 --- a/parachain-template/runtime/src/lib.rs +++ b/parachain-template/runtime/src/lib.rs @@ -135,7 +135,7 @@ impl WeightToFeePolynomial for WeightToFee { // in Rococo, extrinsic base weight (smallest non-zero weight) is mapped to 1 MILLIUNIT: // in our template, we map to 1/10 of that, or 1/10 MILLIUNIT let p = MILLIUNIT / 10; - let q = 100 * Balance::from(ExtrinsicBaseWeight::get()); + let q = 100 * Balance::from(ExtrinsicBaseWeight::get().ref_time()); smallvec![WeightToFeeCoefficient { degree: 1, negative: false, @@ -214,7 +214,7 @@ const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(5); const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75); /// We allow for 0.5 of a second of compute with a 12 second average block time. -const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND / 2; +const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND.scalar_div(2); /// The version information used to identify this runtime when compiled natively. #[cfg(feature = "std")] @@ -363,8 +363,8 @@ impl pallet_transaction_payment::Config for Runtime { } parameter_types! { - pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT / 4; - pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT / 4; + pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.scalar_div(4); + pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.scalar_div(4); } impl cumulus_pallet_parachain_system::Config for Runtime { diff --git a/parachain-template/runtime/src/weights/block_weights.rs b/parachain-template/runtime/src/weights/block_weights.rs index 4db90f0c020..c171a1fdd71 100644 --- a/parachain-template/runtime/src/weights/block_weights.rs +++ b/parachain-template/runtime/src/weights/block_weights.rs @@ -23,7 +23,7 @@ pub mod constants { parameter_types! { /// Importing a block with 0 Extrinsics. - pub const BlockExecutionWeight: Weight = 5_000_000 * constants::WEIGHT_PER_NANOS; + pub const BlockExecutionWeight: Weight = constants::WEIGHT_PER_NANOS.scalar_saturating_mul(5_000_000); } #[cfg(test)] diff --git a/parachain-template/runtime/src/weights/extrinsic_weights.rs b/parachain-template/runtime/src/weights/extrinsic_weights.rs index 158ba99c6a4..6e162888356 100644 --- a/parachain-template/runtime/src/weights/extrinsic_weights.rs +++ b/parachain-template/runtime/src/weights/extrinsic_weights.rs @@ -23,7 +23,7 @@ pub mod constants { parameter_types! { /// Executing a NO-OP `System::remarks` Extrinsic. - pub const ExtrinsicBaseWeight: Weight = 125_000 * constants::WEIGHT_PER_NANOS; + pub const ExtrinsicBaseWeight: Weight = constants::WEIGHT_PER_NANOS.scalar_saturating_mul(125_000); } #[cfg(test)] diff --git a/parachain-template/runtime/src/weights/paritydb_weights.rs b/parachain-template/runtime/src/weights/paritydb_weights.rs index 843823c1bf3..8083ccb4001 100644 --- a/parachain-template/runtime/src/weights/paritydb_weights.rs +++ b/parachain-template/runtime/src/weights/paritydb_weights.rs @@ -25,8 +25,8 @@ pub mod constants { /// `ParityDB` can be enabled with a feature flag, but is still experimental. These weights /// are available for brave runtime engineers who may want to try this out as default. pub const ParityDbWeight: RuntimeDbWeight = RuntimeDbWeight { - read: 8_000 * constants::WEIGHT_PER_NANOS, - write: 50_000 * constants::WEIGHT_PER_NANOS, + read: 8_000 * constants::WEIGHT_PER_NANOS.ref_time(), + write: 50_000 * constants::WEIGHT_PER_NANOS.ref_time(), }; } diff --git a/parachain-template/runtime/src/weights/rocksdb_weights.rs b/parachain-template/runtime/src/weights/rocksdb_weights.rs index 05e06b0eabe..1db87f143f3 100644 --- a/parachain-template/runtime/src/weights/rocksdb_weights.rs +++ b/parachain-template/runtime/src/weights/rocksdb_weights.rs @@ -25,8 +25,8 @@ pub mod constants { /// By default, Substrate uses `RocksDB`, so this will be the weight used throughout /// the runtime. pub const RocksDbWeight: RuntimeDbWeight = RuntimeDbWeight { - read: 25_000 * constants::WEIGHT_PER_NANOS, - write: 100_000 * constants::WEIGHT_PER_NANOS, + read: 25_000 * constants::WEIGHT_PER_NANOS.ref_time(), + write: 100_000 * constants::WEIGHT_PER_NANOS.ref_time(), }; } diff --git a/parachain-template/runtime/src/xcm_config.rs b/parachain-template/runtime/src/xcm_config.rs index 2ec84d18871..f01b7166ea2 100644 --- a/parachain-template/runtime/src/xcm_config.rs +++ b/parachain-template/runtime/src/xcm_config.rs @@ -6,12 +6,11 @@ use core::marker::PhantomData; use frame_support::{ log, match_types, parameter_types, traits::{Everything, Nothing}, - weights::Weight, }; use pallet_xcm::XcmPassthrough; use polkadot_parachain::primitives::Sibling; use polkadot_runtime_common::impls::ToAuthor; -use xcm::latest::prelude::*; +use xcm::latest::{prelude::*, Weight as XCMWeight}; use xcm_builder::{ AccountId32Aliases, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, CurrencyAdapter, EnsureXcmOrigin, FixedWeightBounds, IsConcrete, LocationInverter, NativeAsset, ParentIsPreset, @@ -77,7 +76,7 @@ pub type XcmOriginToTransactDispatchOrigin = ( parameter_types! { // One XCM operation is 1_000_000_000 weight - almost certainly a conservative estimate. - pub UnitWeightCost: Weight = 1_000_000_000; + pub UnitWeightCost: u64 = 1_000_000_000; pub const MaxInstructions: u32 = 100; } @@ -104,8 +103,8 @@ where fn should_execute( origin: &MultiLocation, message: &mut Xcm, - max_weight: Weight, - weight_credit: &mut Weight, + max_weight: XCMWeight, + weight_credit: &mut XCMWeight, ) -> Result<(), ()> { Deny::should_execute(origin, message, max_weight, weight_credit)?; Allow::should_execute(origin, message, max_weight, weight_credit) @@ -118,8 +117,8 @@ impl ShouldExecute for DenyReserveTransferToRelayChain { fn should_execute( origin: &MultiLocation, message: &mut Xcm, - _max_weight: Weight, - _weight_credit: &mut Weight, + _max_weight: XCMWeight, + _weight_credit: &mut XCMWeight, ) -> Result<(), ()> { if message.0.iter().any(|inst| { matches!( diff --git a/parachains/common/src/lib.rs b/parachains/common/src/lib.rs index fcec189a210..61a511fb965 100644 --- a/parachains/common/src/lib.rs +++ b/parachains/common/src/lib.rs @@ -92,7 +92,7 @@ mod constants { pub const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75); /// We allow for 0.5 seconds of compute with a 6 second average block time. - pub const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND / 2; + pub const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND.scalar_div(2); } /// Opaque types. These are used by the CLI to instantiate machinery that don't need to know diff --git a/parachains/common/src/xcm_config.rs b/parachains/common/src/xcm_config.rs index aba8ffa29dd..7f796666d81 100644 --- a/parachains/common/src/xcm_config.rs +++ b/parachains/common/src/xcm_config.rs @@ -6,7 +6,7 @@ use frame_support::{ weights::{Weight, WeightToFee, WeightToFeePolynomial}, }; use sp_runtime::traits::Get; -use xcm::latest::prelude::*; +use xcm::latest::{prelude::*, Weight as XCMWeight}; use xcm_executor::traits::{FilterAssetLocation, ShouldExecute}; //TODO: move DenyThenTry to polkadot's xcm module. @@ -25,8 +25,8 @@ where fn should_execute( origin: &MultiLocation, message: &mut Xcm, - max_weight: Weight, - weight_credit: &mut Weight, + max_weight: XCMWeight, + weight_credit: &mut XCMWeight, ) -> Result<(), ()> { Deny::should_execute(origin, message, max_weight, weight_credit)?; Allow::should_execute(origin, message, max_weight, weight_credit) @@ -39,8 +39,8 @@ impl ShouldExecute for DenyReserveTransferToRelayChain { fn should_execute( origin: &MultiLocation, message: &mut Xcm, - _max_weight: Weight, - _weight_credit: &mut Weight, + _max_weight: XCMWeight, + _weight_credit: &mut XCMWeight, ) -> Result<(), ()> { if message.0.iter().any(|inst| { matches!( diff --git a/parachains/runtimes/assets/statemine/src/constants.rs b/parachains/runtimes/assets/statemine/src/constants.rs index fabc09d017a..6dccf0089ca 100644 --- a/parachains/runtimes/assets/statemine/src/constants.rs +++ b/parachains/runtimes/assets/statemine/src/constants.rs @@ -61,7 +61,7 @@ pub mod fee { // in Kusama, extrinsic base weight (smallest non-zero weight) is mapped to 1/10 CENT: // in Statemine, we map to 1/10 of that, or 1/100 CENT let p = super::currency::CENTS; - let q = 100 * Balance::from(ExtrinsicBaseWeight::get()); + let q = 100 * Balance::from(ExtrinsicBaseWeight::get().ref_time()); smallvec![WeightToFeeCoefficient { degree: 1, negative: false, diff --git a/parachains/runtimes/assets/statemine/src/lib.rs b/parachains/runtimes/assets/statemine/src/lib.rs index 9bbfabea2fa..ebb7bd00d5d 100644 --- a/parachains/runtimes/assets/statemine/src/lib.rs +++ b/parachains/runtimes/assets/statemine/src/lib.rs @@ -407,8 +407,8 @@ impl pallet_proxy::Config for Runtime { } parameter_types! { - pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT / 4; - pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT / 4; + pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.scalar_div(4); + pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.scalar_div(4); } impl cumulus_pallet_parachain_system::Config for Runtime { diff --git a/parachains/runtimes/assets/statemine/src/weights/block_weights.rs b/parachains/runtimes/assets/statemine/src/weights/block_weights.rs index 4db90f0c020..c171a1fdd71 100644 --- a/parachains/runtimes/assets/statemine/src/weights/block_weights.rs +++ b/parachains/runtimes/assets/statemine/src/weights/block_weights.rs @@ -23,7 +23,7 @@ pub mod constants { parameter_types! { /// Importing a block with 0 Extrinsics. - pub const BlockExecutionWeight: Weight = 5_000_000 * constants::WEIGHT_PER_NANOS; + pub const BlockExecutionWeight: Weight = constants::WEIGHT_PER_NANOS.scalar_saturating_mul(5_000_000); } #[cfg(test)] diff --git a/parachains/runtimes/assets/statemine/src/weights/cumulus_pallet_xcmp_queue.rs b/parachains/runtimes/assets/statemine/src/weights/cumulus_pallet_xcmp_queue.rs index fe16b470b1e..862bbcf3c1c 100644 --- a/parachains/runtimes/assets/statemine/src/weights/cumulus_pallet_xcmp_queue.rs +++ b/parachains/runtimes/assets/statemine/src/weights/cumulus_pallet_xcmp_queue.rs @@ -40,7 +40,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::Weight}; +use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}}; use sp_std::marker::PhantomData; /// Weight functions for `cumulus_pallet_xcmp_queue`. @@ -48,14 +48,14 @@ pub struct WeightInfo(PhantomData); impl cumulus_pallet_xcmp_queue::WeightInfo for WeightInfo { // Storage: XcmpQueue QueueConfig (r:1 w:1) fn set_config_with_u32() -> Weight { - (5_634_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(5_634_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: XcmpQueue QueueConfig (r:1 w:1) fn set_config_with_weight() -> Weight { - (5_559_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(5_559_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } } diff --git a/parachains/runtimes/assets/statemine/src/weights/extrinsic_weights.rs b/parachains/runtimes/assets/statemine/src/weights/extrinsic_weights.rs index 158ba99c6a4..6e162888356 100644 --- a/parachains/runtimes/assets/statemine/src/weights/extrinsic_weights.rs +++ b/parachains/runtimes/assets/statemine/src/weights/extrinsic_weights.rs @@ -23,7 +23,7 @@ pub mod constants { parameter_types! { /// Executing a NO-OP `System::remarks` Extrinsic. - pub const ExtrinsicBaseWeight: Weight = 125_000 * constants::WEIGHT_PER_NANOS; + pub const ExtrinsicBaseWeight: Weight = constants::WEIGHT_PER_NANOS.scalar_saturating_mul(125_000); } #[cfg(test)] diff --git a/parachains/runtimes/assets/statemine/src/weights/frame_system.rs b/parachains/runtimes/assets/statemine/src/weights/frame_system.rs index 58e679ffb89..809da49b4ae 100644 --- a/parachains/runtimes/assets/statemine/src/weights/frame_system.rs +++ b/parachains/runtimes/assets/statemine/src/weights/frame_system.rs @@ -40,7 +40,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::Weight}; +use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}}; use sp_std::marker::PhantomData; /// Weight functions for `frame_system`. @@ -48,43 +48,43 @@ pub struct WeightInfo(PhantomData); impl frame_system::WeightInfo for WeightInfo { /// The range of component `b` is `[0, 3932160]`. fn remark(_b: u32, ) -> Weight { - (0 as Weight) + Weight::from_ref_time(0 as RefTimeWeight) } /// The range of component `b` is `[0, 3932160]`. fn remark_with_event(b: u32, ) -> Weight { - (0 as Weight) + Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) + .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(b as RefTimeWeight)) } // Storage: System Digest (r:1 w:1) // Storage: unknown [0x3a686561707061676573] (r:0 w:1) fn set_heap_pages() -> Weight { - (5_461_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(5_461_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Skipped Metadata (r:0 w:0) /// The range of component `i` is `[1, 1000]`. fn set_storage(i: u32, ) -> Weight { - (0 as Weight) + Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add((622_000 as Weight).saturating_mul(i as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) + .saturating_add(Weight::from_ref_time(622_000 as RefTimeWeight).scalar_saturating_mul(i as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(i as RefTimeWeight))) } // Storage: Skipped Metadata (r:0 w:0) /// The range of component `i` is `[1, 1000]`. fn kill_storage(i: u32, ) -> Weight { - (351_000 as Weight) + Weight::from_ref_time(351_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add((513_000 as Weight).saturating_mul(i as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) + .saturating_add(Weight::from_ref_time(513_000 as RefTimeWeight).scalar_saturating_mul(i as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(i as RefTimeWeight))) } // Storage: Skipped Metadata (r:0 w:0) /// The range of component `p` is `[1, 1000]`. fn kill_prefix(p: u32, ) -> Weight { - (0 as Weight) + Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add((1_054_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(p as Weight))) + .saturating_add(Weight::from_ref_time(1_054_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(p as RefTimeWeight))) } } diff --git a/parachains/runtimes/assets/statemine/src/weights/pallet_assets.rs b/parachains/runtimes/assets/statemine/src/weights/pallet_assets.rs index 5e6847175de..fa7cc632645 100644 --- a/parachains/runtimes/assets/statemine/src/weights/pallet_assets.rs +++ b/parachains/runtimes/assets/statemine/src/weights/pallet_assets.rs @@ -40,7 +40,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::Weight}; +use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_assets`. @@ -48,15 +48,15 @@ pub struct WeightInfo(PhantomData); impl pallet_assets::WeightInfo for WeightInfo { // Storage: Assets Asset (r:1 w:1) fn create() -> Weight { - (26_670_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(26_670_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Assets Asset (r:1 w:1) fn force_create() -> Weight { - (15_063_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(15_063_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:5002 w:5001) @@ -67,165 +67,165 @@ impl pallet_assets::WeightInfo for WeightInfo { /// The range of component `s` is `[0, 5000]`. /// The range of component `a` is `[0, 500]`. fn destroy(c: u32, s: u32, a: u32, ) -> Weight { - (0 as Weight) + Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 46_000 - .saturating_add((16_382_000 as Weight).saturating_mul(c as Weight)) + .saturating_add(Weight::from_ref_time(16_382_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight)) // Standard Error: 46_000 - .saturating_add((19_187_000 as Weight).saturating_mul(s as Weight)) + .saturating_add(Weight::from_ref_time(19_187_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) // Standard Error: 465_000 - .saturating_add((16_818_000 as Weight).saturating_mul(a as Weight)) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(c as Weight))) - .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(s as Weight))) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(a as Weight))) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - .saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(c as Weight))) - .saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(s as Weight))) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(a as Weight))) + .saturating_add(Weight::from_ref_time(16_818_000 as RefTimeWeight).scalar_saturating_mul(a as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(5 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads((2 as RefTimeWeight).saturating_mul(c as RefTimeWeight))) + .saturating_add(T::DbWeight::get().reads((2 as RefTimeWeight).saturating_mul(s as RefTimeWeight))) + .saturating_add(T::DbWeight::get().reads((1 as RefTimeWeight).saturating_mul(a as RefTimeWeight))) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes((2 as RefTimeWeight).saturating_mul(c as RefTimeWeight))) + .saturating_add(T::DbWeight::get().writes((2 as RefTimeWeight).saturating_mul(s as RefTimeWeight))) + .saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(a as RefTimeWeight))) } // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:1 w:1) fn mint() -> Weight { - (29_655_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(29_655_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:1 w:1) fn burn() -> Weight { - (33_648_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(33_648_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:2 w:2) // Storage: System Account (r:1 w:1) fn transfer() -> Weight { - (47_414_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(47_414_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight)) } // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:2 w:2) // Storage: System Account (r:1 w:1) fn transfer_keep_alive() -> Weight { - (39_871_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(39_871_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight)) } // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:2 w:2) // Storage: System Account (r:1 w:1) fn force_transfer() -> Weight { - (47_454_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(47_454_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight)) } // Storage: Assets Asset (r:1 w:0) // Storage: Assets Account (r:1 w:1) fn freeze() -> Weight { - (20_827_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(20_827_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Assets Asset (r:1 w:0) // Storage: Assets Account (r:1 w:1) fn thaw() -> Weight { - (21_249_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(21_249_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Assets Asset (r:1 w:1) fn freeze_asset() -> Weight { - (17_775_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(17_775_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Assets Asset (r:1 w:1) fn thaw_asset() -> Weight { - (17_917_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(17_917_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Assets Asset (r:1 w:1) // Storage: Assets Metadata (r:1 w:0) fn transfer_ownership() -> Weight { - (18_724_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(18_724_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Assets Asset (r:1 w:1) fn set_team() -> Weight { - (17_448_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(17_448_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Assets Asset (r:1 w:0) // Storage: Assets Metadata (r:1 w:1) /// The range of component `n` is `[0, 50]`. /// The range of component `s` is `[0, 50]`. fn set_metadata(_n: u32, _s: u32, ) -> Weight { - (31_859_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(31_859_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Assets Asset (r:1 w:0) // Storage: Assets Metadata (r:1 w:1) fn clear_metadata() -> Weight { - (31_293_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(31_293_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Assets Asset (r:1 w:0) // Storage: Assets Metadata (r:1 w:1) /// The range of component `n` is `[0, 50]`. /// The range of component `s` is `[0, 50]`. fn force_set_metadata(_n: u32, _s: u32, ) -> Weight { - (19_595_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(19_595_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Assets Asset (r:1 w:0) // Storage: Assets Metadata (r:1 w:1) fn force_clear_metadata() -> Weight { - (31_366_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(31_366_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Assets Asset (r:1 w:1) fn force_asset_status() -> Weight { - (16_884_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(16_884_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Assets Asset (r:1 w:1) // Storage: Assets Approvals (r:1 w:1) fn approve_transfer() -> Weight { - (34_730_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(34_730_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Assets Approvals (r:1 w:1) // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:2 w:2) // Storage: System Account (r:1 w:1) fn transfer_approved() -> Weight { - (59_797_000 as Weight) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(59_797_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(5 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(5 as RefTimeWeight)) } // Storage: Assets Asset (r:1 w:1) // Storage: Assets Approvals (r:1 w:1) fn cancel_approval() -> Weight { - (35_178_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(35_178_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Assets Asset (r:1 w:1) // Storage: Assets Approvals (r:1 w:1) fn force_cancel_approval() -> Weight { - (36_840_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(36_840_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } } diff --git a/parachains/runtimes/assets/statemine/src/weights/pallet_balances.rs b/parachains/runtimes/assets/statemine/src/weights/pallet_balances.rs index 346712c553d..0acb50fc169 100644 --- a/parachains/runtimes/assets/statemine/src/weights/pallet_balances.rs +++ b/parachains/runtimes/assets/statemine/src/weights/pallet_balances.rs @@ -40,7 +40,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::Weight}; +use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_balances`. @@ -48,44 +48,44 @@ pub struct WeightInfo(PhantomData); impl pallet_balances::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) fn transfer() -> Weight { - (41_804_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(41_804_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: System Account (r:1 w:1) fn transfer_keep_alive() -> Weight { - (31_899_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(31_899_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: System Account (r:1 w:1) fn set_balance_creating() -> Weight { - (20_638_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(20_638_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: System Account (r:1 w:1) fn set_balance_killing() -> Weight { - (24_081_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(24_081_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: System Account (r:2 w:2) fn force_transfer() -> Weight { - (41_357_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(41_357_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: System Account (r:1 w:1) fn transfer_all() -> Weight { - (37_382_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(37_382_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: System Account (r:1 w:1) fn force_unreserve() -> Weight { - (18_476_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(18_476_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } } diff --git a/parachains/runtimes/assets/statemine/src/weights/pallet_collator_selection.rs b/parachains/runtimes/assets/statemine/src/weights/pallet_collator_selection.rs index d7aaeceeefa..aa51ad7e366 100644 --- a/parachains/runtimes/assets/statemine/src/weights/pallet_collator_selection.rs +++ b/parachains/runtimes/assets/statemine/src/weights/pallet_collator_selection.rs @@ -40,7 +40,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::Weight}; +use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_collator_selection`. @@ -50,21 +50,21 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Storage: CollatorSelection Invulnerables (r:0 w:1) /// The range of component `b` is `[1, 100]`. fn set_invulnerables(b: u32, ) -> Weight { - (8_196_000 as Weight) + Weight::from_ref_time(8_196_000 as RefTimeWeight) // Standard Error: 3_000 - .saturating_add((3_354_000 as Weight).saturating_mul(b as Weight)) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(b as Weight))) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(3_354_000 as RefTimeWeight).scalar_saturating_mul(b as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads((1 as RefTimeWeight).saturating_mul(b as RefTimeWeight))) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: CollatorSelection DesiredCandidates (r:0 w:1) fn set_desired_candidates() -> Weight { - (9_141_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(9_141_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: CollatorSelection CandidacyBond (r:0 w:1) fn set_candidacy_bond() -> Weight { - (9_554_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(9_554_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: CollatorSelection Candidates (r:1 w:1) // Storage: CollatorSelection DesiredCandidates (r:1 w:0) @@ -74,29 +74,29 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Storage: CollatorSelection LastAuthoredBlock (r:0 w:1) /// The range of component `c` is `[1, 1000]`. fn register_as_candidate(c: u32, ) -> Weight { - (55_660_000 as Weight) + Weight::from_ref_time(55_660_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add((103_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add(Weight::from_ref_time(103_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(5 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: CollatorSelection Candidates (r:1 w:1) // Storage: CollatorSelection LastAuthoredBlock (r:0 w:1) /// The range of component `c` is `[6, 1000]`. fn leave_intent(c: u32, ) -> Weight { - (56_380_000 as Weight) + Weight::from_ref_time(56_380_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add((113_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add(Weight::from_ref_time(113_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: System Account (r:2 w:2) // Storage: System BlockWeight (r:1 w:1) // Storage: CollatorSelection LastAuthoredBlock (r:0 w:1) fn note_author() -> Weight { - (31_852_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(31_852_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight)) } // Storage: CollatorSelection Candidates (r:1 w:1) // Storage: CollatorSelection LastAuthoredBlock (r:1000 w:1) @@ -106,13 +106,13 @@ impl pallet_collator_selection::WeightInfo for WeightIn /// The range of component `r` is `[1, 1000]`. /// The range of component `c` is `[1, 1000]`. fn new_session(r: u32, c: u32, ) -> Weight { - (0 as Weight) + Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 2_076_000 - .saturating_add((10_780_000 as Weight).saturating_mul(r as Weight)) + .saturating_add(Weight::from_ref_time(10_780_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) // Standard Error: 2_076_000 - .saturating_add((55_238_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(c as Weight))) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(r as Weight))) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(c as Weight))) + .saturating_add(Weight::from_ref_time(55_238_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads((2 as RefTimeWeight).saturating_mul(c as RefTimeWeight))) + .saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(r as RefTimeWeight))) + .saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(c as RefTimeWeight))) } } diff --git a/parachains/runtimes/assets/statemine/src/weights/pallet_multisig.rs b/parachains/runtimes/assets/statemine/src/weights/pallet_multisig.rs index 9a6bd8b4b35..b37819dfdcb 100644 --- a/parachains/runtimes/assets/statemine/src/weights/pallet_multisig.rs +++ b/parachains/runtimes/assets/statemine/src/weights/pallet_multisig.rs @@ -40,7 +40,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::Weight}; +use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_multisig`. @@ -48,22 +48,22 @@ pub struct WeightInfo(PhantomData); impl pallet_multisig::WeightInfo for WeightInfo { /// The range of component `z` is `[0, 10000]`. fn as_multi_threshold_1(z: u32, ) -> Weight { - (18_001_000 as Weight) + Weight::from_ref_time(18_001_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add((1_000 as Weight).saturating_mul(z as Weight)) + .saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).scalar_saturating_mul(z as RefTimeWeight)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) /// The range of component `s` is `[2, 100]`. /// The range of component `z` is `[0, 10000]`. fn as_multi_create(s: u32, z: u32, ) -> Weight { - (35_223_000 as Weight) + Weight::from_ref_time(35_223_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add((118_000 as Weight).saturating_mul(s as Weight)) + .saturating_add(Weight::from_ref_time(118_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) // Standard Error: 0 - .saturating_add((1_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).scalar_saturating_mul(z as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:1) @@ -71,38 +71,38 @@ impl pallet_multisig::WeightInfo for WeightInfo { /// The range of component `s` is `[2, 100]`. /// The range of component `z` is `[0, 10000]`. fn as_multi_create_store(s: u32, z: u32, ) -> Weight { - (39_275_000 as Weight) + Weight::from_ref_time(39_275_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add((92_000 as Weight).saturating_mul(s as Weight)) + .saturating_add(Weight::from_ref_time(92_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(z as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Multisig Multisigs (r:1 w:1) /// The range of component `s` is `[3, 100]`. /// The range of component `z` is `[0, 10000]`. fn as_multi_approve(s: u32, z: u32, ) -> Weight { - (24_703_000 as Weight) + Weight::from_ref_time(24_703_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add((96_000 as Weight).saturating_mul(s as Weight)) + .saturating_add(Weight::from_ref_time(96_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) // Standard Error: 0 - .saturating_add((1_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).scalar_saturating_mul(z as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:1) /// The range of component `s` is `[3, 100]`. /// The range of component `z` is `[0, 10000]`. fn as_multi_approve_store(s: u32, z: u32, ) -> Weight { - (38_375_000 as Weight) + Weight::from_ref_time(38_375_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add((100_000 as Weight).saturating_mul(s as Weight)) + .saturating_add(Weight::from_ref_time(100_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(z as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:1) @@ -110,53 +110,53 @@ impl pallet_multisig::WeightInfo for WeightInfo { /// The range of component `s` is `[2, 100]`. /// The range of component `z` is `[0, 10000]`. fn as_multi_complete(s: u32, z: u32, ) -> Weight { - (46_964_000 as Weight) + Weight::from_ref_time(46_964_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add((143_000 as Weight).saturating_mul(s as Weight)) + .saturating_add(Weight::from_ref_time(143_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) // Standard Error: 0 - .saturating_add((3_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + .saturating_add(Weight::from_ref_time(3_000 as RefTimeWeight).scalar_saturating_mul(z as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) /// The range of component `s` is `[2, 100]`. fn approve_as_multi_create(s: u32, ) -> Weight { - (34_450_000 as Weight) + Weight::from_ref_time(34_450_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add((117_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(117_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:0) /// The range of component `s` is `[2, 100]`. fn approve_as_multi_approve(s: u32, ) -> Weight { - (22_051_000 as Weight) + Weight::from_ref_time(22_051_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add((117_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(117_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:1) // Storage: System Account (r:1 w:1) /// The range of component `s` is `[2, 100]`. fn approve_as_multi_complete(s: u32, ) -> Weight { - (69_763_000 as Weight) + Weight::from_ref_time(69_763_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add((162_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + .saturating_add(Weight::from_ref_time(162_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:1) /// The range of component `s` is `[2, 100]`. fn cancel_as_multi(s: u32, ) -> Weight { - (53_182_000 as Weight) + Weight::from_ref_time(53_182_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add((129_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add(Weight::from_ref_time(129_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } } diff --git a/parachains/runtimes/assets/statemine/src/weights/pallet_proxy.rs b/parachains/runtimes/assets/statemine/src/weights/pallet_proxy.rs index d764987b4b3..80b0e84de6f 100644 --- a/parachains/runtimes/assets/statemine/src/weights/pallet_proxy.rs +++ b/parachains/runtimes/assets/statemine/src/weights/pallet_proxy.rs @@ -40,7 +40,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::Weight}; +use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_proxy`. @@ -49,10 +49,10 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Storage: Proxy Proxies (r:1 w:0) /// The range of component `p` is `[1, 31]`. fn proxy(p: u32, ) -> Weight { - (18_075_000 as Weight) + Weight::from_ref_time(18_075_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add((92_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) + .saturating_add(Weight::from_ref_time(92_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) } // Storage: Proxy Proxies (r:1 w:0) // Storage: Proxy Announcements (r:1 w:1) @@ -60,39 +60,39 @@ impl pallet_proxy::WeightInfo for WeightInfo { /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. fn proxy_announced(a: u32, p: u32, ) -> Weight { - (35_722_000 as Weight) + Weight::from_ref_time(35_722_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add((180_000 as Weight).saturating_mul(a as Weight)) + .saturating_add(Weight::from_ref_time(180_000 as RefTimeWeight).scalar_saturating_mul(a as RefTimeWeight)) // Standard Error: 2_000 - .saturating_add((85_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add(Weight::from_ref_time(85_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Proxy Announcements (r:1 w:1) // Storage: System Account (r:1 w:1) /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. fn remove_announcement(a: u32, p: u32, ) -> Weight { - (25_193_000 as Weight) + Weight::from_ref_time(25_193_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add((185_000 as Weight).saturating_mul(a as Weight)) + .saturating_add(Weight::from_ref_time(185_000 as RefTimeWeight).scalar_saturating_mul(a as RefTimeWeight)) // Standard Error: 1_000 - .saturating_add((23_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add(Weight::from_ref_time(23_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Proxy Announcements (r:1 w:1) // Storage: System Account (r:1 w:1) /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. fn reject_announcement(a: u32, p: u32, ) -> Weight { - (25_123_000 as Weight) + Weight::from_ref_time(25_123_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add((190_000 as Weight).saturating_mul(a as Weight)) + .saturating_add(Weight::from_ref_time(190_000 as RefTimeWeight).scalar_saturating_mul(a as RefTimeWeight)) // Standard Error: 1_000 - .saturating_add((21_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add(Weight::from_ref_time(21_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Proxy Proxies (r:1 w:0) // Storage: Proxy Announcements (r:1 w:1) @@ -100,58 +100,58 @@ impl pallet_proxy::WeightInfo for WeightInfo { /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. fn announce(a: u32, p: u32, ) -> Weight { - (32_582_000 as Weight) + Weight::from_ref_time(32_582_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add((200_000 as Weight).saturating_mul(a as Weight)) + .saturating_add(Weight::from_ref_time(200_000 as RefTimeWeight).scalar_saturating_mul(a as RefTimeWeight)) // Standard Error: 2_000 - .saturating_add((93_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add(Weight::from_ref_time(93_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Proxy Proxies (r:1 w:1) /// The range of component `p` is `[1, 31]`. fn add_proxy(p: u32, ) -> Weight { - (28_173_000 as Weight) + Weight::from_ref_time(28_173_000 as RefTimeWeight) // Standard Error: 3_000 - .saturating_add((112_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(112_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Proxy Proxies (r:1 w:1) /// The range of component `p` is `[1, 31]`. fn remove_proxy(p: u32, ) -> Weight { - (28_247_000 as Weight) + Weight::from_ref_time(28_247_000 as RefTimeWeight) // Standard Error: 3_000 - .saturating_add((118_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(118_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Proxy Proxies (r:1 w:1) /// The range of component `p` is `[1, 31]`. fn remove_proxies(p: u32, ) -> Weight { - (23_821_000 as Weight) + Weight::from_ref_time(23_821_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add((85_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(85_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) // Storage: Proxy Proxies (r:1 w:1) /// The range of component `p` is `[1, 31]`. fn anonymous(p: u32, ) -> Weight { - (31_472_000 as Weight) + Weight::from_ref_time(31_472_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add((21_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(21_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Proxy Proxies (r:1 w:1) /// The range of component `p` is `[0, 30]`. fn kill_anonymous(p: u32, ) -> Weight { - (24_620_000 as Weight) + Weight::from_ref_time(24_620_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add((85_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(85_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } } diff --git a/parachains/runtimes/assets/statemine/src/weights/pallet_session.rs b/parachains/runtimes/assets/statemine/src/weights/pallet_session.rs index 973fd7d4dc4..cddb0408c51 100644 --- a/parachains/runtimes/assets/statemine/src/weights/pallet_session.rs +++ b/parachains/runtimes/assets/statemine/src/weights/pallet_session.rs @@ -40,7 +40,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::Weight}; +use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_session`. @@ -49,15 +49,15 @@ impl pallet_session::WeightInfo for WeightInfo { // Storage: Session NextKeys (r:1 w:1) // Storage: Session KeyOwner (r:1 w:1) fn set_keys() -> Weight { - (16_555_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(16_555_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Session NextKeys (r:1 w:1) // Storage: Session KeyOwner (r:0 w:1) fn purge_keys() -> Weight { - (13_554_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(13_554_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } } diff --git a/parachains/runtimes/assets/statemine/src/weights/pallet_timestamp.rs b/parachains/runtimes/assets/statemine/src/weights/pallet_timestamp.rs index c2757b04d58..9b838b6f8c6 100644 --- a/parachains/runtimes/assets/statemine/src/weights/pallet_timestamp.rs +++ b/parachains/runtimes/assets/statemine/src/weights/pallet_timestamp.rs @@ -40,7 +40,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::Weight}; +use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_timestamp`. @@ -48,11 +48,11 @@ pub struct WeightInfo(PhantomData); impl pallet_timestamp::WeightInfo for WeightInfo { // Storage: Timestamp Now (r:1 w:1) fn set() -> Weight { - (6_818_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(6_818_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } fn on_finalize() -> Weight { - (2_431_000 as Weight) + Weight::from_ref_time(2_431_000 as RefTimeWeight) } } diff --git a/parachains/runtimes/assets/statemine/src/weights/pallet_uniques.rs b/parachains/runtimes/assets/statemine/src/weights/pallet_uniques.rs index ea3943cc734..ec0044fd371 100644 --- a/parachains/runtimes/assets/statemine/src/weights/pallet_uniques.rs +++ b/parachains/runtimes/assets/statemine/src/weights/pallet_uniques.rs @@ -43,7 +43,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::Weight}; +use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_uniques`. @@ -53,17 +53,17 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: Uniques Class (r:1 w:1) // Storage: Uniques ClassAccount (r:0 w:1) fn create() -> Weight { - (28_358_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(28_358_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Uniques NextCollectionId (r:1 w:1) // Storage: Uniques Class (r:1 w:1) // Storage: Uniques ClassAccount (r:0 w:1) fn force_create() -> Weight { - (17_824_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(17_824_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Uniques Class (r:1 w:1) // Storage: Uniques Asset (r:1 w:0) @@ -77,191 +77,191 @@ impl pallet_uniques::WeightInfo for WeightInfo { /// The range of component `m` is `[0, 1000]`. /// The range of component `a` is `[0, 1000]`. fn destroy(n: u32, m: u32, a: u32, ) -> Weight { - (0 as Weight) + Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 17_000 - .saturating_add((10_592_000 as Weight).saturating_mul(n as Weight)) + .saturating_add(Weight::from_ref_time(10_592_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) // Standard Error: 17_000 - .saturating_add((1_658_000 as Weight).saturating_mul(m as Weight)) + .saturating_add(Weight::from_ref_time(1_658_000 as RefTimeWeight).scalar_saturating_mul(m as RefTimeWeight)) // Standard Error: 17_000 - .saturating_add((1_593_000 as Weight).saturating_mul(a as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(n as Weight))) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) - .saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(n as Weight))) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(m as Weight))) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(a as Weight))) + .saturating_add(Weight::from_ref_time(1_593_000 as RefTimeWeight).scalar_saturating_mul(a as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads((1 as RefTimeWeight).saturating_mul(n as RefTimeWeight))) + .saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes((2 as RefTimeWeight).saturating_mul(n as RefTimeWeight))) + .saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(m as RefTimeWeight))) + .saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(a as RefTimeWeight))) } // Storage: Uniques Asset (r:1 w:1) // Storage: Uniques Class (r:1 w:1) // Storage: Uniques CollectionMaxSupply (r:1 w:0) // Storage: Uniques Account (r:0 w:1) fn mint() -> Weight { - (36_742_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(36_742_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight)) } // Storage: Uniques Class (r:1 w:1) // Storage: Uniques Asset (r:1 w:1) // Storage: Uniques Account (r:0 w:1) // Storage: Uniques ItemPriceOf (r:0 w:1) fn burn() -> Weight { - (37_124_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(37_124_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight)) } // Storage: Uniques Class (r:1 w:0) // Storage: Uniques Asset (r:1 w:1) // Storage: Uniques Account (r:0 w:2) // Storage: Uniques ItemPriceOf (r:0 w:1) fn transfer() -> Weight { - (28_961_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(28_961_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight)) } // Storage: Uniques Class (r:1 w:1) // Storage: Uniques Asset (r:100 w:100) /// The range of component `i` is `[0, 5000]`. fn redeposit(i: u32, ) -> Weight { - (0 as Weight) + Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 15_000 - .saturating_add((12_880_000 as Weight).saturating_mul(i as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(i as Weight))) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) + .saturating_add(Weight::from_ref_time(12_880_000 as RefTimeWeight).scalar_saturating_mul(i as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads((1 as RefTimeWeight).saturating_mul(i as RefTimeWeight))) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(i as RefTimeWeight))) } // Storage: Uniques Asset (r:1 w:1) // Storage: Uniques Class (r:1 w:0) fn freeze() -> Weight { - (21_658_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(21_658_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Uniques Asset (r:1 w:1) // Storage: Uniques Class (r:1 w:0) fn thaw() -> Weight { - (21_980_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(21_980_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Uniques Class (r:1 w:1) fn freeze_collection() -> Weight { - (17_123_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(17_123_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Uniques Class (r:1 w:1) fn thaw_collection() -> Weight { - (17_398_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(17_398_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Uniques OwnershipAcceptance (r:1 w:1) // Storage: Uniques Class (r:1 w:1) // Storage: Uniques ClassAccount (r:0 w:2) fn transfer_ownership() -> Weight { - (25_473_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(25_473_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight)) } // Storage: Uniques Class (r:1 w:1) fn set_team() -> Weight { - (17_970_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(17_970_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Uniques Class (r:1 w:1) // Storage: Uniques ClassAccount (r:0 w:1) fn force_item_status() -> Weight { - (20_781_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(20_781_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Uniques Class (r:1 w:1) // Storage: Uniques InstanceMetadataOf (r:1 w:0) // Storage: Uniques Attribute (r:1 w:1) fn set_attribute() -> Weight { - (42_652_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(42_652_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Uniques Class (r:1 w:1) // Storage: Uniques InstanceMetadataOf (r:1 w:0) // Storage: Uniques Attribute (r:1 w:1) fn clear_attribute() -> Weight { - (41_166_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(41_166_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Uniques Class (r:1 w:1) // Storage: Uniques InstanceMetadataOf (r:1 w:1) fn set_metadata() -> Weight { - (35_471_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(35_471_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Uniques Class (r:1 w:1) // Storage: Uniques InstanceMetadataOf (r:1 w:1) fn clear_metadata() -> Weight { - (35_110_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(35_110_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Uniques Class (r:1 w:1) // Storage: Uniques ClassMetadataOf (r:1 w:1) fn set_collection_metadata() -> Weight { - (33_536_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(33_536_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Uniques Class (r:1 w:0) // Storage: Uniques ClassMetadataOf (r:1 w:1) fn clear_collection_metadata() -> Weight { - (31_913_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(31_913_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Uniques Class (r:1 w:0) // Storage: Uniques Asset (r:1 w:1) fn approve_transfer() -> Weight { - (23_536_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(23_536_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Uniques Class (r:1 w:0) // Storage: Uniques Asset (r:1 w:1) fn cancel_approval() -> Weight { - (23_748_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(23_748_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Uniques OwnershipAcceptance (r:1 w:1) fn set_accept_ownership() -> Weight { - (20_712_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(20_712_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Uniques CollectionMaxSupply (r:1 w:1) // Storage: Uniques Class (r:1 w:0) fn set_collection_max_supply() -> Weight { - (20_245_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(20_245_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Uniques Asset (r:1 w:0) // Storage: Uniques ItemPriceOf (r:0 w:1) fn set_price() -> Weight { - (20_065_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(20_065_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Uniques Asset (r:1 w:1) // Storage: Uniques ItemPriceOf (r:1 w:1) // Storage: Uniques Class (r:1 w:0) // Storage: Uniques Account (r:0 w:2) fn buy_item() -> Weight { - (40_638_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(40_638_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight)) } } diff --git a/parachains/runtimes/assets/statemine/src/weights/pallet_utility.rs b/parachains/runtimes/assets/statemine/src/weights/pallet_utility.rs index 2df9b898484..97ac89aee2e 100644 --- a/parachains/runtimes/assets/statemine/src/weights/pallet_utility.rs +++ b/parachains/runtimes/assets/statemine/src/weights/pallet_utility.rs @@ -40,7 +40,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::Weight}; +use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_utility`. @@ -48,26 +48,26 @@ pub struct WeightInfo(PhantomData); impl pallet_utility::WeightInfo for WeightInfo { /// The range of component `c` is `[0, 1000]`. fn batch(c: u32, ) -> Weight { - (22_923_000 as Weight) + Weight::from_ref_time(22_923_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add((3_526_000 as Weight).saturating_mul(c as Weight)) + .saturating_add(Weight::from_ref_time(3_526_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight)) } fn as_derivative() -> Weight { - (5_220_000 as Weight) + Weight::from_ref_time(5_220_000 as RefTimeWeight) } /// The range of component `c` is `[0, 1000]`. fn batch_all(c: u32, ) -> Weight { - (20_953_000 as Weight) + Weight::from_ref_time(20_953_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add((3_698_000 as Weight).saturating_mul(c as Weight)) + .saturating_add(Weight::from_ref_time(3_698_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight)) } fn dispatch_as() -> Weight { - (12_087_000 as Weight) + Weight::from_ref_time(12_087_000 as RefTimeWeight) } /// The range of component `c` is `[0, 1000]`. fn force_batch(c: u32, ) -> Weight { - (10_076_000 as Weight) + Weight::from_ref_time(10_076_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add((3_546_000 as Weight).saturating_mul(c as Weight)) + .saturating_add(Weight::from_ref_time(3_546_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight)) } } diff --git a/parachains/runtimes/assets/statemine/src/weights/paritydb_weights.rs b/parachains/runtimes/assets/statemine/src/weights/paritydb_weights.rs index 843823c1bf3..8083ccb4001 100644 --- a/parachains/runtimes/assets/statemine/src/weights/paritydb_weights.rs +++ b/parachains/runtimes/assets/statemine/src/weights/paritydb_weights.rs @@ -25,8 +25,8 @@ pub mod constants { /// `ParityDB` can be enabled with a feature flag, but is still experimental. These weights /// are available for brave runtime engineers who may want to try this out as default. pub const ParityDbWeight: RuntimeDbWeight = RuntimeDbWeight { - read: 8_000 * constants::WEIGHT_PER_NANOS, - write: 50_000 * constants::WEIGHT_PER_NANOS, + read: 8_000 * constants::WEIGHT_PER_NANOS.ref_time(), + write: 50_000 * constants::WEIGHT_PER_NANOS.ref_time(), }; } diff --git a/parachains/runtimes/assets/statemine/src/weights/rocksdb_weights.rs b/parachains/runtimes/assets/statemine/src/weights/rocksdb_weights.rs index 05e06b0eabe..1db87f143f3 100644 --- a/parachains/runtimes/assets/statemine/src/weights/rocksdb_weights.rs +++ b/parachains/runtimes/assets/statemine/src/weights/rocksdb_weights.rs @@ -25,8 +25,8 @@ pub mod constants { /// By default, Substrate uses `RocksDB`, so this will be the weight used throughout /// the runtime. pub const RocksDbWeight: RuntimeDbWeight = RuntimeDbWeight { - read: 25_000 * constants::WEIGHT_PER_NANOS, - write: 100_000 * constants::WEIGHT_PER_NANOS, + read: 25_000 * constants::WEIGHT_PER_NANOS.ref_time(), + write: 100_000 * constants::WEIGHT_PER_NANOS.ref_time(), }; } diff --git a/parachains/runtimes/assets/statemine/src/xcm_config.rs b/parachains/runtimes/assets/statemine/src/xcm_config.rs index 3875cf7901b..4203f1a54f0 100644 --- a/parachains/runtimes/assets/statemine/src/xcm_config.rs +++ b/parachains/runtimes/assets/statemine/src/xcm_config.rs @@ -20,7 +20,6 @@ use super::{ use frame_support::{ match_types, parameter_types, traits::{Everything, Nothing, PalletInfoAccess}, - weights::Weight, }; use pallet_xcm::XcmPassthrough; use parachains_common::{ @@ -130,7 +129,7 @@ pub type XcmOriginToTransactDispatchOrigin = ( parameter_types! { // One XCM operation is 1_000_000_000 weight - almost certainly a conservative estimate. - pub UnitWeightCost: Weight = 1_000_000_000; + pub UnitWeightCost: u64 = 1_000_000_000; pub const MaxInstructions: u32 = 100; pub XcmAssetFeesReceiver: Option = Authorship::author(); } diff --git a/parachains/runtimes/assets/statemine/tests/tests.rs b/parachains/runtimes/assets/statemine/tests/tests.rs index c99debbced4..974f89ec1ee 100644 --- a/parachains/runtimes/assets/statemine/tests/tests.rs +++ b/parachains/runtimes/assets/statemine/tests/tests.rs @@ -1,6 +1,8 @@ use asset_test_utils::{ExtBuilder, RuntimeHelper}; use frame_support::{ - assert_noop, assert_ok, traits::PalletInfo, weights::WeightToFee as WeightToFeeT, + assert_noop, assert_ok, + traits::PalletInfo, + weights::{Weight, WeightToFee as WeightToFeeT}, }; use parachains_common::{AccountId, AuraId}; pub use statemine_runtime::{ @@ -49,7 +51,7 @@ fn test_asset_xcm_trader() { let bought = 4_000_000_000u64; // lets calculate amount needed - let amount_needed = WeightToFee::weight_to_fee(&bought); + let amount_needed = WeightToFee::weight_to_fee(&Weight::from_ref_time(bought)); let asset_multilocation = MultiLocation::new( 0, @@ -130,7 +132,7 @@ fn test_asset_xcm_trader_with_refund() { ); // lets calculate amount needed - let amount_bought = WeightToFee::weight_to_fee(&bought); + let amount_bought = WeightToFee::weight_to_fee(&Weight::from_ref_time(bought)); let asset: MultiAsset = (asset_multilocation.clone(), amount_bought).into(); @@ -144,7 +146,8 @@ fn test_asset_xcm_trader_with_refund() { let weight_used = bought / 2; // Make sure refurnd works. - let amount_refunded = WeightToFee::weight_to_fee(&(bought - weight_used)); + let amount_refunded = + WeightToFee::weight_to_fee(&Weight::from_ref_time(bought - weight_used)); assert_eq!( trader.refund_weight(bought - weight_used), @@ -155,7 +158,7 @@ fn test_asset_xcm_trader_with_refund() { drop(trader); // We only should have paid for half of the bought weight - let fees_paid = WeightToFee::weight_to_fee(&weight_used); + let fees_paid = WeightToFee::weight_to_fee(&Weight::from_ref_time(weight_used)); assert_eq!( Assets::balance(1, AccountId::from(ALICE)), @@ -207,7 +210,7 @@ fn test_asset_xcm_trader_refund_not_possible_since_amount_less_than_ed() { ), ); - let amount_bought = WeightToFee::weight_to_fee(&bought); + let amount_bought = WeightToFee::weight_to_fee(&Weight::from_ref_time(bought)); assert!( amount_bought < ExistentialDeposit::get(), @@ -267,7 +270,7 @@ fn test_that_buying_ed_refund_does_not_refund() { ), ); - let amount_bought = WeightToFee::weight_to_fee(&bought); + let amount_bought = WeightToFee::weight_to_fee(&Weight::from_ref_time(bought)); assert!( amount_bought < ExistentialDeposit::get(), diff --git a/parachains/runtimes/assets/statemint/src/constants.rs b/parachains/runtimes/assets/statemint/src/constants.rs index 17624fded97..ef3a545d15e 100644 --- a/parachains/runtimes/assets/statemint/src/constants.rs +++ b/parachains/runtimes/assets/statemint/src/constants.rs @@ -61,7 +61,7 @@ pub mod fee { // in Polkadot, extrinsic base weight (smallest non-zero weight) is mapped to 1/10 CENT: // in Statemint, we map to 1/10 of that, or 1/100 CENT let p = super::currency::CENTS; - let q = 100 * Balance::from(ExtrinsicBaseWeight::get()); + let q = 100 * Balance::from(ExtrinsicBaseWeight::get().ref_time()); smallvec![WeightToFeeCoefficient { degree: 1, negative: false, diff --git a/parachains/runtimes/assets/statemint/src/lib.rs b/parachains/runtimes/assets/statemint/src/lib.rs index be579e1215e..f9ceaba944c 100644 --- a/parachains/runtimes/assets/statemint/src/lib.rs +++ b/parachains/runtimes/assets/statemint/src/lib.rs @@ -437,8 +437,8 @@ impl pallet_proxy::Config for Runtime { } parameter_types! { - pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT / 4; - pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT / 4; + pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.scalar_div(4); + pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.scalar_div(4); } impl cumulus_pallet_parachain_system::Config for Runtime { diff --git a/parachains/runtimes/assets/statemint/src/weights/block_weights.rs b/parachains/runtimes/assets/statemint/src/weights/block_weights.rs index 4db90f0c020..c171a1fdd71 100644 --- a/parachains/runtimes/assets/statemint/src/weights/block_weights.rs +++ b/parachains/runtimes/assets/statemint/src/weights/block_weights.rs @@ -23,7 +23,7 @@ pub mod constants { parameter_types! { /// Importing a block with 0 Extrinsics. - pub const BlockExecutionWeight: Weight = 5_000_000 * constants::WEIGHT_PER_NANOS; + pub const BlockExecutionWeight: Weight = constants::WEIGHT_PER_NANOS.scalar_saturating_mul(5_000_000); } #[cfg(test)] diff --git a/parachains/runtimes/assets/statemint/src/weights/cumulus_pallet_xcmp_queue.rs b/parachains/runtimes/assets/statemint/src/weights/cumulus_pallet_xcmp_queue.rs index a51fb710eac..c6c95112065 100644 --- a/parachains/runtimes/assets/statemint/src/weights/cumulus_pallet_xcmp_queue.rs +++ b/parachains/runtimes/assets/statemint/src/weights/cumulus_pallet_xcmp_queue.rs @@ -40,7 +40,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::Weight}; +use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}}; use sp_std::marker::PhantomData; /// Weight functions for `cumulus_pallet_xcmp_queue`. @@ -48,14 +48,14 @@ pub struct WeightInfo(PhantomData); impl cumulus_pallet_xcmp_queue::WeightInfo for WeightInfo { // Storage: XcmpQueue QueueConfig (r:1 w:1) fn set_config_with_u32() -> Weight { - (5_192_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(5_192_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: XcmpQueue QueueConfig (r:1 w:1) fn set_config_with_weight() -> Weight { - (5_363_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(5_363_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } } diff --git a/parachains/runtimes/assets/statemint/src/weights/extrinsic_weights.rs b/parachains/runtimes/assets/statemint/src/weights/extrinsic_weights.rs index 158ba99c6a4..6e162888356 100644 --- a/parachains/runtimes/assets/statemint/src/weights/extrinsic_weights.rs +++ b/parachains/runtimes/assets/statemint/src/weights/extrinsic_weights.rs @@ -23,7 +23,7 @@ pub mod constants { parameter_types! { /// Executing a NO-OP `System::remarks` Extrinsic. - pub const ExtrinsicBaseWeight: Weight = 125_000 * constants::WEIGHT_PER_NANOS; + pub const ExtrinsicBaseWeight: Weight = constants::WEIGHT_PER_NANOS.scalar_saturating_mul(125_000); } #[cfg(test)] diff --git a/parachains/runtimes/assets/statemint/src/weights/frame_system.rs b/parachains/runtimes/assets/statemint/src/weights/frame_system.rs index 794cdbe1b66..3d338ac8360 100644 --- a/parachains/runtimes/assets/statemint/src/weights/frame_system.rs +++ b/parachains/runtimes/assets/statemint/src/weights/frame_system.rs @@ -40,7 +40,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::Weight}; +use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}}; use sp_std::marker::PhantomData; /// Weight functions for `frame_system`. @@ -48,43 +48,43 @@ pub struct WeightInfo(PhantomData); impl frame_system::WeightInfo for WeightInfo { /// The range of component `b` is `[0, 3932160]`. fn remark(_b: u32, ) -> Weight { - (0 as Weight) + Weight::from_ref_time(0 as RefTimeWeight) } /// The range of component `b` is `[0, 3932160]`. fn remark_with_event(b: u32, ) -> Weight { - (0 as Weight) + Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) + .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(b as RefTimeWeight)) } // Storage: System Digest (r:1 w:1) // Storage: unknown [0x3a686561707061676573] (r:0 w:1) fn set_heap_pages() -> Weight { - (5_446_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(5_446_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Skipped Metadata (r:0 w:0) /// The range of component `i` is `[1, 1000]`. fn set_storage(i: u32, ) -> Weight { - (0 as Weight) + Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add((626_000 as Weight).saturating_mul(i as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) + .saturating_add(Weight::from_ref_time(626_000 as RefTimeWeight).scalar_saturating_mul(i as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(i as RefTimeWeight))) } // Storage: Skipped Metadata (r:0 w:0) /// The range of component `i` is `[1, 1000]`. fn kill_storage(i: u32, ) -> Weight { - (0 as Weight) + Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add((515_000 as Weight).saturating_mul(i as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) + .saturating_add(Weight::from_ref_time(515_000 as RefTimeWeight).scalar_saturating_mul(i as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(i as RefTimeWeight))) } // Storage: Skipped Metadata (r:0 w:0) /// The range of component `p` is `[1, 1000]`. fn kill_prefix(p: u32, ) -> Weight { - (0 as Weight) + Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add((1_052_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(p as Weight))) + .saturating_add(Weight::from_ref_time(1_052_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(p as RefTimeWeight))) } } diff --git a/parachains/runtimes/assets/statemint/src/weights/pallet_assets.rs b/parachains/runtimes/assets/statemint/src/weights/pallet_assets.rs index 4aea74e75c4..d3aaeb66309 100644 --- a/parachains/runtimes/assets/statemint/src/weights/pallet_assets.rs +++ b/parachains/runtimes/assets/statemint/src/weights/pallet_assets.rs @@ -40,7 +40,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::Weight}; +use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_assets`. @@ -48,15 +48,15 @@ pub struct WeightInfo(PhantomData); impl pallet_assets::WeightInfo for WeightInfo { // Storage: Assets Asset (r:1 w:1) fn create() -> Weight { - (26_226_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(26_226_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Assets Asset (r:1 w:1) fn force_create() -> Weight { - (15_357_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(15_357_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:5002 w:5001) @@ -67,171 +67,171 @@ impl pallet_assets::WeightInfo for WeightInfo { /// The range of component `s` is `[0, 5000]`. /// The range of component `a` is `[0, 500]`. fn destroy(c: u32, s: u32, a: u32, ) -> Weight { - (0 as Weight) + Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 45_000 - .saturating_add((15_904_000 as Weight).saturating_mul(c as Weight)) + .saturating_add(Weight::from_ref_time(15_904_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight)) // Standard Error: 45_000 - .saturating_add((18_803_000 as Weight).saturating_mul(s as Weight)) + .saturating_add(Weight::from_ref_time(18_803_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) // Standard Error: 450_000 - .saturating_add((17_017_000 as Weight).saturating_mul(a as Weight)) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(c as Weight))) - .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(s as Weight))) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(a as Weight))) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - .saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(c as Weight))) - .saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(s as Weight))) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(a as Weight))) + .saturating_add(Weight::from_ref_time(17_017_000 as RefTimeWeight).scalar_saturating_mul(a as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(5 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads((2 as RefTimeWeight).saturating_mul(c as RefTimeWeight))) + .saturating_add(T::DbWeight::get().reads((2 as RefTimeWeight).saturating_mul(s as RefTimeWeight))) + .saturating_add(T::DbWeight::get().reads((1 as RefTimeWeight).saturating_mul(a as RefTimeWeight))) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes((2 as RefTimeWeight).saturating_mul(c as RefTimeWeight))) + .saturating_add(T::DbWeight::get().writes((2 as RefTimeWeight).saturating_mul(s as RefTimeWeight))) + .saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(a as RefTimeWeight))) } // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:1 w:1) fn mint() -> Weight { - (29_616_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(29_616_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:1 w:1) fn burn() -> Weight { - (33_496_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(33_496_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:2 w:2) // Storage: System Account (r:1 w:1) fn transfer() -> Weight { - (46_790_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(46_790_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight)) } // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:2 w:2) // Storage: System Account (r:1 w:1) fn transfer_keep_alive() -> Weight { - (39_769_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(39_769_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight)) } // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:2 w:2) // Storage: System Account (r:1 w:1) fn force_transfer() -> Weight { - (47_200_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(47_200_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight)) } // Storage: Assets Asset (r:1 w:0) // Storage: Assets Account (r:1 w:1) fn freeze() -> Weight { - (20_873_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(20_873_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Assets Asset (r:1 w:0) // Storage: Assets Account (r:1 w:1) fn thaw() -> Weight { - (21_228_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(21_228_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Assets Asset (r:1 w:1) fn freeze_asset() -> Weight { - (17_685_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(17_685_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Assets Asset (r:1 w:1) fn thaw_asset() -> Weight { - (17_542_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(17_542_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Assets Asset (r:1 w:1) // Storage: Assets Metadata (r:1 w:0) fn transfer_ownership() -> Weight { - (18_639_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(18_639_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Assets Asset (r:1 w:1) fn set_team() -> Weight { - (17_135_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(17_135_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Assets Asset (r:1 w:0) // Storage: Assets Metadata (r:1 w:1) /// The range of component `n` is `[0, 50]`. /// The range of component `s` is `[0, 50]`. fn set_metadata(n: u32, s: u32, ) -> Weight { - (31_324_000 as Weight) + Weight::from_ref_time(31_324_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add((1_000 as Weight).saturating_mul(n as Weight)) + .saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) // Standard Error: 0 - .saturating_add((3_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(3_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Assets Asset (r:1 w:0) // Storage: Assets Metadata (r:1 w:1) fn clear_metadata() -> Weight { - (31_340_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(31_340_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Assets Asset (r:1 w:0) // Storage: Assets Metadata (r:1 w:1) /// The range of component `n` is `[0, 50]`. /// The range of component `s` is `[0, 50]`. fn force_set_metadata(_n: u32, s: u32, ) -> Weight { - (18_756_000 as Weight) + Weight::from_ref_time(18_756_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Assets Asset (r:1 w:0) // Storage: Assets Metadata (r:1 w:1) fn force_clear_metadata() -> Weight { - (31_427_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(31_427_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Assets Asset (r:1 w:1) fn force_asset_status() -> Weight { - (16_930_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(16_930_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Assets Asset (r:1 w:1) // Storage: Assets Approvals (r:1 w:1) fn approve_transfer() -> Weight { - (34_492_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(34_492_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Assets Approvals (r:1 w:1) // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:2 w:2) // Storage: System Account (r:1 w:1) fn transfer_approved() -> Weight { - (60_098_000 as Weight) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(60_098_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(5 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(5 as RefTimeWeight)) } // Storage: Assets Asset (r:1 w:1) // Storage: Assets Approvals (r:1 w:1) fn cancel_approval() -> Weight { - (35_630_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(35_630_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Assets Asset (r:1 w:1) // Storage: Assets Approvals (r:1 w:1) fn force_cancel_approval() -> Weight { - (37_399_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(37_399_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } } diff --git a/parachains/runtimes/assets/statemint/src/weights/pallet_balances.rs b/parachains/runtimes/assets/statemint/src/weights/pallet_balances.rs index 66e621a74a2..53b853de67b 100644 --- a/parachains/runtimes/assets/statemint/src/weights/pallet_balances.rs +++ b/parachains/runtimes/assets/statemint/src/weights/pallet_balances.rs @@ -40,7 +40,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::Weight}; +use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_balances`. @@ -48,44 +48,44 @@ pub struct WeightInfo(PhantomData); impl pallet_balances::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) fn transfer() -> Weight { - (41_006_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(41_006_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: System Account (r:1 w:1) fn transfer_keep_alive() -> Weight { - (31_329_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(31_329_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: System Account (r:1 w:1) fn set_balance_creating() -> Weight { - (21_075_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(21_075_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: System Account (r:1 w:1) fn set_balance_killing() -> Weight { - (24_413_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(24_413_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: System Account (r:2 w:2) fn force_transfer() -> Weight { - (41_434_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(41_434_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: System Account (r:1 w:1) fn transfer_all() -> Weight { - (37_653_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(37_653_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: System Account (r:1 w:1) fn force_unreserve() -> Weight { - (18_701_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(18_701_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } } diff --git a/parachains/runtimes/assets/statemint/src/weights/pallet_collator_selection.rs b/parachains/runtimes/assets/statemint/src/weights/pallet_collator_selection.rs index ceb63443192..e1f319163c7 100644 --- a/parachains/runtimes/assets/statemint/src/weights/pallet_collator_selection.rs +++ b/parachains/runtimes/assets/statemint/src/weights/pallet_collator_selection.rs @@ -40,7 +40,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::Weight}; +use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_collator_selection`. @@ -50,21 +50,21 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Storage: CollatorSelection Invulnerables (r:0 w:1) /// The range of component `b` is `[1, 100]`. fn set_invulnerables(b: u32, ) -> Weight { - (8_587_000 as Weight) + Weight::from_ref_time(8_587_000 as RefTimeWeight) // Standard Error: 3_000 - .saturating_add((3_304_000 as Weight).saturating_mul(b as Weight)) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(b as Weight))) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(3_304_000 as RefTimeWeight).scalar_saturating_mul(b as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads((1 as RefTimeWeight).saturating_mul(b as RefTimeWeight))) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: CollatorSelection DesiredCandidates (r:0 w:1) fn set_desired_candidates() -> Weight { - (9_027_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(9_027_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: CollatorSelection CandidacyBond (r:0 w:1) fn set_candidacy_bond() -> Weight { - (9_244_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(9_244_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: CollatorSelection Candidates (r:1 w:1) // Storage: CollatorSelection DesiredCandidates (r:1 w:0) @@ -74,29 +74,29 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Storage: CollatorSelection LastAuthoredBlock (r:0 w:1) /// The range of component `c` is `[1, 1000]`. fn register_as_candidate(c: u32, ) -> Weight { - (60_984_000 as Weight) + Weight::from_ref_time(60_984_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add((89_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add(Weight::from_ref_time(89_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(5 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: CollatorSelection Candidates (r:1 w:1) // Storage: CollatorSelection LastAuthoredBlock (r:0 w:1) /// The range of component `c` is `[6, 1000]`. fn leave_intent(c: u32, ) -> Weight { - (49_046_000 as Weight) + Weight::from_ref_time(49_046_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add((118_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add(Weight::from_ref_time(118_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: System Account (r:2 w:2) // Storage: System BlockWeight (r:1 w:1) // Storage: CollatorSelection LastAuthoredBlock (r:0 w:1) fn note_author() -> Weight { - (32_269_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(32_269_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight)) } // Storage: CollatorSelection Candidates (r:1 w:1) // Storage: CollatorSelection LastAuthoredBlock (r:1000 w:1) @@ -106,13 +106,13 @@ impl pallet_collator_selection::WeightInfo for WeightIn /// The range of component `r` is `[1, 1000]`. /// The range of component `c` is `[1, 1000]`. fn new_session(r: u32, c: u32, ) -> Weight { - (0 as Weight) + Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 1_992_000 - .saturating_add((10_521_000 as Weight).saturating_mul(r as Weight)) + .saturating_add(Weight::from_ref_time(10_521_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) // Standard Error: 1_992_000 - .saturating_add((53_162_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(c as Weight))) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(r as Weight))) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(c as Weight))) + .saturating_add(Weight::from_ref_time(53_162_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads((2 as RefTimeWeight).saturating_mul(c as RefTimeWeight))) + .saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(r as RefTimeWeight))) + .saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(c as RefTimeWeight))) } } diff --git a/parachains/runtimes/assets/statemint/src/weights/pallet_multisig.rs b/parachains/runtimes/assets/statemint/src/weights/pallet_multisig.rs index cd0c8b42a26..b2c6c147508 100644 --- a/parachains/runtimes/assets/statemint/src/weights/pallet_multisig.rs +++ b/parachains/runtimes/assets/statemint/src/weights/pallet_multisig.rs @@ -40,7 +40,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::Weight}; +use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_multisig`. @@ -48,22 +48,22 @@ pub struct WeightInfo(PhantomData); impl pallet_multisig::WeightInfo for WeightInfo { /// The range of component `z` is `[0, 10000]`. fn as_multi_threshold_1(z: u32, ) -> Weight { - (17_175_000 as Weight) + Weight::from_ref_time(17_175_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add((1_000 as Weight).saturating_mul(z as Weight)) + .saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).scalar_saturating_mul(z as RefTimeWeight)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) /// The range of component `s` is `[2, 100]`. /// The range of component `z` is `[0, 10000]`. fn as_multi_create(s: u32, z: u32, ) -> Weight { - (35_937_000 as Weight) + Weight::from_ref_time(35_937_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add((97_000 as Weight).saturating_mul(s as Weight)) + .saturating_add(Weight::from_ref_time(97_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) // Standard Error: 0 - .saturating_add((1_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).scalar_saturating_mul(z as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:1) @@ -71,38 +71,38 @@ impl pallet_multisig::WeightInfo for WeightInfo { /// The range of component `s` is `[2, 100]`. /// The range of component `z` is `[0, 10000]`. fn as_multi_create_store(s: u32, z: u32, ) -> Weight { - (37_468_000 as Weight) + Weight::from_ref_time(37_468_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add((89_000 as Weight).saturating_mul(s as Weight)) + .saturating_add(Weight::from_ref_time(89_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(z as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Multisig Multisigs (r:1 w:1) /// The range of component `s` is `[3, 100]`. /// The range of component `z` is `[0, 10000]`. fn as_multi_approve(s: u32, z: u32, ) -> Weight { - (25_557_000 as Weight) + Weight::from_ref_time(25_557_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add((83_000 as Weight).saturating_mul(s as Weight)) + .saturating_add(Weight::from_ref_time(83_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) // Standard Error: 0 - .saturating_add((1_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).scalar_saturating_mul(z as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:1) /// The range of component `s` is `[3, 100]`. /// The range of component `z` is `[0, 10000]`. fn as_multi_approve_store(s: u32, z: u32, ) -> Weight { - (38_127_000 as Weight) + Weight::from_ref_time(38_127_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add((88_000 as Weight).saturating_mul(s as Weight)) + .saturating_add(Weight::from_ref_time(88_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(z as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:1) @@ -110,53 +110,53 @@ impl pallet_multisig::WeightInfo for WeightInfo { /// The range of component `s` is `[2, 100]`. /// The range of component `z` is `[0, 10000]`. fn as_multi_complete(s: u32, z: u32, ) -> Weight { - (47_383_000 as Weight) + Weight::from_ref_time(47_383_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add((127_000 as Weight).saturating_mul(s as Weight)) + .saturating_add(Weight::from_ref_time(127_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) // Standard Error: 0 - .saturating_add((3_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + .saturating_add(Weight::from_ref_time(3_000 as RefTimeWeight).scalar_saturating_mul(z as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) /// The range of component `s` is `[2, 100]`. fn approve_as_multi_create(s: u32, ) -> Weight { - (33_472_000 as Weight) + Weight::from_ref_time(33_472_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add((102_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(102_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:0) /// The range of component `s` is `[2, 100]`. fn approve_as_multi_approve(s: u32, ) -> Weight { - (21_612_000 as Weight) + Weight::from_ref_time(21_612_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add((119_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(119_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:1) // Storage: System Account (r:1 w:1) /// The range of component `s` is `[2, 100]`. fn approve_as_multi_complete(s: u32, ) -> Weight { - (68_168_000 as Weight) + Weight::from_ref_time(68_168_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add((157_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + .saturating_add(Weight::from_ref_time(157_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:1) /// The range of component `s` is `[2, 100]`. fn cancel_as_multi(s: u32, ) -> Weight { - (52_748_000 as Weight) + Weight::from_ref_time(52_748_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add((117_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add(Weight::from_ref_time(117_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } } diff --git a/parachains/runtimes/assets/statemint/src/weights/pallet_proxy.rs b/parachains/runtimes/assets/statemint/src/weights/pallet_proxy.rs index 1b968ae885a..3591374e04e 100644 --- a/parachains/runtimes/assets/statemint/src/weights/pallet_proxy.rs +++ b/parachains/runtimes/assets/statemint/src/weights/pallet_proxy.rs @@ -40,7 +40,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::Weight}; +use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_proxy`. @@ -49,10 +49,10 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Storage: Proxy Proxies (r:1 w:0) /// The range of component `p` is `[1, 31]`. fn proxy(p: u32, ) -> Weight { - (17_582_000 as Weight) + Weight::from_ref_time(17_582_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add((77_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) + .saturating_add(Weight::from_ref_time(77_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) } // Storage: Proxy Proxies (r:1 w:0) // Storage: Proxy Announcements (r:1 w:1) @@ -60,39 +60,39 @@ impl pallet_proxy::WeightInfo for WeightInfo { /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. fn proxy_announced(a: u32, p: u32, ) -> Weight { - (34_603_000 as Weight) + Weight::from_ref_time(34_603_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add((169_000 as Weight).saturating_mul(a as Weight)) + .saturating_add(Weight::from_ref_time(169_000 as RefTimeWeight).scalar_saturating_mul(a as RefTimeWeight)) // Standard Error: 2_000 - .saturating_add((87_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add(Weight::from_ref_time(87_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Proxy Announcements (r:1 w:1) // Storage: System Account (r:1 w:1) /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. fn remove_announcement(a: u32, p: u32, ) -> Weight { - (24_496_000 as Weight) + Weight::from_ref_time(24_496_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add((179_000 as Weight).saturating_mul(a as Weight)) + .saturating_add(Weight::from_ref_time(179_000 as RefTimeWeight).scalar_saturating_mul(a as RefTimeWeight)) // Standard Error: 1_000 - .saturating_add((25_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add(Weight::from_ref_time(25_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Proxy Announcements (r:1 w:1) // Storage: System Account (r:1 w:1) /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. fn reject_announcement(a: u32, p: u32, ) -> Weight { - (24_237_000 as Weight) + Weight::from_ref_time(24_237_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add((181_000 as Weight).saturating_mul(a as Weight)) + .saturating_add(Weight::from_ref_time(181_000 as RefTimeWeight).scalar_saturating_mul(a as RefTimeWeight)) // Standard Error: 1_000 - .saturating_add((29_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add(Weight::from_ref_time(29_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Proxy Proxies (r:1 w:0) // Storage: Proxy Announcements (r:1 w:1) @@ -100,58 +100,58 @@ impl pallet_proxy::WeightInfo for WeightInfo { /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. fn announce(a: u32, p: u32, ) -> Weight { - (32_065_000 as Weight) + Weight::from_ref_time(32_065_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add((166_000 as Weight).saturating_mul(a as Weight)) + .saturating_add(Weight::from_ref_time(166_000 as RefTimeWeight).scalar_saturating_mul(a as RefTimeWeight)) // Standard Error: 2_000 - .saturating_add((91_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add(Weight::from_ref_time(91_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Proxy Proxies (r:1 w:1) /// The range of component `p` is `[1, 31]`. fn add_proxy(p: u32, ) -> Weight { - (27_168_000 as Weight) + Weight::from_ref_time(27_168_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add((117_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(117_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Proxy Proxies (r:1 w:1) /// The range of component `p` is `[1, 31]`. fn remove_proxy(p: u32, ) -> Weight { - (27_233_000 as Weight) + Weight::from_ref_time(27_233_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add((121_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(121_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Proxy Proxies (r:1 w:1) /// The range of component `p` is `[1, 31]`. fn remove_proxies(p: u32, ) -> Weight { - (23_010_000 as Weight) + Weight::from_ref_time(23_010_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add((95_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(95_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) // Storage: Proxy Proxies (r:1 w:1) /// The range of component `p` is `[1, 31]`. fn anonymous(p: u32, ) -> Weight { - (30_378_000 as Weight) + Weight::from_ref_time(30_378_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add((16_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(16_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Proxy Proxies (r:1 w:1) /// The range of component `p` is `[0, 30]`. fn kill_anonymous(p: u32, ) -> Weight { - (23_977_000 as Weight) + Weight::from_ref_time(23_977_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add((76_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(76_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } } diff --git a/parachains/runtimes/assets/statemint/src/weights/pallet_session.rs b/parachains/runtimes/assets/statemint/src/weights/pallet_session.rs index 5f5a8eea98a..ec0e46647d0 100644 --- a/parachains/runtimes/assets/statemint/src/weights/pallet_session.rs +++ b/parachains/runtimes/assets/statemint/src/weights/pallet_session.rs @@ -40,7 +40,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::Weight}; +use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_session`. @@ -49,15 +49,15 @@ impl pallet_session::WeightInfo for WeightInfo { // Storage: Session NextKeys (r:1 w:1) // Storage: Session KeyOwner (r:1 w:1) fn set_keys() -> Weight { - (16_170_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(16_170_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Session NextKeys (r:1 w:1) // Storage: Session KeyOwner (r:0 w:1) fn purge_keys() -> Weight { - (13_246_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(13_246_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } } diff --git a/parachains/runtimes/assets/statemint/src/weights/pallet_timestamp.rs b/parachains/runtimes/assets/statemint/src/weights/pallet_timestamp.rs index ffb87994147..5140207b912 100644 --- a/parachains/runtimes/assets/statemint/src/weights/pallet_timestamp.rs +++ b/parachains/runtimes/assets/statemint/src/weights/pallet_timestamp.rs @@ -40,7 +40,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::Weight}; +use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_timestamp`. @@ -48,11 +48,11 @@ pub struct WeightInfo(PhantomData); impl pallet_timestamp::WeightInfo for WeightInfo { // Storage: Timestamp Now (r:1 w:1) fn set() -> Weight { - (6_737_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(6_737_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } fn on_finalize() -> Weight { - (2_329_000 as Weight) + Weight::from_ref_time(2_329_000 as RefTimeWeight) } } diff --git a/parachains/runtimes/assets/statemint/src/weights/pallet_uniques.rs b/parachains/runtimes/assets/statemint/src/weights/pallet_uniques.rs index ed9e2b98f88..e25c16b6a34 100644 --- a/parachains/runtimes/assets/statemint/src/weights/pallet_uniques.rs +++ b/parachains/runtimes/assets/statemint/src/weights/pallet_uniques.rs @@ -43,7 +43,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::Weight}; +use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_uniques`. @@ -53,17 +53,17 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: Uniques Class (r:1 w:1) // Storage: Uniques ClassAccount (r:0 w:1) fn create() -> Weight { - (27_424_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(27_424_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Uniques NextCollectionId (r:1 w:1) // Storage: Uniques Class (r:1 w:1) // Storage: Uniques ClassAccount (r:0 w:1) fn force_create() -> Weight { - (17_098_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(17_098_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Uniques Class (r:1 w:1) // Storage: Uniques Asset (r:1 w:0) @@ -77,191 +77,191 @@ impl pallet_uniques::WeightInfo for WeightInfo { /// The range of component `m` is `[0, 1000]`. /// The range of component `a` is `[0, 1000]`. fn destroy(n: u32, m: u32, a: u32, ) -> Weight { - (0 as Weight) + Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 18_000 - .saturating_add((10_919_000 as Weight).saturating_mul(n as Weight)) + .saturating_add(Weight::from_ref_time(10_919_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) // Standard Error: 18_000 - .saturating_add((1_679_000 as Weight).saturating_mul(m as Weight)) + .saturating_add(Weight::from_ref_time(1_679_000 as RefTimeWeight).scalar_saturating_mul(m as RefTimeWeight)) // Standard Error: 18_000 - .saturating_add((1_463_000 as Weight).saturating_mul(a as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(n as Weight))) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) - .saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(n as Weight))) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(m as Weight))) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(a as Weight))) + .saturating_add(Weight::from_ref_time(1_463_000 as RefTimeWeight).scalar_saturating_mul(a as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads((1 as RefTimeWeight).saturating_mul(n as RefTimeWeight))) + .saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes((2 as RefTimeWeight).saturating_mul(n as RefTimeWeight))) + .saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(m as RefTimeWeight))) + .saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(a as RefTimeWeight))) } // Storage: Uniques Asset (r:1 w:1) // Storage: Uniques Class (r:1 w:1) // Storage: Uniques CollectionMaxSupply (r:1 w:0) // Storage: Uniques Account (r:0 w:1) fn mint() -> Weight { - (36_329_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(36_329_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight)) } // Storage: Uniques Class (r:1 w:1) // Storage: Uniques Asset (r:1 w:1) // Storage: Uniques Account (r:0 w:1) // Storage: Uniques ItemPriceOf (r:0 w:1) fn burn() -> Weight { - (36_746_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(36_746_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight)) } // Storage: Uniques Class (r:1 w:0) // Storage: Uniques Asset (r:1 w:1) // Storage: Uniques Account (r:0 w:2) // Storage: Uniques ItemPriceOf (r:0 w:1) fn transfer() -> Weight { - (28_916_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(28_916_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight)) } // Storage: Uniques Class (r:1 w:1) // Storage: Uniques Asset (r:100 w:100) /// The range of component `i` is `[0, 5000]`. fn redeposit(i: u32, ) -> Weight { - (0 as Weight) + Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 15_000 - .saturating_add((12_745_000 as Weight).saturating_mul(i as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(i as Weight))) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) + .saturating_add(Weight::from_ref_time(12_745_000 as RefTimeWeight).scalar_saturating_mul(i as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads((1 as RefTimeWeight).saturating_mul(i as RefTimeWeight))) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(i as RefTimeWeight))) } // Storage: Uniques Asset (r:1 w:1) // Storage: Uniques Class (r:1 w:0) fn freeze() -> Weight { - (21_813_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(21_813_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Uniques Asset (r:1 w:1) // Storage: Uniques Class (r:1 w:0) fn thaw() -> Weight { - (22_088_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(22_088_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Uniques Class (r:1 w:1) fn freeze_collection() -> Weight { - (17_184_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(17_184_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Uniques Class (r:1 w:1) fn thaw_collection() -> Weight { - (17_311_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(17_311_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Uniques OwnershipAcceptance (r:1 w:1) // Storage: Uniques Class (r:1 w:1) // Storage: Uniques ClassAccount (r:0 w:2) fn transfer_ownership() -> Weight { - (25_174_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(25_174_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight)) } // Storage: Uniques Class (r:1 w:1) fn set_team() -> Weight { - (17_879_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(17_879_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Uniques Class (r:1 w:1) // Storage: Uniques ClassAccount (r:0 w:1) fn force_item_status() -> Weight { - (20_491_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(20_491_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Uniques Class (r:1 w:1) // Storage: Uniques InstanceMetadataOf (r:1 w:0) // Storage: Uniques Attribute (r:1 w:1) fn set_attribute() -> Weight { - (42_444_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(42_444_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Uniques Class (r:1 w:1) // Storage: Uniques InstanceMetadataOf (r:1 w:0) // Storage: Uniques Attribute (r:1 w:1) fn clear_attribute() -> Weight { - (41_217_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(41_217_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Uniques Class (r:1 w:1) // Storage: Uniques InstanceMetadataOf (r:1 w:1) fn set_metadata() -> Weight { - (34_559_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(34_559_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Uniques Class (r:1 w:1) // Storage: Uniques InstanceMetadataOf (r:1 w:1) fn clear_metadata() -> Weight { - (34_863_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(34_863_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Uniques Class (r:1 w:1) // Storage: Uniques ClassMetadataOf (r:1 w:1) fn set_collection_metadata() -> Weight { - (33_199_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(33_199_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Uniques Class (r:1 w:0) // Storage: Uniques ClassMetadataOf (r:1 w:1) fn clear_collection_metadata() -> Weight { - (31_472_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(31_472_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Uniques Class (r:1 w:0) // Storage: Uniques Asset (r:1 w:1) fn approve_transfer() -> Weight { - (23_618_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(23_618_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Uniques Class (r:1 w:0) // Storage: Uniques Asset (r:1 w:1) fn cancel_approval() -> Weight { - (23_507_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(23_507_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Uniques OwnershipAcceptance (r:1 w:1) fn set_accept_ownership() -> Weight { - (21_120_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(21_120_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Uniques CollectionMaxSupply (r:1 w:1) // Storage: Uniques Class (r:1 w:0) fn set_collection_max_supply() -> Weight { - (20_664_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(20_664_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Uniques Asset (r:1 w:0) // Storage: Uniques ItemPriceOf (r:0 w:1) fn set_price() -> Weight { - (19_938_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(19_938_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Uniques Asset (r:1 w:1) // Storage: Uniques ItemPriceOf (r:1 w:1) // Storage: Uniques Class (r:1 w:0) // Storage: Uniques Account (r:0 w:2) fn buy_item() -> Weight { - (39_254_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(39_254_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight)) } } diff --git a/parachains/runtimes/assets/statemint/src/weights/pallet_utility.rs b/parachains/runtimes/assets/statemint/src/weights/pallet_utility.rs index e1bade93863..e462d30217a 100644 --- a/parachains/runtimes/assets/statemint/src/weights/pallet_utility.rs +++ b/parachains/runtimes/assets/statemint/src/weights/pallet_utility.rs @@ -40,7 +40,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::Weight}; +use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_utility`. @@ -48,26 +48,26 @@ pub struct WeightInfo(PhantomData); impl pallet_utility::WeightInfo for WeightInfo { /// The range of component `c` is `[0, 1000]`. fn batch(c: u32, ) -> Weight { - (30_959_000 as Weight) + Weight::from_ref_time(30_959_000 as RefTimeWeight) // Standard Error: 6_000 - .saturating_add((3_220_000 as Weight).saturating_mul(c as Weight)) + .saturating_add(Weight::from_ref_time(3_220_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight)) } fn as_derivative() -> Weight { - (4_732_000 as Weight) + Weight::from_ref_time(4_732_000 as RefTimeWeight) } /// The range of component `c` is `[0, 1000]`. fn batch_all(c: u32, ) -> Weight { - (16_465_000 as Weight) + Weight::from_ref_time(16_465_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add((3_364_000 as Weight).saturating_mul(c as Weight)) + .saturating_add(Weight::from_ref_time(3_364_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight)) } fn dispatch_as() -> Weight { - (11_903_000 as Weight) + Weight::from_ref_time(11_903_000 as RefTimeWeight) } /// The range of component `c` is `[0, 1000]`. fn force_batch(c: u32, ) -> Weight { - (22_621_000 as Weight) + Weight::from_ref_time(22_621_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add((3_147_000 as Weight).saturating_mul(c as Weight)) + .saturating_add(Weight::from_ref_time(3_147_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight)) } } diff --git a/parachains/runtimes/assets/statemint/src/weights/paritydb_weights.rs b/parachains/runtimes/assets/statemint/src/weights/paritydb_weights.rs index 843823c1bf3..8083ccb4001 100644 --- a/parachains/runtimes/assets/statemint/src/weights/paritydb_weights.rs +++ b/parachains/runtimes/assets/statemint/src/weights/paritydb_weights.rs @@ -25,8 +25,8 @@ pub mod constants { /// `ParityDB` can be enabled with a feature flag, but is still experimental. These weights /// are available for brave runtime engineers who may want to try this out as default. pub const ParityDbWeight: RuntimeDbWeight = RuntimeDbWeight { - read: 8_000 * constants::WEIGHT_PER_NANOS, - write: 50_000 * constants::WEIGHT_PER_NANOS, + read: 8_000 * constants::WEIGHT_PER_NANOS.ref_time(), + write: 50_000 * constants::WEIGHT_PER_NANOS.ref_time(), }; } diff --git a/parachains/runtimes/assets/statemint/src/weights/rocksdb_weights.rs b/parachains/runtimes/assets/statemint/src/weights/rocksdb_weights.rs index 05e06b0eabe..1db87f143f3 100644 --- a/parachains/runtimes/assets/statemint/src/weights/rocksdb_weights.rs +++ b/parachains/runtimes/assets/statemint/src/weights/rocksdb_weights.rs @@ -25,8 +25,8 @@ pub mod constants { /// By default, Substrate uses `RocksDB`, so this will be the weight used throughout /// the runtime. pub const RocksDbWeight: RuntimeDbWeight = RuntimeDbWeight { - read: 25_000 * constants::WEIGHT_PER_NANOS, - write: 100_000 * constants::WEIGHT_PER_NANOS, + read: 25_000 * constants::WEIGHT_PER_NANOS.ref_time(), + write: 100_000 * constants::WEIGHT_PER_NANOS.ref_time(), }; } diff --git a/parachains/runtimes/assets/statemint/src/xcm_config.rs b/parachains/runtimes/assets/statemint/src/xcm_config.rs index abfe9bb9865..ca9aea57055 100644 --- a/parachains/runtimes/assets/statemint/src/xcm_config.rs +++ b/parachains/runtimes/assets/statemint/src/xcm_config.rs @@ -20,7 +20,6 @@ use super::{ use frame_support::{ match_types, parameter_types, traits::{Everything, Nothing, PalletInfoAccess}, - weights::Weight, }; use pallet_xcm::XcmPassthrough; use parachains_common::{ @@ -127,7 +126,7 @@ pub type XcmOriginToTransactDispatchOrigin = ( parameter_types! { // One XCM operation is 1_000_000_000 weight - almost certainly a conservative estimate. - pub UnitWeightCost: Weight = 1_000_000_000; + pub UnitWeightCost: u64 = 1_000_000_000; pub const MaxInstructions: u32 = 100; pub XcmAssetFeesReceiver: Option = Authorship::author(); } diff --git a/parachains/runtimes/assets/statemint/tests/tests.rs b/parachains/runtimes/assets/statemint/tests/tests.rs index 518936210f2..77cb45c1cc5 100644 --- a/parachains/runtimes/assets/statemint/tests/tests.rs +++ b/parachains/runtimes/assets/statemint/tests/tests.rs @@ -1,6 +1,8 @@ use asset_test_utils::{ExtBuilder, RuntimeHelper}; use frame_support::{ - assert_noop, assert_ok, traits::PalletInfo, weights::WeightToFee as WeightToFeeT, + assert_noop, assert_ok, + traits::PalletInfo, + weights::{Weight, WeightToFee as WeightToFeeT}, }; use parachains_common::{AccountId, StatemintAuraId as AuraId}; pub use statemint_runtime::{ @@ -44,7 +46,7 @@ fn test_asset_xcm_trader_does_not_work_in_statemine() { let bought = 400_000_000_000u64; // lets calculate amount needed - let amount_needed = WeightToFee::weight_to_fee(&bought); + let amount_needed = WeightToFee::weight_to_fee(&Weight::from_ref_time(bought)); let asset_multilocation = MultiLocation::new( 0, diff --git a/parachains/runtimes/assets/westmint/src/constants.rs b/parachains/runtimes/assets/westmint/src/constants.rs index 032ed5c1f4a..8a94ad2ad9f 100644 --- a/parachains/runtimes/assets/westmint/src/constants.rs +++ b/parachains/runtimes/assets/westmint/src/constants.rs @@ -61,7 +61,7 @@ pub mod fee { // in Polkadot, extrinsic base weight (smallest non-zero weight) is mapped to 1/10 CENT: // in Statemint, we map to 1/10 of that, or 1/100 CENT let p = super::currency::CENTS; - let q = 100 * Balance::from(ExtrinsicBaseWeight::get()); + let q = 100 * Balance::from(ExtrinsicBaseWeight::get().ref_time()); smallvec![WeightToFeeCoefficient { degree: 1, negative: false, diff --git a/parachains/runtimes/assets/westmint/src/lib.rs b/parachains/runtimes/assets/westmint/src/lib.rs index a67de1fc01e..52a562cfd00 100644 --- a/parachains/runtimes/assets/westmint/src/lib.rs +++ b/parachains/runtimes/assets/westmint/src/lib.rs @@ -402,8 +402,8 @@ impl pallet_proxy::Config for Runtime { } parameter_types! { - pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT / 4; - pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT / 4; + pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.scalar_div(4); + pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.scalar_div(4); } impl cumulus_pallet_parachain_system::Config for Runtime { diff --git a/parachains/runtimes/assets/westmint/src/weights/block_weights.rs b/parachains/runtimes/assets/westmint/src/weights/block_weights.rs index 4db90f0c020..c171a1fdd71 100644 --- a/parachains/runtimes/assets/westmint/src/weights/block_weights.rs +++ b/parachains/runtimes/assets/westmint/src/weights/block_weights.rs @@ -23,7 +23,7 @@ pub mod constants { parameter_types! { /// Importing a block with 0 Extrinsics. - pub const BlockExecutionWeight: Weight = 5_000_000 * constants::WEIGHT_PER_NANOS; + pub const BlockExecutionWeight: Weight = constants::WEIGHT_PER_NANOS.scalar_saturating_mul(5_000_000); } #[cfg(test)] diff --git a/parachains/runtimes/assets/westmint/src/weights/cumulus_pallet_xcmp_queue.rs b/parachains/runtimes/assets/westmint/src/weights/cumulus_pallet_xcmp_queue.rs index 1fff43c3333..5529dac90d8 100644 --- a/parachains/runtimes/assets/westmint/src/weights/cumulus_pallet_xcmp_queue.rs +++ b/parachains/runtimes/assets/westmint/src/weights/cumulus_pallet_xcmp_queue.rs @@ -40,7 +40,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::Weight}; +use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}}; use sp_std::marker::PhantomData; /// Weight functions for `cumulus_pallet_xcmp_queue`. @@ -48,14 +48,14 @@ pub struct WeightInfo(PhantomData); impl cumulus_pallet_xcmp_queue::WeightInfo for WeightInfo { // Storage: XcmpQueue QueueConfig (r:1 w:1) fn set_config_with_u32() -> Weight { - (5_463_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(5_463_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: XcmpQueue QueueConfig (r:1 w:1) fn set_config_with_weight() -> Weight { - (5_221_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(5_221_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } } diff --git a/parachains/runtimes/assets/westmint/src/weights/extrinsic_weights.rs b/parachains/runtimes/assets/westmint/src/weights/extrinsic_weights.rs index 158ba99c6a4..6e162888356 100644 --- a/parachains/runtimes/assets/westmint/src/weights/extrinsic_weights.rs +++ b/parachains/runtimes/assets/westmint/src/weights/extrinsic_weights.rs @@ -23,7 +23,7 @@ pub mod constants { parameter_types! { /// Executing a NO-OP `System::remarks` Extrinsic. - pub const ExtrinsicBaseWeight: Weight = 125_000 * constants::WEIGHT_PER_NANOS; + pub const ExtrinsicBaseWeight: Weight = constants::WEIGHT_PER_NANOS.scalar_saturating_mul(125_000); } #[cfg(test)] diff --git a/parachains/runtimes/assets/westmint/src/weights/frame_system.rs b/parachains/runtimes/assets/westmint/src/weights/frame_system.rs index 1c3947980e7..be46954f69c 100644 --- a/parachains/runtimes/assets/westmint/src/weights/frame_system.rs +++ b/parachains/runtimes/assets/westmint/src/weights/frame_system.rs @@ -40,7 +40,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::Weight}; +use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}}; use sp_std::marker::PhantomData; /// Weight functions for `frame_system`. @@ -48,43 +48,43 @@ pub struct WeightInfo(PhantomData); impl frame_system::WeightInfo for WeightInfo { /// The range of component `b` is `[0, 3932160]`. fn remark(_b: u32, ) -> Weight { - (0 as Weight) + Weight::from_ref_time(0 as RefTimeWeight) } /// The range of component `b` is `[0, 3932160]`. fn remark_with_event(b: u32, ) -> Weight { - (0 as Weight) + Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 0 - .saturating_add((1_000 as Weight).saturating_mul(b as Weight)) + .saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).scalar_saturating_mul(b as RefTimeWeight)) } // Storage: System Digest (r:1 w:1) // Storage: unknown [0x3a686561707061676573] (r:0 w:1) fn set_heap_pages() -> Weight { - (5_726_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(5_726_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Skipped Metadata (r:0 w:0) /// The range of component `i` is `[1, 1000]`. fn set_storage(i: u32, ) -> Weight { - (0 as Weight) + Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add((616_000 as Weight).saturating_mul(i as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) + .saturating_add(Weight::from_ref_time(616_000 as RefTimeWeight).scalar_saturating_mul(i as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(i as RefTimeWeight))) } // Storage: Skipped Metadata (r:0 w:0) /// The range of component `i` is `[1, 1000]`. fn kill_storage(i: u32, ) -> Weight { - (0 as Weight) + Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add((519_000 as Weight).saturating_mul(i as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) + .saturating_add(Weight::from_ref_time(519_000 as RefTimeWeight).scalar_saturating_mul(i as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(i as RefTimeWeight))) } // Storage: Skipped Metadata (r:0 w:0) /// The range of component `p` is `[1, 1000]`. fn kill_prefix(p: u32, ) -> Weight { - (0 as Weight) + Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add((1_067_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(p as Weight))) + .saturating_add(Weight::from_ref_time(1_067_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(p as RefTimeWeight))) } } diff --git a/parachains/runtimes/assets/westmint/src/weights/pallet_assets.rs b/parachains/runtimes/assets/westmint/src/weights/pallet_assets.rs index ea6cfd174da..14f311be36f 100644 --- a/parachains/runtimes/assets/westmint/src/weights/pallet_assets.rs +++ b/parachains/runtimes/assets/westmint/src/weights/pallet_assets.rs @@ -40,7 +40,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::Weight}; +use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_assets`. @@ -48,15 +48,15 @@ pub struct WeightInfo(PhantomData); impl pallet_assets::WeightInfo for WeightInfo { // Storage: Assets Asset (r:1 w:1) fn create() -> Weight { - (25_905_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(25_905_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Assets Asset (r:1 w:1) fn force_create() -> Weight { - (14_977_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(14_977_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:5002 w:5001) @@ -67,169 +67,169 @@ impl pallet_assets::WeightInfo for WeightInfo { /// The range of component `s` is `[0, 5000]`. /// The range of component `a` is `[0, 500]`. fn destroy(c: u32, s: u32, a: u32, ) -> Weight { - (0 as Weight) + Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 46_000 - .saturating_add((16_133_000 as Weight).saturating_mul(c as Weight)) + .saturating_add(Weight::from_ref_time(16_133_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight)) // Standard Error: 46_000 - .saturating_add((18_915_000 as Weight).saturating_mul(s as Weight)) + .saturating_add(Weight::from_ref_time(18_915_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) // Standard Error: 464_000 - .saturating_add((16_795_000 as Weight).saturating_mul(a as Weight)) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(c as Weight))) - .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(s as Weight))) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(a as Weight))) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - .saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(c as Weight))) - .saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(s as Weight))) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(a as Weight))) + .saturating_add(Weight::from_ref_time(16_795_000 as RefTimeWeight).scalar_saturating_mul(a as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(5 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads((2 as RefTimeWeight).saturating_mul(c as RefTimeWeight))) + .saturating_add(T::DbWeight::get().reads((2 as RefTimeWeight).saturating_mul(s as RefTimeWeight))) + .saturating_add(T::DbWeight::get().reads((1 as RefTimeWeight).saturating_mul(a as RefTimeWeight))) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes((2 as RefTimeWeight).saturating_mul(c as RefTimeWeight))) + .saturating_add(T::DbWeight::get().writes((2 as RefTimeWeight).saturating_mul(s as RefTimeWeight))) + .saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(a as RefTimeWeight))) } // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:1 w:1) fn mint() -> Weight { - (29_903_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(29_903_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:1 w:1) fn burn() -> Weight { - (34_384_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(34_384_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:2 w:2) // Storage: System Account (r:1 w:1) fn transfer() -> Weight { - (48_218_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(48_218_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight)) } // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:2 w:2) // Storage: System Account (r:1 w:1) fn transfer_keep_alive() -> Weight { - (40_558_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(40_558_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight)) } // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:2 w:2) // Storage: System Account (r:1 w:1) fn force_transfer() -> Weight { - (48_330_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(48_330_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight)) } // Storage: Assets Asset (r:1 w:0) // Storage: Assets Account (r:1 w:1) fn freeze() -> Weight { - (21_218_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(21_218_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Assets Asset (r:1 w:0) // Storage: Assets Account (r:1 w:1) fn thaw() -> Weight { - (21_227_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(21_227_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Assets Asset (r:1 w:1) fn freeze_asset() -> Weight { - (17_906_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(17_906_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Assets Asset (r:1 w:1) fn thaw_asset() -> Weight { - (17_669_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(17_669_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Assets Asset (r:1 w:1) // Storage: Assets Metadata (r:1 w:0) fn transfer_ownership() -> Weight { - (18_756_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(18_756_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Assets Asset (r:1 w:1) fn set_team() -> Weight { - (17_203_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(17_203_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Assets Asset (r:1 w:0) // Storage: Assets Metadata (r:1 w:1) /// The range of component `n` is `[0, 50]`. /// The range of component `s` is `[0, 50]`. fn set_metadata(_n: u32, s: u32, ) -> Weight { - (31_757_000 as Weight) + Weight::from_ref_time(31_757_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add((3_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(3_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Assets Asset (r:1 w:0) // Storage: Assets Metadata (r:1 w:1) fn clear_metadata() -> Weight { - (31_669_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(31_669_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Assets Asset (r:1 w:0) // Storage: Assets Metadata (r:1 w:1) /// The range of component `n` is `[0, 50]`. /// The range of component `s` is `[0, 50]`. fn force_set_metadata(_n: u32, s: u32, ) -> Weight { - (18_566_000 as Weight) + Weight::from_ref_time(18_566_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Assets Asset (r:1 w:0) // Storage: Assets Metadata (r:1 w:1) fn force_clear_metadata() -> Weight { - (31_467_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(31_467_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Assets Asset (r:1 w:1) fn force_asset_status() -> Weight { - (16_275_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(16_275_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Assets Asset (r:1 w:1) // Storage: Assets Approvals (r:1 w:1) fn approve_transfer() -> Weight { - (34_436_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(34_436_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Assets Approvals (r:1 w:1) // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:2 w:2) // Storage: System Account (r:1 w:1) fn transfer_approved() -> Weight { - (60_445_000 as Weight) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(60_445_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(5 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(5 as RefTimeWeight)) } // Storage: Assets Asset (r:1 w:1) // Storage: Assets Approvals (r:1 w:1) fn cancel_approval() -> Weight { - (35_819_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(35_819_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Assets Asset (r:1 w:1) // Storage: Assets Approvals (r:1 w:1) fn force_cancel_approval() -> Weight { - (36_535_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(36_535_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } } diff --git a/parachains/runtimes/assets/westmint/src/weights/pallet_balances.rs b/parachains/runtimes/assets/westmint/src/weights/pallet_balances.rs index 14aa8f1ca7d..b76ea1e7e61 100644 --- a/parachains/runtimes/assets/westmint/src/weights/pallet_balances.rs +++ b/parachains/runtimes/assets/westmint/src/weights/pallet_balances.rs @@ -40,7 +40,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::Weight}; +use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_balances`. @@ -48,44 +48,44 @@ pub struct WeightInfo(PhantomData); impl pallet_balances::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) fn transfer() -> Weight { - (40_330_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(40_330_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: System Account (r:1 w:1) fn transfer_keep_alive() -> Weight { - (30_938_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(30_938_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: System Account (r:1 w:1) fn set_balance_creating() -> Weight { - (20_284_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(20_284_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: System Account (r:1 w:1) fn set_balance_killing() -> Weight { - (24_018_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(24_018_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: System Account (r:2 w:2) fn force_transfer() -> Weight { - (40_970_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(40_970_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: System Account (r:1 w:1) fn transfer_all() -> Weight { - (36_243_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(36_243_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: System Account (r:1 w:1) fn force_unreserve() -> Weight { - (18_374_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(18_374_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } } diff --git a/parachains/runtimes/assets/westmint/src/weights/pallet_collator_selection.rs b/parachains/runtimes/assets/westmint/src/weights/pallet_collator_selection.rs index 244ba48e355..6bee9003f9f 100644 --- a/parachains/runtimes/assets/westmint/src/weights/pallet_collator_selection.rs +++ b/parachains/runtimes/assets/westmint/src/weights/pallet_collator_selection.rs @@ -40,7 +40,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::Weight}; +use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_collator_selection`. @@ -50,21 +50,21 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Storage: CollatorSelection Invulnerables (r:0 w:1) /// The range of component `b` is `[1, 100]`. fn set_invulnerables(b: u32, ) -> Weight { - (6_669_000 as Weight) + Weight::from_ref_time(6_669_000 as RefTimeWeight) // Standard Error: 3_000 - .saturating_add((3_218_000 as Weight).saturating_mul(b as Weight)) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(b as Weight))) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(3_218_000 as RefTimeWeight).scalar_saturating_mul(b as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads((1 as RefTimeWeight).saturating_mul(b as RefTimeWeight))) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: CollatorSelection DesiredCandidates (r:0 w:1) fn set_desired_candidates() -> Weight { - (8_348_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(8_348_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: CollatorSelection CandidacyBond (r:0 w:1) fn set_candidacy_bond() -> Weight { - (8_592_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(8_592_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: CollatorSelection Candidates (r:1 w:1) // Storage: CollatorSelection DesiredCandidates (r:1 w:0) @@ -74,29 +74,29 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Storage: CollatorSelection LastAuthoredBlock (r:0 w:1) /// The range of component `c` is `[1, 1000]`. fn register_as_candidate(c: u32, ) -> Weight { - (55_542_000 as Weight) + Weight::from_ref_time(55_542_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add((92_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add(Weight::from_ref_time(92_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(5 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: CollatorSelection Candidates (r:1 w:1) // Storage: CollatorSelection LastAuthoredBlock (r:0 w:1) /// The range of component `c` is `[2, 1000]`. fn leave_intent(c: u32, ) -> Weight { - (52_080_000 as Weight) + Weight::from_ref_time(52_080_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add((109_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add(Weight::from_ref_time(109_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: System Account (r:2 w:2) // Storage: System BlockWeight (r:1 w:1) // Storage: CollatorSelection LastAuthoredBlock (r:0 w:1) fn note_author() -> Weight { - (31_546_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(31_546_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight)) } // Storage: CollatorSelection Candidates (r:1 w:1) // Storage: CollatorSelection LastAuthoredBlock (r:1000 w:1) @@ -106,13 +106,13 @@ impl pallet_collator_selection::WeightInfo for WeightIn /// The range of component `r` is `[1, 1000]`. /// The range of component `c` is `[1, 1000]`. fn new_session(r: u32, c: u32, ) -> Weight { - (0 as Weight) + Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 1_895_000 - .saturating_add((9_941_000 as Weight).saturating_mul(r as Weight)) + .saturating_add(Weight::from_ref_time(9_941_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) // Standard Error: 1_895_000 - .saturating_add((50_628_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(c as Weight))) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(r as Weight))) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(c as Weight))) + .saturating_add(Weight::from_ref_time(50_628_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads((2 as RefTimeWeight).saturating_mul(c as RefTimeWeight))) + .saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(r as RefTimeWeight))) + .saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(c as RefTimeWeight))) } } diff --git a/parachains/runtimes/assets/westmint/src/weights/pallet_multisig.rs b/parachains/runtimes/assets/westmint/src/weights/pallet_multisig.rs index cc762c46240..ab8bf52813d 100644 --- a/parachains/runtimes/assets/westmint/src/weights/pallet_multisig.rs +++ b/parachains/runtimes/assets/westmint/src/weights/pallet_multisig.rs @@ -40,7 +40,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::Weight}; +use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_multisig`. @@ -48,22 +48,22 @@ pub struct WeightInfo(PhantomData); impl pallet_multisig::WeightInfo for WeightInfo { /// The range of component `z` is `[0, 10000]`. fn as_multi_threshold_1(z: u32, ) -> Weight { - (17_854_000 as Weight) + Weight::from_ref_time(17_854_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add((1_000 as Weight).saturating_mul(z as Weight)) + .saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).scalar_saturating_mul(z as RefTimeWeight)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) /// The range of component `s` is `[2, 100]`. /// The range of component `z` is `[0, 10000]`. fn as_multi_create(s: u32, z: u32, ) -> Weight { - (36_613_000 as Weight) + Weight::from_ref_time(36_613_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add((96_000 as Weight).saturating_mul(s as Weight)) + .saturating_add(Weight::from_ref_time(96_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) // Standard Error: 0 - .saturating_add((1_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).scalar_saturating_mul(z as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:1) @@ -71,38 +71,38 @@ impl pallet_multisig::WeightInfo for WeightInfo { /// The range of component `s` is `[2, 100]`. /// The range of component `z` is `[0, 10000]`. fn as_multi_create_store(s: u32, z: u32, ) -> Weight { - (40_039_000 as Weight) + Weight::from_ref_time(40_039_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add((72_000 as Weight).saturating_mul(s as Weight)) + .saturating_add(Weight::from_ref_time(72_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(z as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Multisig Multisigs (r:1 w:1) /// The range of component `s` is `[3, 100]`. /// The range of component `z` is `[0, 10000]`. fn as_multi_approve(s: u32, z: u32, ) -> Weight { - (26_059_000 as Weight) + Weight::from_ref_time(26_059_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add((82_000 as Weight).saturating_mul(s as Weight)) + .saturating_add(Weight::from_ref_time(82_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) // Standard Error: 0 - .saturating_add((1_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).scalar_saturating_mul(z as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:1) /// The range of component `s` is `[3, 100]`. /// The range of component `z` is `[0, 10000]`. fn as_multi_approve_store(s: u32, z: u32, ) -> Weight { - (38_292_000 as Weight) + Weight::from_ref_time(38_292_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add((90_000 as Weight).saturating_mul(s as Weight)) + .saturating_add(Weight::from_ref_time(90_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(z as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:1) @@ -110,53 +110,53 @@ impl pallet_multisig::WeightInfo for WeightInfo { /// The range of component `s` is `[2, 100]`. /// The range of component `z` is `[0, 10000]`. fn as_multi_complete(s: u32, z: u32, ) -> Weight { - (47_468_000 as Weight) + Weight::from_ref_time(47_468_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add((129_000 as Weight).saturating_mul(s as Weight)) + .saturating_add(Weight::from_ref_time(129_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(z as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) /// The range of component `s` is `[2, 100]`. fn approve_as_multi_create(s: u32, ) -> Weight { - (33_492_000 as Weight) + Weight::from_ref_time(33_492_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add((110_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(110_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:0) /// The range of component `s` is `[2, 100]`. fn approve_as_multi_approve(s: u32, ) -> Weight { - (22_147_000 as Weight) + Weight::from_ref_time(22_147_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add((113_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(113_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:1) // Storage: System Account (r:1 w:1) /// The range of component `s` is `[2, 100]`. fn approve_as_multi_complete(s: u32, ) -> Weight { - (66_106_000 as Weight) + Weight::from_ref_time(66_106_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add((161_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + .saturating_add(Weight::from_ref_time(161_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:1) /// The range of component `s` is `[2, 100]`. fn cancel_as_multi(s: u32, ) -> Weight { - (52_566_000 as Weight) + Weight::from_ref_time(52_566_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add((117_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add(Weight::from_ref_time(117_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } } diff --git a/parachains/runtimes/assets/westmint/src/weights/pallet_proxy.rs b/parachains/runtimes/assets/westmint/src/weights/pallet_proxy.rs index 8ec439c9ae8..4268eb2f1ba 100644 --- a/parachains/runtimes/assets/westmint/src/weights/pallet_proxy.rs +++ b/parachains/runtimes/assets/westmint/src/weights/pallet_proxy.rs @@ -40,7 +40,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::Weight}; +use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_proxy`. @@ -49,10 +49,10 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Storage: Proxy Proxies (r:1 w:0) /// The range of component `p` is `[1, 31]`. fn proxy(p: u32, ) -> Weight { - (18_084_000 as Weight) + Weight::from_ref_time(18_084_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add((83_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) + .saturating_add(Weight::from_ref_time(83_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) } // Storage: Proxy Proxies (r:1 w:0) // Storage: Proxy Announcements (r:1 w:1) @@ -60,39 +60,39 @@ impl pallet_proxy::WeightInfo for WeightInfo { /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. fn proxy_announced(a: u32, p: u32, ) -> Weight { - (35_619_000 as Weight) + Weight::from_ref_time(35_619_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add((172_000 as Weight).saturating_mul(a as Weight)) + .saturating_add(Weight::from_ref_time(172_000 as RefTimeWeight).scalar_saturating_mul(a as RefTimeWeight)) // Standard Error: 2_000 - .saturating_add((89_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add(Weight::from_ref_time(89_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Proxy Announcements (r:1 w:1) // Storage: System Account (r:1 w:1) /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. fn remove_announcement(a: u32, p: u32, ) -> Weight { - (24_774_000 as Weight) + Weight::from_ref_time(24_774_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add((190_000 as Weight).saturating_mul(a as Weight)) + .saturating_add(Weight::from_ref_time(190_000 as RefTimeWeight).scalar_saturating_mul(a as RefTimeWeight)) // Standard Error: 2_000 - .saturating_add((33_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add(Weight::from_ref_time(33_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Proxy Announcements (r:1 w:1) // Storage: System Account (r:1 w:1) /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. fn reject_announcement(a: u32, p: u32, ) -> Weight { - (25_855_000 as Weight) + Weight::from_ref_time(25_855_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add((160_000 as Weight).saturating_mul(a as Weight)) + .saturating_add(Weight::from_ref_time(160_000 as RefTimeWeight).scalar_saturating_mul(a as RefTimeWeight)) // Standard Error: 1_000 - .saturating_add((15_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add(Weight::from_ref_time(15_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Proxy Proxies (r:1 w:0) // Storage: Proxy Announcements (r:1 w:1) @@ -100,58 +100,58 @@ impl pallet_proxy::WeightInfo for WeightInfo { /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. fn announce(a: u32, p: u32, ) -> Weight { - (32_874_000 as Weight) + Weight::from_ref_time(32_874_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add((172_000 as Weight).saturating_mul(a as Weight)) + .saturating_add(Weight::from_ref_time(172_000 as RefTimeWeight).scalar_saturating_mul(a as RefTimeWeight)) // Standard Error: 2_000 - .saturating_add((97_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add(Weight::from_ref_time(97_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Proxy Proxies (r:1 w:1) /// The range of component `p` is `[1, 31]`. fn add_proxy(p: u32, ) -> Weight { - (28_312_000 as Weight) + Weight::from_ref_time(28_312_000 as RefTimeWeight) // Standard Error: 4_000 - .saturating_add((105_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(105_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Proxy Proxies (r:1 w:1) /// The range of component `p` is `[1, 31]`. fn remove_proxy(p: u32, ) -> Weight { - (28_197_000 as Weight) + Weight::from_ref_time(28_197_000 as RefTimeWeight) // Standard Error: 4_000 - .saturating_add((121_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(121_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Proxy Proxies (r:1 w:1) /// The range of component `p` is `[1, 31]`. fn remove_proxies(p: u32, ) -> Weight { - (23_659_000 as Weight) + Weight::from_ref_time(23_659_000 as RefTimeWeight) // Standard Error: 8_000 - .saturating_add((106_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(106_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) // Storage: Proxy Proxies (r:1 w:1) /// The range of component `p` is `[1, 31]`. fn anonymous(p: u32, ) -> Weight { - (31_575_000 as Weight) + Weight::from_ref_time(31_575_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add((35_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(35_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Proxy Proxies (r:1 w:1) /// The range of component `p` is `[0, 30]`. fn kill_anonymous(p: u32, ) -> Weight { - (24_640_000 as Weight) + Weight::from_ref_time(24_640_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add((80_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(80_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } } diff --git a/parachains/runtimes/assets/westmint/src/weights/pallet_session.rs b/parachains/runtimes/assets/westmint/src/weights/pallet_session.rs index 949e1c64efa..9463c5747e2 100644 --- a/parachains/runtimes/assets/westmint/src/weights/pallet_session.rs +++ b/parachains/runtimes/assets/westmint/src/weights/pallet_session.rs @@ -40,7 +40,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::Weight}; +use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_session`. @@ -49,15 +49,15 @@ impl pallet_session::WeightInfo for WeightInfo { // Storage: Session NextKeys (r:1 w:1) // Storage: Session KeyOwner (r:1 w:1) fn set_keys() -> Weight { - (16_457_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(16_457_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Session NextKeys (r:1 w:1) // Storage: Session KeyOwner (r:0 w:1) fn purge_keys() -> Weight { - (13_585_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(13_585_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } } diff --git a/parachains/runtimes/assets/westmint/src/weights/pallet_timestamp.rs b/parachains/runtimes/assets/westmint/src/weights/pallet_timestamp.rs index 296a565fcbb..a09dc7cf368 100644 --- a/parachains/runtimes/assets/westmint/src/weights/pallet_timestamp.rs +++ b/parachains/runtimes/assets/westmint/src/weights/pallet_timestamp.rs @@ -40,7 +40,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::Weight}; +use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_timestamp`. @@ -48,11 +48,11 @@ pub struct WeightInfo(PhantomData); impl pallet_timestamp::WeightInfo for WeightInfo { // Storage: Timestamp Now (r:1 w:1) fn set() -> Weight { - (6_762_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(6_762_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } fn on_finalize() -> Weight { - (2_387_000 as Weight) + Weight::from_ref_time(2_387_000 as RefTimeWeight) } } diff --git a/parachains/runtimes/assets/westmint/src/weights/pallet_uniques.rs b/parachains/runtimes/assets/westmint/src/weights/pallet_uniques.rs index fd90132bf02..031dd20d1c1 100644 --- a/parachains/runtimes/assets/westmint/src/weights/pallet_uniques.rs +++ b/parachains/runtimes/assets/westmint/src/weights/pallet_uniques.rs @@ -43,7 +43,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::Weight}; +use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_uniques`. @@ -53,17 +53,17 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: Uniques Class (r:1 w:1) // Storage: Uniques ClassAccount (r:0 w:1) fn create() -> Weight { - (27_462_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(27_462_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Uniques NextCollectionId (r:1 w:1) // Storage: Uniques Class (r:1 w:1) // Storage: Uniques ClassAccount (r:0 w:1) fn force_create() -> Weight { - (16_480_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(16_480_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Uniques Class (r:1 w:1) // Storage: Uniques Asset (r:1 w:0) @@ -77,191 +77,191 @@ impl pallet_uniques::WeightInfo for WeightInfo { /// The range of component `m` is `[0, 1000]`. /// The range of component `a` is `[0, 1000]`. fn destroy(n: u32, m: u32, a: u32, ) -> Weight { - (0 as Weight) + Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 18_000 - .saturating_add((10_956_000 as Weight).saturating_mul(n as Weight)) + .saturating_add(Weight::from_ref_time(10_956_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) // Standard Error: 18_000 - .saturating_add((1_654_000 as Weight).saturating_mul(m as Weight)) + .saturating_add(Weight::from_ref_time(1_654_000 as RefTimeWeight).scalar_saturating_mul(m as RefTimeWeight)) // Standard Error: 18_000 - .saturating_add((1_572_000 as Weight).saturating_mul(a as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(n as Weight))) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) - .saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(n as Weight))) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(m as Weight))) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(a as Weight))) + .saturating_add(Weight::from_ref_time(1_572_000 as RefTimeWeight).scalar_saturating_mul(a as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads((1 as RefTimeWeight).saturating_mul(n as RefTimeWeight))) + .saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes((2 as RefTimeWeight).saturating_mul(n as RefTimeWeight))) + .saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(m as RefTimeWeight))) + .saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(a as RefTimeWeight))) } // Storage: Uniques Asset (r:1 w:1) // Storage: Uniques Class (r:1 w:1) // Storage: Uniques CollectionMaxSupply (r:1 w:0) // Storage: Uniques Account (r:0 w:1) fn mint() -> Weight { - (36_074_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(36_074_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight)) } // Storage: Uniques Class (r:1 w:1) // Storage: Uniques Asset (r:1 w:1) // Storage: Uniques Account (r:0 w:1) // Storage: Uniques ItemPriceOf (r:0 w:1) fn burn() -> Weight { - (37_583_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(37_583_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight)) } // Storage: Uniques Class (r:1 w:0) // Storage: Uniques Asset (r:1 w:1) // Storage: Uniques Account (r:0 w:2) // Storage: Uniques ItemPriceOf (r:0 w:1) fn transfer() -> Weight { - (28_134_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(28_134_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight)) } // Storage: Uniques Class (r:1 w:1) // Storage: Uniques Asset (r:100 w:100) /// The range of component `i` is `[0, 5000]`. fn redeposit(i: u32, ) -> Weight { - (0 as Weight) + Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 16_000 - .saturating_add((12_715_000 as Weight).saturating_mul(i as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(i as Weight))) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) + .saturating_add(Weight::from_ref_time(12_715_000 as RefTimeWeight).scalar_saturating_mul(i as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads((1 as RefTimeWeight).saturating_mul(i as RefTimeWeight))) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(i as RefTimeWeight))) } // Storage: Uniques Asset (r:1 w:1) // Storage: Uniques Class (r:1 w:0) fn freeze() -> Weight { - (21_019_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(21_019_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Uniques Asset (r:1 w:1) // Storage: Uniques Class (r:1 w:0) fn thaw() -> Weight { - (21_907_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(21_907_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Uniques Class (r:1 w:1) fn freeze_collection() -> Weight { - (16_894_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(16_894_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Uniques Class (r:1 w:1) fn thaw_collection() -> Weight { - (16_650_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(16_650_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Uniques OwnershipAcceptance (r:1 w:1) // Storage: Uniques Class (r:1 w:1) // Storage: Uniques ClassAccount (r:0 w:2) fn transfer_ownership() -> Weight { - (25_095_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(25_095_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight)) } // Storage: Uniques Class (r:1 w:1) fn set_team() -> Weight { - (17_428_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(17_428_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Uniques Class (r:1 w:1) // Storage: Uniques ClassAccount (r:0 w:1) fn force_item_status() -> Weight { - (20_018_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(20_018_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Uniques Class (r:1 w:1) // Storage: Uniques InstanceMetadataOf (r:1 w:0) // Storage: Uniques Attribute (r:1 w:1) fn set_attribute() -> Weight { - (41_955_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(41_955_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Uniques Class (r:1 w:1) // Storage: Uniques InstanceMetadataOf (r:1 w:0) // Storage: Uniques Attribute (r:1 w:1) fn clear_attribute() -> Weight { - (40_201_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(40_201_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Uniques Class (r:1 w:1) // Storage: Uniques InstanceMetadataOf (r:1 w:1) fn set_metadata() -> Weight { - (33_630_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(33_630_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Uniques Class (r:1 w:1) // Storage: Uniques InstanceMetadataOf (r:1 w:1) fn clear_metadata() -> Weight { - (34_054_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(34_054_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Uniques Class (r:1 w:1) // Storage: Uniques ClassMetadataOf (r:1 w:1) fn set_collection_metadata() -> Weight { - (33_283_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(33_283_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Uniques Class (r:1 w:0) // Storage: Uniques ClassMetadataOf (r:1 w:1) fn clear_collection_metadata() -> Weight { - (31_298_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(31_298_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Uniques Class (r:1 w:0) // Storage: Uniques Asset (r:1 w:1) fn approve_transfer() -> Weight { - (22_430_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(22_430_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Uniques Class (r:1 w:0) // Storage: Uniques Asset (r:1 w:1) fn cancel_approval() -> Weight { - (23_005_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(23_005_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Uniques OwnershipAcceptance (r:1 w:1) fn set_accept_ownership() -> Weight { - (20_468_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(20_468_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Uniques CollectionMaxSupply (r:1 w:1) // Storage: Uniques Class (r:1 w:0) fn set_collection_max_supply() -> Weight { - (19_948_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(19_948_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Uniques Asset (r:1 w:0) // Storage: Uniques ItemPriceOf (r:0 w:1) fn set_price() -> Weight { - (19_487_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(19_487_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Uniques Asset (r:1 w:1) // Storage: Uniques ItemPriceOf (r:1 w:1) // Storage: Uniques Class (r:1 w:0) // Storage: Uniques Account (r:0 w:2) fn buy_item() -> Weight { - (39_973_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(39_973_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight)) } } diff --git a/parachains/runtimes/assets/westmint/src/weights/pallet_utility.rs b/parachains/runtimes/assets/westmint/src/weights/pallet_utility.rs index d8b3e0e1f3b..204fb572d9a 100644 --- a/parachains/runtimes/assets/westmint/src/weights/pallet_utility.rs +++ b/parachains/runtimes/assets/westmint/src/weights/pallet_utility.rs @@ -40,7 +40,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::Weight}; +use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_utility`. @@ -48,26 +48,26 @@ pub struct WeightInfo(PhantomData); impl pallet_utility::WeightInfo for WeightInfo { /// The range of component `c` is `[0, 1000]`. fn batch(c: u32, ) -> Weight { - (14_433_000 as Weight) + Weight::from_ref_time(14_433_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add((3_315_000 as Weight).saturating_mul(c as Weight)) + .saturating_add(Weight::from_ref_time(3_315_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight)) } fn as_derivative() -> Weight { - (5_234_000 as Weight) + Weight::from_ref_time(5_234_000 as RefTimeWeight) } /// The range of component `c` is `[0, 1000]`. fn batch_all(c: u32, ) -> Weight { - (16_023_000 as Weight) + Weight::from_ref_time(16_023_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add((3_466_000 as Weight).saturating_mul(c as Weight)) + .saturating_add(Weight::from_ref_time(3_466_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight)) } fn dispatch_as() -> Weight { - (12_588_000 as Weight) + Weight::from_ref_time(12_588_000 as RefTimeWeight) } /// The range of component `c` is `[0, 1000]`. fn force_batch(c: u32, ) -> Weight { - (16_094_000 as Weight) + Weight::from_ref_time(16_094_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add((3_280_000 as Weight).saturating_mul(c as Weight)) + .saturating_add(Weight::from_ref_time(3_280_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight)) } } diff --git a/parachains/runtimes/assets/westmint/src/weights/paritydb_weights.rs b/parachains/runtimes/assets/westmint/src/weights/paritydb_weights.rs index 843823c1bf3..8083ccb4001 100644 --- a/parachains/runtimes/assets/westmint/src/weights/paritydb_weights.rs +++ b/parachains/runtimes/assets/westmint/src/weights/paritydb_weights.rs @@ -25,8 +25,8 @@ pub mod constants { /// `ParityDB` can be enabled with a feature flag, but is still experimental. These weights /// are available for brave runtime engineers who may want to try this out as default. pub const ParityDbWeight: RuntimeDbWeight = RuntimeDbWeight { - read: 8_000 * constants::WEIGHT_PER_NANOS, - write: 50_000 * constants::WEIGHT_PER_NANOS, + read: 8_000 * constants::WEIGHT_PER_NANOS.ref_time(), + write: 50_000 * constants::WEIGHT_PER_NANOS.ref_time(), }; } diff --git a/parachains/runtimes/assets/westmint/src/weights/rocksdb_weights.rs b/parachains/runtimes/assets/westmint/src/weights/rocksdb_weights.rs index 05e06b0eabe..1db87f143f3 100644 --- a/parachains/runtimes/assets/westmint/src/weights/rocksdb_weights.rs +++ b/parachains/runtimes/assets/westmint/src/weights/rocksdb_weights.rs @@ -25,8 +25,8 @@ pub mod constants { /// By default, Substrate uses `RocksDB`, so this will be the weight used throughout /// the runtime. pub const RocksDbWeight: RuntimeDbWeight = RuntimeDbWeight { - read: 25_000 * constants::WEIGHT_PER_NANOS, - write: 100_000 * constants::WEIGHT_PER_NANOS, + read: 25_000 * constants::WEIGHT_PER_NANOS.ref_time(), + write: 100_000 * constants::WEIGHT_PER_NANOS.ref_time(), }; } diff --git a/parachains/runtimes/assets/westmint/src/xcm_config.rs b/parachains/runtimes/assets/westmint/src/xcm_config.rs index 4a2daa3380e..16d5b84b070 100644 --- a/parachains/runtimes/assets/westmint/src/xcm_config.rs +++ b/parachains/runtimes/assets/westmint/src/xcm_config.rs @@ -20,7 +20,6 @@ use super::{ use frame_support::{ match_types, parameter_types, traits::{Everything, PalletInfoAccess}, - weights::Weight, }; use pallet_xcm::XcmPassthrough; use parachains_common::{ @@ -131,7 +130,7 @@ pub type XcmOriginToTransactDispatchOrigin = ( parameter_types! { // One XCM operation is 1_000_000_000 weight - almost certainly a conservative estimate. - pub UnitWeightCost: Weight = 1_000_000_000; + pub UnitWeightCost: u64 = 1_000_000_000; pub const MaxInstructions: u32 = 100; pub XcmAssetFeesReceiver: Option = Authorship::author(); } diff --git a/parachains/runtimes/assets/westmint/tests/tests.rs b/parachains/runtimes/assets/westmint/tests/tests.rs index a967c85add3..1bd8f7c5ec8 100644 --- a/parachains/runtimes/assets/westmint/tests/tests.rs +++ b/parachains/runtimes/assets/westmint/tests/tests.rs @@ -1,6 +1,8 @@ use asset_test_utils::{ExtBuilder, RuntimeHelper}; use frame_support::{ - assert_noop, assert_ok, traits::PalletInfo, weights::WeightToFee as WeightToFeeT, + assert_noop, assert_ok, + traits::PalletInfo, + weights::{Weight, WeightToFee as WeightToFeeT}, }; use parachains_common::{AccountId, AuraId}; pub use westmint_runtime::{ @@ -50,7 +52,7 @@ fn test_asset_xcm_trader() { let bought = 4_000_000_000u64; // lets calculate amount needed - let amount_needed = WeightToFee::weight_to_fee(&bought); + let amount_needed = WeightToFee::weight_to_fee(&Weight::from_ref_time(bought)); let asset_multilocation = MultiLocation::new( 0, @@ -130,7 +132,7 @@ fn test_asset_xcm_trader_with_refund() { ); // lets calculate amount needed - let amount_bought = WeightToFee::weight_to_fee(&bought); + let amount_bought = WeightToFee::weight_to_fee(&Weight::from_ref_time(bought)); let asset: MultiAsset = (asset_multilocation.clone(), amount_bought).into(); @@ -144,7 +146,8 @@ fn test_asset_xcm_trader_with_refund() { let weight_used = bought / 2; // Make sure refurnd works. - let amount_refunded = WeightToFee::weight_to_fee(&(bought - weight_used)); + let amount_refunded = + WeightToFee::weight_to_fee(&Weight::from_ref_time(bought - weight_used)); assert_eq!( trader.refund_weight(bought - weight_used), @@ -155,7 +158,7 @@ fn test_asset_xcm_trader_with_refund() { drop(trader); // We only should have paid for half of the bought weight - let fees_paid = WeightToFee::weight_to_fee(&weight_used); + let fees_paid = WeightToFee::weight_to_fee(&Weight::from_ref_time(weight_used)); assert_eq!( Assets::balance(1, AccountId::from(ALICE)), @@ -207,7 +210,7 @@ fn test_asset_xcm_trader_refund_not_possible_since_amount_less_than_ed() { ), ); - let amount_bought = WeightToFee::weight_to_fee(&bought); + let amount_bought = WeightToFee::weight_to_fee(&Weight::from_ref_time(bought)); assert!( amount_bought < ExistentialDeposit::get(), @@ -266,7 +269,7 @@ fn test_that_buying_ed_refund_does_not_refund() { ), ); - let amount_bought = WeightToFee::weight_to_fee(&bought); + let amount_bought = WeightToFee::weight_to_fee(&Weight::from_ref_time(bought)); assert!( amount_bought < ExistentialDeposit::get(), diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/constants.rs b/parachains/runtimes/collectives/collectives-polkadot/src/constants.rs index 38853ae7e94..cc41d5c6378 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/constants.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/constants.rs @@ -71,7 +71,7 @@ pub mod fee { // in Polkadot, extrinsic base weight (smallest non-zero weight) is mapped to 1/10 CENT: // in a parachain, we map to 1/10 of that, or 1/100 CENT let p = super::currency::CENTS; - let q = 100 * Balance::from(ExtrinsicBaseWeight::get()); + let q = 100 * Balance::from(ExtrinsicBaseWeight::get().ref_time()); smallvec![WeightToFeeCoefficient { degree: 1, negative: false, diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/lib.rs b/parachains/runtimes/collectives/collectives-polkadot/src/lib.rs index 63cdc10fed3..bc256d3a5f7 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/lib.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/lib.rs @@ -338,8 +338,8 @@ impl pallet_proxy::Config for Runtime { } parameter_types! { - pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT / 4; - pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT / 4; + pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.scalar_div(4); + pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.scalar_div(4); } impl cumulus_pallet_parachain_system::Config for Runtime { diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/weights/block_weights.rs b/parachains/runtimes/collectives/collectives-polkadot/src/weights/block_weights.rs index 4db90f0c020..c171a1fdd71 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/weights/block_weights.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/weights/block_weights.rs @@ -23,7 +23,7 @@ pub mod constants { parameter_types! { /// Importing a block with 0 Extrinsics. - pub const BlockExecutionWeight: Weight = 5_000_000 * constants::WEIGHT_PER_NANOS; + pub const BlockExecutionWeight: Weight = constants::WEIGHT_PER_NANOS.scalar_saturating_mul(5_000_000); } #[cfg(test)] diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/weights/cumulus_pallet_xcmp_queue.rs b/parachains/runtimes/collectives/collectives-polkadot/src/weights/cumulus_pallet_xcmp_queue.rs index affda8a2915..334eef4e0f2 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/weights/cumulus_pallet_xcmp_queue.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/weights/cumulus_pallet_xcmp_queue.rs @@ -40,7 +40,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::Weight}; +use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}}; use sp_std::marker::PhantomData; /// Weight functions for `cumulus_pallet_xcmp_queue`. @@ -48,14 +48,14 @@ pub struct WeightInfo(PhantomData); impl cumulus_pallet_xcmp_queue::WeightInfo for WeightInfo { // Storage: XcmpQueue QueueConfig (r:1 w:1) fn set_config_with_u32() -> Weight { - (5_294_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(5_294_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: XcmpQueue QueueConfig (r:1 w:1) fn set_config_with_weight() -> Weight { - (5_180_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(5_180_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } } diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/weights/extrinsic_weights.rs b/parachains/runtimes/collectives/collectives-polkadot/src/weights/extrinsic_weights.rs index 158ba99c6a4..6e162888356 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/weights/extrinsic_weights.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/weights/extrinsic_weights.rs @@ -23,7 +23,7 @@ pub mod constants { parameter_types! { /// Executing a NO-OP `System::remarks` Extrinsic. - pub const ExtrinsicBaseWeight: Weight = 125_000 * constants::WEIGHT_PER_NANOS; + pub const ExtrinsicBaseWeight: Weight = constants::WEIGHT_PER_NANOS.scalar_saturating_mul(125_000); } #[cfg(test)] diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/weights/frame_system.rs b/parachains/runtimes/collectives/collectives-polkadot/src/weights/frame_system.rs index 69a9db7d683..2611ff4c722 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/weights/frame_system.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/weights/frame_system.rs @@ -40,7 +40,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::Weight}; +use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}}; use sp_std::marker::PhantomData; /// Weight functions for `frame_system`. @@ -48,43 +48,43 @@ pub struct WeightInfo(PhantomData); impl frame_system::WeightInfo for WeightInfo { /// The range of component `b` is `[0, 3932160]`. fn remark(_b: u32, ) -> Weight { - (0 as Weight) + Weight::from_ref_time(0 as RefTimeWeight) } /// The range of component `b` is `[0, 3932160]`. fn remark_with_event(b: u32, ) -> Weight { - (0 as Weight) + Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 0 - .saturating_add((1_000 as Weight).saturating_mul(b as Weight)) + .saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).scalar_saturating_mul(b as RefTimeWeight)) } // Storage: System Digest (r:1 w:1) // Storage: unknown [0x3a686561707061676573] (r:0 w:1) fn set_heap_pages() -> Weight { - (5_069_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(5_069_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Skipped Metadata (r:0 w:0) /// The range of component `i` is `[1, 1000]`. fn set_storage(i: u32, ) -> Weight { - (0 as Weight) + Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add((624_000 as Weight).saturating_mul(i as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) + .saturating_add(Weight::from_ref_time(624_000 as RefTimeWeight).scalar_saturating_mul(i as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(i as RefTimeWeight))) } // Storage: Skipped Metadata (r:0 w:0) /// The range of component `i` is `[1, 1000]`. fn kill_storage(i: u32, ) -> Weight { - (0 as Weight) + Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add((530_000 as Weight).saturating_mul(i as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) + .saturating_add(Weight::from_ref_time(530_000 as RefTimeWeight).scalar_saturating_mul(i as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(i as RefTimeWeight))) } // Storage: Skipped Metadata (r:0 w:0) /// The range of component `p` is `[1, 1000]`. fn kill_prefix(p: u32, ) -> Weight { - (0 as Weight) + Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add((1_059_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(p as Weight))) + .saturating_add(Weight::from_ref_time(1_059_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(p as RefTimeWeight))) } } diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_alliance.rs b/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_alliance.rs index bfa9e3e35b9..ecbda4eb2f6 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_alliance.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_alliance.rs @@ -40,7 +40,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::Weight}; +use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_alliance`. @@ -56,24 +56,24 @@ impl pallet_alliance::WeightInfo for WeightInfo { /// The range of component `y` is `[0, 90]`. /// The range of component `p` is `[1, 100]`. fn propose_proposed(_b: u32, _x: u32, _y: u32, p: u32, ) -> Weight { - (53_023_000 as Weight) + Weight::from_ref_time(53_023_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add((132_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + .saturating_add(Weight::from_ref_time(132_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight)) } // Storage: Alliance Members (r:2 w:0) // Storage: AllianceMotion Voting (r:1 w:1) /// The range of component `x` is `[3, 10]`. /// The range of component `y` is `[2, 90]`. fn vote(x: u32, y: u32, ) -> Weight { - (33_003_000 as Weight) + Weight::from_ref_time(33_003_000 as RefTimeWeight) // Standard Error: 106_000 - .saturating_add((312_000 as Weight).saturating_mul(x as Weight)) + .saturating_add(Weight::from_ref_time(312_000 as RefTimeWeight).scalar_saturating_mul(x as RefTimeWeight)) // Standard Error: 4_000 - .saturating_add((82_000 as Weight).saturating_mul(y as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(82_000 as RefTimeWeight).scalar_saturating_mul(y as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Alliance Members (r:1 w:0) // Storage: AllianceMotion ProposalOf (r:1 w:1) @@ -81,11 +81,11 @@ impl pallet_alliance::WeightInfo for WeightInfo { // Storage: AllianceMotion Voting (r:0 w:1) /// The range of component `p` is `[1, 100]`. fn veto(p: u32, ) -> Weight { - (27_289_000 as Weight) + Weight::from_ref_time(27_289_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add((131_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + .saturating_add(Weight::from_ref_time(131_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight)) } // Storage: Alliance Members (r:1 w:0) // Storage: AllianceMotion Voting (r:1 w:1) @@ -96,15 +96,15 @@ impl pallet_alliance::WeightInfo for WeightInfo { /// The range of component `y` is `[2, 90]`. /// The range of component `p` is `[1, 100]`. fn close_early_disapproved(x: u32, y: u32, p: u32, ) -> Weight { - (31_884_000 as Weight) + Weight::from_ref_time(31_884_000 as RefTimeWeight) // Standard Error: 72_000 - .saturating_add((358_000 as Weight).saturating_mul(x as Weight)) + .saturating_add(Weight::from_ref_time(358_000 as RefTimeWeight).scalar_saturating_mul(x as RefTimeWeight)) // Standard Error: 3_000 - .saturating_add((109_000 as Weight).saturating_mul(y as Weight)) + .saturating_add(Weight::from_ref_time(109_000 as RefTimeWeight).scalar_saturating_mul(y as RefTimeWeight)) // Standard Error: 2_000 - .saturating_add((109_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + .saturating_add(Weight::from_ref_time(109_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight)) } // Storage: Alliance Members (r:1 w:0) // Storage: AllianceMotion Voting (r:1 w:1) @@ -116,17 +116,17 @@ impl pallet_alliance::WeightInfo for WeightInfo { /// The range of component `y` is `[2, 90]`. /// The range of component `p` is `[1, 100]`. fn close_early_approved(b: u32, x: u32, y: u32, p: u32, ) -> Weight { - (43_205_000 as Weight) + Weight::from_ref_time(43_205_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) + .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(b as RefTimeWeight)) // Standard Error: 73_000 - .saturating_add((123_000 as Weight).saturating_mul(x as Weight)) + .saturating_add(Weight::from_ref_time(123_000 as RefTimeWeight).scalar_saturating_mul(x as RefTimeWeight)) // Standard Error: 2_000 - .saturating_add((91_000 as Weight).saturating_mul(y as Weight)) + .saturating_add(Weight::from_ref_time(91_000 as RefTimeWeight).scalar_saturating_mul(y as RefTimeWeight)) // Standard Error: 2_000 - .saturating_add((114_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + .saturating_add(Weight::from_ref_time(114_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(5 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight)) } // Storage: Alliance Members (r:1 w:0) // Storage: AllianceMotion Voting (r:1 w:1) @@ -139,15 +139,15 @@ impl pallet_alliance::WeightInfo for WeightInfo { /// The range of component `y` is `[2, 90]`. /// The range of component `p` is `[1, 100]`. fn close_disapproved(x: u32, y: u32, p: u32, ) -> Weight { - (49_769_000 as Weight) + Weight::from_ref_time(49_769_000 as RefTimeWeight) // Standard Error: 69_000 - .saturating_add((352_000 as Weight).saturating_mul(x as Weight)) + .saturating_add(Weight::from_ref_time(352_000 as RefTimeWeight).scalar_saturating_mul(x as RefTimeWeight)) // Standard Error: 2_000 - .saturating_add((81_000 as Weight).saturating_mul(y as Weight)) + .saturating_add(Weight::from_ref_time(81_000 as RefTimeWeight).scalar_saturating_mul(y as RefTimeWeight)) // Standard Error: 2_000 - .saturating_add((100_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + .saturating_add(Weight::from_ref_time(100_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(6 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight)) } // Storage: Alliance Members (r:1 w:0) // Storage: AllianceMotion Voting (r:1 w:1) @@ -160,15 +160,15 @@ impl pallet_alliance::WeightInfo for WeightInfo { /// The range of component `y` is `[2, 90]`. /// The range of component `p` is `[1, 100]`. fn close_approved(b: u32, _x: u32, y: u32, p: u32, ) -> Weight { - (40_901_000 as Weight) + Weight::from_ref_time(40_901_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add((3_000 as Weight).saturating_mul(b as Weight)) + .saturating_add(Weight::from_ref_time(3_000 as RefTimeWeight).scalar_saturating_mul(b as RefTimeWeight)) // Standard Error: 2_000 - .saturating_add((79_000 as Weight).saturating_mul(y as Weight)) + .saturating_add(Weight::from_ref_time(79_000 as RefTimeWeight).scalar_saturating_mul(y as RefTimeWeight)) // Standard Error: 2_000 - .saturating_add((102_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + .saturating_add(Weight::from_ref_time(102_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(5 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight)) } // Storage: Alliance Members (r:3 w:3) // Storage: AllianceMotion Members (r:1 w:1) @@ -176,55 +176,55 @@ impl pallet_alliance::WeightInfo for WeightInfo { /// The range of component `y` is `[0, 90]`. /// The range of component `z` is `[0, 100]`. fn init_members(_x: u32, y: u32, z: u32, ) -> Weight { - (39_647_000 as Weight) + Weight::from_ref_time(39_647_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add((123_000 as Weight).saturating_mul(y as Weight)) + .saturating_add(Weight::from_ref_time(123_000 as RefTimeWeight).scalar_saturating_mul(y as RefTimeWeight)) // Standard Error: 2_000 - .saturating_add((116_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + .saturating_add(Weight::from_ref_time(116_000 as RefTimeWeight).scalar_saturating_mul(z as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight)) } // Storage: Alliance Rule (r:0 w:1) fn set_rule() -> Weight { - (14_689_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(14_689_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Alliance Announcements (r:1 w:1) fn announce() -> Weight { - (15_988_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(15_988_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Alliance Announcements (r:1 w:1) fn remove_announcement() -> Weight { - (16_823_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(16_823_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Alliance UnscrupulousAccounts (r:1 w:0) // Storage: Alliance Members (r:4 w:1) // Storage: System Account (r:1 w:1) // Storage: Alliance DepositOf (r:0 w:1) fn join_alliance() -> Weight { - (46_340_000 as Weight) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(46_340_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(6 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight)) } // Storage: Alliance Members (r:4 w:1) // Storage: Alliance UnscrupulousAccounts (r:1 w:0) fn nominate_ally() -> Weight { - (36_225_000 as Weight) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(36_225_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(5 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Alliance Members (r:3 w:2) // Storage: AllianceMotion Proposals (r:1 w:0) // Storage: AllianceMotion Members (r:0 w:1) // Storage: AllianceMotion Prime (r:0 w:1) fn elevate_ally() -> Weight { - (30_236_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(30_236_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight)) } // Storage: Alliance UpForKicking (r:1 w:0) // Storage: Alliance Members (r:3 w:1) @@ -234,9 +234,9 @@ impl pallet_alliance::WeightInfo for WeightInfo { // Storage: AllianceMotion Members (r:0 w:1) // Storage: AllianceMotion Prime (r:0 w:1) fn retire() -> Weight { - (44_311_000 as Weight) - .saturating_add(T::DbWeight::get().reads(7 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(44_311_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(7 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(5 as RefTimeWeight)) } // Storage: Alliance Members (r:3 w:1) // Storage: AllianceMotion Proposals (r:1 w:0) @@ -246,34 +246,34 @@ impl pallet_alliance::WeightInfo for WeightInfo { // Storage: AllianceMotion Prime (r:0 w:1) // Storage: Alliance UpForKicking (r:0 w:1) fn kick_member() -> Weight { - (46_112_000 as Weight) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().writes(6 as Weight)) + Weight::from_ref_time(46_112_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(6 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(6 as RefTimeWeight)) } // Storage: Alliance UnscrupulousAccounts (r:1 w:1) // Storage: Alliance UnscrupulousWebsites (r:1 w:1) /// The range of component `n` is `[1, 100]`. /// The range of component `l` is `[1, 255]`. fn add_unscrupulous_items(n: u32, l: u32, ) -> Weight { - (0 as Weight) + Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add((1_300_000 as Weight).saturating_mul(n as Weight)) + .saturating_add(Weight::from_ref_time(1_300_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) // Standard Error: 1_000 - .saturating_add((125_000 as Weight).saturating_mul(l as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add(Weight::from_ref_time(125_000 as RefTimeWeight).scalar_saturating_mul(l as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Alliance UnscrupulousAccounts (r:1 w:1) // Storage: Alliance UnscrupulousWebsites (r:1 w:1) /// The range of component `n` is `[1, 100]`. /// The range of component `l` is `[1, 255]`. fn remove_unscrupulous_items(n: u32, l: u32, ) -> Weight { - (0 as Weight) + Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 197_000 - .saturating_add((34_156_000 as Weight).saturating_mul(n as Weight)) + .saturating_add(Weight::from_ref_time(34_156_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) // Standard Error: 87_000 - .saturating_add((7_042_000 as Weight).saturating_mul(l as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add(Weight::from_ref_time(7_042_000 as RefTimeWeight).scalar_saturating_mul(l as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } } diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_balances.rs b/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_balances.rs index 6d97bd946ee..b3bb1dd2135 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_balances.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_balances.rs @@ -40,7 +40,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::Weight}; +use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_balances`. @@ -48,44 +48,44 @@ pub struct WeightInfo(PhantomData); impl pallet_balances::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) fn transfer() -> Weight { - (39_576_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(39_576_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: System Account (r:1 w:1) fn transfer_keep_alive() -> Weight { - (30_212_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(30_212_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: System Account (r:1 w:1) fn set_balance_creating() -> Weight { - (19_428_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(19_428_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: System Account (r:1 w:1) fn set_balance_killing() -> Weight { - (22_526_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(22_526_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: System Account (r:2 w:2) fn force_transfer() -> Weight { - (38_737_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(38_737_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: System Account (r:1 w:1) fn transfer_all() -> Weight { - (35_648_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(35_648_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: System Account (r:1 w:1) fn force_unreserve() -> Weight { - (17_197_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(17_197_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } } diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_collator_selection.rs b/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_collator_selection.rs index 9213c294ced..251d664e393 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_collator_selection.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_collator_selection.rs @@ -40,7 +40,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::Weight}; +use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_collator_selection`. @@ -50,21 +50,21 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Storage: CollatorSelection Invulnerables (r:0 w:1) /// The range of component `b` is `[1, 100]`. fn set_invulnerables(b: u32, ) -> Weight { - (7_128_000 as Weight) + Weight::from_ref_time(7_128_000 as RefTimeWeight) // Standard Error: 4_000 - .saturating_add((3_105_000 as Weight).saturating_mul(b as Weight)) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(b as Weight))) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(3_105_000 as RefTimeWeight).scalar_saturating_mul(b as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads((1 as RefTimeWeight).saturating_mul(b as RefTimeWeight))) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: CollatorSelection DesiredCandidates (r:0 w:1) fn set_desired_candidates() -> Weight { - (7_922_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(7_922_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: CollatorSelection CandidacyBond (r:0 w:1) fn set_candidacy_bond() -> Weight { - (8_226_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(8_226_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: CollatorSelection Candidates (r:1 w:1) // Storage: CollatorSelection DesiredCandidates (r:1 w:0) @@ -74,29 +74,29 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Storage: CollatorSelection LastAuthoredBlock (r:0 w:1) /// The range of component `c` is `[1, 1000]`. fn register_as_candidate(c: u32, ) -> Weight { - (56_086_000 as Weight) + Weight::from_ref_time(56_086_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add((93_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add(Weight::from_ref_time(93_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(5 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: CollatorSelection Candidates (r:1 w:1) // Storage: CollatorSelection LastAuthoredBlock (r:0 w:1) /// The range of component `c` is `[6, 1000]`. fn leave_intent(c: u32, ) -> Weight { - (58_436_000 as Weight) + Weight::from_ref_time(58_436_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add((102_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add(Weight::from_ref_time(102_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: System Account (r:2 w:2) // Storage: System BlockWeight (r:1 w:1) // Storage: CollatorSelection LastAuthoredBlock (r:0 w:1) fn note_author() -> Weight { - (29_654_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(29_654_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight)) } // Storage: CollatorSelection Candidates (r:1 w:1) // Storage: CollatorSelection LastAuthoredBlock (r:1000 w:1) @@ -106,13 +106,13 @@ impl pallet_collator_selection::WeightInfo for WeightIn /// The range of component `r` is `[1, 1000]`. /// The range of component `c` is `[1, 1000]`. fn new_session(r: u32, c: u32, ) -> Weight { - (0 as Weight) + Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 1_911_000 - .saturating_add((9_907_000 as Weight).saturating_mul(r as Weight)) + .saturating_add(Weight::from_ref_time(9_907_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) // Standard Error: 1_911_000 - .saturating_add((50_916_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(c as Weight))) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(r as Weight))) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(c as Weight))) + .saturating_add(Weight::from_ref_time(50_916_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads((2 as RefTimeWeight).saturating_mul(c as RefTimeWeight))) + .saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(r as RefTimeWeight))) + .saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(c as RefTimeWeight))) } } diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_multisig.rs b/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_multisig.rs index 57cee1a56cb..9ab03863a00 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_multisig.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_multisig.rs @@ -40,7 +40,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::Weight}; +use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_multisig`. @@ -48,22 +48,22 @@ pub struct WeightInfo(PhantomData); impl pallet_multisig::WeightInfo for WeightInfo { /// The range of component `z` is `[0, 10000]`. fn as_multi_threshold_1(z: u32, ) -> Weight { - (17_905_000 as Weight) + Weight::from_ref_time(17_905_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add((1_000 as Weight).saturating_mul(z as Weight)) + .saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).scalar_saturating_mul(z as RefTimeWeight)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) /// The range of component `s` is `[2, 100]`. /// The range of component `z` is `[0, 10000]`. fn as_multi_create(s: u32, z: u32, ) -> Weight { - (34_787_000 as Weight) + Weight::from_ref_time(34_787_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add((105_000 as Weight).saturating_mul(s as Weight)) + .saturating_add(Weight::from_ref_time(105_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) // Standard Error: 0 - .saturating_add((1_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).scalar_saturating_mul(z as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:1) @@ -71,38 +71,38 @@ impl pallet_multisig::WeightInfo for WeightInfo { /// The range of component `s` is `[2, 100]`. /// The range of component `z` is `[0, 10000]`. fn as_multi_create_store(s: u32, z: u32, ) -> Weight { - (38_845_000 as Weight) + Weight::from_ref_time(38_845_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add((75_000 as Weight).saturating_mul(s as Weight)) + .saturating_add(Weight::from_ref_time(75_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(z as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Multisig Multisigs (r:1 w:1) /// The range of component `s` is `[3, 100]`. /// The range of component `z` is `[0, 10000]`. fn as_multi_approve(s: u32, z: u32, ) -> Weight { - (25_600_000 as Weight) + Weight::from_ref_time(25_600_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add((76_000 as Weight).saturating_mul(s as Weight)) + .saturating_add(Weight::from_ref_time(76_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) // Standard Error: 0 - .saturating_add((1_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).scalar_saturating_mul(z as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:1) /// The range of component `s` is `[3, 100]`. /// The range of component `z` is `[0, 10000]`. fn as_multi_approve_store(s: u32, z: u32, ) -> Weight { - (36_944_000 as Weight) + Weight::from_ref_time(36_944_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add((95_000 as Weight).saturating_mul(s as Weight)) + .saturating_add(Weight::from_ref_time(95_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(z as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:1) @@ -110,53 +110,53 @@ impl pallet_multisig::WeightInfo for WeightInfo { /// The range of component `s` is `[2, 100]`. /// The range of component `z` is `[0, 10000]`. fn as_multi_complete(s: u32, z: u32, ) -> Weight { - (46_014_000 as Weight) + Weight::from_ref_time(46_014_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add((126_000 as Weight).saturating_mul(s as Weight)) + .saturating_add(Weight::from_ref_time(126_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(z as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) /// The range of component `s` is `[2, 100]`. fn approve_as_multi_create(s: u32, ) -> Weight { - (31_616_000 as Weight) + Weight::from_ref_time(31_616_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add((117_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(117_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:0) /// The range of component `s` is `[2, 100]`. fn approve_as_multi_approve(s: u32, ) -> Weight { - (20_862_000 as Weight) + Weight::from_ref_time(20_862_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add((109_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(109_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:1) // Storage: System Account (r:1 w:1) /// The range of component `s` is `[2, 100]`. fn approve_as_multi_complete(s: u32, ) -> Weight { - (64_311_000 as Weight) + Weight::from_ref_time(64_311_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add((164_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + .saturating_add(Weight::from_ref_time(164_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:1) /// The range of component `s` is `[2, 100]`. fn cancel_as_multi(s: u32, ) -> Weight { - (51_181_000 as Weight) + Weight::from_ref_time(51_181_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add((110_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add(Weight::from_ref_time(110_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } } diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_proxy.rs b/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_proxy.rs index cfad3df2b9e..79afbf6a128 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_proxy.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_proxy.rs @@ -40,7 +40,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::Weight}; +use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_proxy`. @@ -49,10 +49,10 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Storage: Proxy Proxies (r:1 w:0) /// The range of component `p` is `[1, 31]`. fn proxy(p: u32, ) -> Weight { - (16_628_000 as Weight) + Weight::from_ref_time(16_628_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add((90_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) + .saturating_add(Weight::from_ref_time(90_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) } // Storage: Proxy Proxies (r:1 w:0) // Storage: Proxy Announcements (r:1 w:1) @@ -60,39 +60,39 @@ impl pallet_proxy::WeightInfo for WeightInfo { /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. fn proxy_announced(a: u32, p: u32, ) -> Weight { - (33_846_000 as Weight) + Weight::from_ref_time(33_846_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add((175_000 as Weight).saturating_mul(a as Weight)) + .saturating_add(Weight::from_ref_time(175_000 as RefTimeWeight).scalar_saturating_mul(a as RefTimeWeight)) // Standard Error: 3_000 - .saturating_add((88_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add(Weight::from_ref_time(88_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Proxy Announcements (r:1 w:1) // Storage: System Account (r:1 w:1) /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. fn remove_announcement(a: u32, p: u32, ) -> Weight { - (23_633_000 as Weight) + Weight::from_ref_time(23_633_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add((184_000 as Weight).saturating_mul(a as Weight)) + .saturating_add(Weight::from_ref_time(184_000 as RefTimeWeight).scalar_saturating_mul(a as RefTimeWeight)) // Standard Error: 2_000 - .saturating_add((29_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add(Weight::from_ref_time(29_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Proxy Announcements (r:1 w:1) // Storage: System Account (r:1 w:1) /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. fn reject_announcement(a: u32, p: u32, ) -> Weight { - (24_121_000 as Weight) + Weight::from_ref_time(24_121_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add((177_000 as Weight).saturating_mul(a as Weight)) + .saturating_add(Weight::from_ref_time(177_000 as RefTimeWeight).scalar_saturating_mul(a as RefTimeWeight)) // Standard Error: 2_000 - .saturating_add((15_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add(Weight::from_ref_time(15_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Proxy Proxies (r:1 w:0) // Storage: Proxy Announcements (r:1 w:1) @@ -100,58 +100,58 @@ impl pallet_proxy::WeightInfo for WeightInfo { /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. fn announce(a: u32, p: u32, ) -> Weight { - (31_509_000 as Weight) + Weight::from_ref_time(31_509_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add((172_000 as Weight).saturating_mul(a as Weight)) + .saturating_add(Weight::from_ref_time(172_000 as RefTimeWeight).scalar_saturating_mul(a as RefTimeWeight)) // Standard Error: 2_000 - .saturating_add((86_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add(Weight::from_ref_time(86_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Proxy Proxies (r:1 w:1) /// The range of component `p` is `[1, 31]`. fn add_proxy(p: u32, ) -> Weight { - (26_168_000 as Weight) + Weight::from_ref_time(26_168_000 as RefTimeWeight) // Standard Error: 4_000 - .saturating_add((127_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(127_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Proxy Proxies (r:1 w:1) /// The range of component `p` is `[1, 31]`. fn remove_proxy(p: u32, ) -> Weight { - (26_306_000 as Weight) + Weight::from_ref_time(26_306_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add((131_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(131_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Proxy Proxies (r:1 w:1) /// The range of component `p` is `[1, 31]`. fn remove_proxies(p: u32, ) -> Weight { - (22_287_000 as Weight) + Weight::from_ref_time(22_287_000 as RefTimeWeight) // Standard Error: 3_000 - .saturating_add((85_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(85_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) // Storage: Proxy Proxies (r:1 w:1) /// The range of component `p` is `[1, 31]`. fn anonymous(p: u32, ) -> Weight { - (29_260_000 as Weight) + Weight::from_ref_time(29_260_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add((38_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(38_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Proxy Proxies (r:1 w:1) /// The range of component `p` is `[0, 30]`. fn kill_anonymous(p: u32, ) -> Weight { - (23_012_000 as Weight) + Weight::from_ref_time(23_012_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add((97_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(97_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } } diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_session.rs b/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_session.rs index 14b53f1e6e3..f090d83650f 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_session.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_session.rs @@ -40,7 +40,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::Weight}; +use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_session`. @@ -49,15 +49,15 @@ impl pallet_session::WeightInfo for WeightInfo { // Storage: Session NextKeys (r:1 w:1) // Storage: Session KeyOwner (r:1 w:1) fn set_keys() -> Weight { - (15_802_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(15_802_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } // Storage: Session NextKeys (r:1 w:1) // Storage: Session KeyOwner (r:0 w:1) fn purge_keys() -> Weight { - (12_925_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(12_925_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } } diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_timestamp.rs b/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_timestamp.rs index 08a237a62cf..b3d37bdc773 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_timestamp.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_timestamp.rs @@ -40,7 +40,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::Weight}; +use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_timestamp`. @@ -48,11 +48,11 @@ pub struct WeightInfo(PhantomData); impl pallet_timestamp::WeightInfo for WeightInfo { // Storage: Timestamp Now (r:1 w:1) fn set() -> Weight { - (6_170_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(6_170_000 as RefTimeWeight) + .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) + .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } fn on_finalize() -> Weight { - (2_177_000 as Weight) + Weight::from_ref_time(2_177_000 as RefTimeWeight) } } diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_utility.rs b/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_utility.rs index 3cf818490b6..5e57bdda111 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_utility.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_utility.rs @@ -40,7 +40,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::Weight}; +use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_utility`. @@ -48,26 +48,26 @@ pub struct WeightInfo(PhantomData); impl pallet_utility::WeightInfo for WeightInfo { /// The range of component `c` is `[0, 1000]`. fn batch(c: u32, ) -> Weight { - (13_398_000 as Weight) + Weight::from_ref_time(13_398_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add((3_159_000 as Weight).saturating_mul(c as Weight)) + .saturating_add(Weight::from_ref_time(3_159_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight)) } fn as_derivative() -> Weight { - (4_668_000 as Weight) + Weight::from_ref_time(4_668_000 as RefTimeWeight) } /// The range of component `c` is `[0, 1000]`. fn batch_all(c: u32, ) -> Weight { - (10_742_000 as Weight) + Weight::from_ref_time(10_742_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add((3_375_000 as Weight).saturating_mul(c as Weight)) + .saturating_add(Weight::from_ref_time(3_375_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight)) } fn dispatch_as() -> Weight { - (11_022_000 as Weight) + Weight::from_ref_time(11_022_000 as RefTimeWeight) } /// The range of component `c` is `[0, 1000]`. fn force_batch(c: u32, ) -> Weight { - (14_280_000 as Weight) + Weight::from_ref_time(14_280_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add((3_150_000 as Weight).saturating_mul(c as Weight)) + .saturating_add(Weight::from_ref_time(3_150_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight)) } } diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/weights/paritydb_weights.rs b/parachains/runtimes/collectives/collectives-polkadot/src/weights/paritydb_weights.rs index 843823c1bf3..8083ccb4001 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/weights/paritydb_weights.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/weights/paritydb_weights.rs @@ -25,8 +25,8 @@ pub mod constants { /// `ParityDB` can be enabled with a feature flag, but is still experimental. These weights /// are available for brave runtime engineers who may want to try this out as default. pub const ParityDbWeight: RuntimeDbWeight = RuntimeDbWeight { - read: 8_000 * constants::WEIGHT_PER_NANOS, - write: 50_000 * constants::WEIGHT_PER_NANOS, + read: 8_000 * constants::WEIGHT_PER_NANOS.ref_time(), + write: 50_000 * constants::WEIGHT_PER_NANOS.ref_time(), }; } diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/weights/rocksdb_weights.rs b/parachains/runtimes/collectives/collectives-polkadot/src/weights/rocksdb_weights.rs index 05e06b0eabe..1db87f143f3 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/weights/rocksdb_weights.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/weights/rocksdb_weights.rs @@ -25,8 +25,8 @@ pub mod constants { /// By default, Substrate uses `RocksDB`, so this will be the weight used throughout /// the runtime. pub const RocksDbWeight: RuntimeDbWeight = RuntimeDbWeight { - read: 25_000 * constants::WEIGHT_PER_NANOS, - write: 100_000 * constants::WEIGHT_PER_NANOS, + read: 25_000 * constants::WEIGHT_PER_NANOS.ref_time(), + write: 100_000 * constants::WEIGHT_PER_NANOS.ref_time(), }; } diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs b/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs index 09869b67e72..f728a6d9cbc 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs @@ -20,7 +20,6 @@ use super::{ use frame_support::{ match_types, parameter_types, traits::{Everything, Nothing}, - weights::Weight, }; use pallet_xcm::XcmPassthrough; use parachains_common::{ @@ -100,7 +99,7 @@ pub type XcmOriginToTransactDispatchOrigin = ( parameter_types! { // One XCM operation is 1_000_000_000 weight - almost certainly a conservative estimate. - pub UnitWeightCost: Weight = 1_000_000_000; + pub UnitWeightCost: u64 = 1_000_000_000; pub const MaxInstructions: u32 = 100; } diff --git a/parachains/runtimes/contracts/contracts-rococo/src/constants.rs b/parachains/runtimes/contracts/contracts-rococo/src/constants.rs index fabc09d017a..6dccf0089ca 100644 --- a/parachains/runtimes/contracts/contracts-rococo/src/constants.rs +++ b/parachains/runtimes/contracts/contracts-rococo/src/constants.rs @@ -61,7 +61,7 @@ pub mod fee { // in Kusama, extrinsic base weight (smallest non-zero weight) is mapped to 1/10 CENT: // in Statemine, we map to 1/10 of that, or 1/100 CENT let p = super::currency::CENTS; - let q = 100 * Balance::from(ExtrinsicBaseWeight::get()); + let q = 100 * Balance::from(ExtrinsicBaseWeight::get().ref_time()); smallvec![WeightToFeeCoefficient { degree: 1, negative: false, diff --git a/parachains/runtimes/contracts/contracts-rococo/src/contracts.rs b/parachains/runtimes/contracts/contracts-rococo/src/contracts.rs index 47d8369d807..5f3d5310b8e 100644 --- a/parachains/runtimes/contracts/contracts-rococo/src/contracts.rs +++ b/parachains/runtimes/contracts/contracts-rococo/src/contracts.rs @@ -26,9 +26,9 @@ parameter_types! { RuntimeBlockWeights::get().max_block; // The weight needed for decoding the queue should be less or equal than a fifth // of the overall weight dedicated to the lazy deletion. - pub DeletionQueueDepth: u32 = ((DeletionWeightLimit::get() / ( - ::WeightInfo::on_initialize_per_queue_item(1) - - ::WeightInfo::on_initialize_per_queue_item(0) + pub DeletionQueueDepth: u32 = ((DeletionWeightLimit::get().ref_time() / ( + ::WeightInfo::on_initialize_per_queue_item(1).ref_time() - + ::WeightInfo::on_initialize_per_queue_item(0).ref_time() )) / 5) as u32; pub MySchedule: Schedule = Default::default(); } diff --git a/parachains/runtimes/contracts/contracts-rococo/src/lib.rs b/parachains/runtimes/contracts/contracts-rococo/src/lib.rs index 7b9ae48d505..b3740451807 100644 --- a/parachains/runtimes/contracts/contracts-rococo/src/lib.rs +++ b/parachains/runtimes/contracts/contracts-rococo/src/lib.rs @@ -49,7 +49,7 @@ use constants::{currency::*, fee::WeightToFee}; use frame_support::{ construct_runtime, parameter_types, traits::{ConstU128, ConstU16, ConstU32, ConstU64, ConstU8, Everything}, - weights::{ConstantMultiplier, DispatchClass}, + weights::{ConstantMultiplier, DispatchClass, Weight}, PalletId, }; use frame_system::limits::{BlockLength, BlockWeights}; @@ -64,9 +64,6 @@ use xcm_config::CollatorSelectionUpdateOrigin; #[cfg(any(feature = "std", test))] pub use sp_runtime::BuildStorage; -#[cfg(feature = "try-runtime")] -use frame_support::weights::Weight; - // Polkadot imports use polkadot_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate}; @@ -245,15 +242,20 @@ impl pallet_utility::Config for Runtime { type WeightInfo = pallet_utility::weights::SubstrateWeight; } +parameter_types! { + pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.scalar_div(4); + pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.scalar_div(4); +} + impl cumulus_pallet_parachain_system::Config for Runtime { type Event = Event; type OnSystemEvent = (); type SelfParaId = parachain_info::Pallet; type DmpMessageHandler = DmpQueue; - type ReservedDmpWeight = ConstU64<{ MAXIMUM_BLOCK_WEIGHT / 4 }>; + type ReservedDmpWeight = ReservedDmpWeight; type OutboundXcmpMessageSource = XcmpQueue; type XcmpMessageHandler = XcmpQueue; - type ReservedXcmpWeight = ConstU64<{ MAXIMUM_BLOCK_WEIGHT / 4 }>; + type ReservedXcmpWeight = ReservedXcmpWeight; type CheckAssociatedRelayNumber = RelayNumberStrictlyIncreases; } @@ -515,7 +517,7 @@ impl pallet_contracts_rpc_runtime_api::ContractsApi( origin: &MultiLocation, message: &mut Xcm, - max_weight: Weight, - weight_credit: &mut Weight, + max_weight: XCMWeight, + weight_credit: &mut XCMWeight, ) -> Result<(), ()> { Deny::should_execute(origin, message, max_weight, weight_credit)?; Allow::should_execute(origin, message, max_weight, weight_credit) @@ -179,8 +178,8 @@ impl ShouldExecute for DenyReserveTransferToRelayChain { fn should_execute( origin: &MultiLocation, message: &mut Xcm, - _max_weight: Weight, - _weight_credit: &mut Weight, + _max_weight: XCMWeight, + _weight_credit: &mut XCMWeight, ) -> Result<(), ()> { if message.0.iter().any(|inst| { matches!( diff --git a/parachains/runtimes/testing/rococo-parachain/src/lib.rs b/parachains/runtimes/testing/rococo-parachain/src/lib.rs index cc123ddb2e2..f0729485f51 100644 --- a/parachains/runtimes/testing/rococo-parachain/src/lib.rs +++ b/parachains/runtimes/testing/rococo-parachain/src/lib.rs @@ -132,7 +132,7 @@ const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(10); /// by Operational extrinsics. const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75); /// We allow for .5 seconds of compute with a 12 second average block time. -const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND / 2; +const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND.scalar_div(2); parameter_types! { pub const BlockHashCount: BlockNumber = 250; @@ -254,8 +254,8 @@ impl pallet_sudo::Config for Runtime { } parameter_types! { - pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT / 4; - pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT / 4; + pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.scalar_div(4); + pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.scalar_div(4); } impl cumulus_pallet_parachain_system::Config for Runtime { @@ -358,7 +358,7 @@ pub type XcmOriginToTransactDispatchOrigin = ( parameter_types! { // One XCM operation is 1_000_000_000 weight - almost certainly a conservative estimate. - pub UnitWeightCost: Weight = 1_000_000_000; + pub UnitWeightCost: u64 = 1_000_000_000; // One ROC buys 1 second of weight. pub const WeightPrice: (MultiLocation, u128) = (MultiLocation::parent(), ROC); pub const MaxInstructions: u32 = 100; diff --git a/primitives/utility/src/lib.rs b/primitives/utility/src/lib.rs index ea7a81f327d..2ed99394a6c 100644 --- a/primitives/utility/src/lib.rs +++ b/primitives/utility/src/lib.rs @@ -28,7 +28,10 @@ use frame_support::{ use sp_runtime::{traits::Saturating, SaturatedConversion}; use sp_std::marker::PhantomData; -use xcm::{latest::prelude::*, WrapVersion}; +use xcm::{ + latest::{prelude::*, Weight as XCMWeight}, + WrapVersion, +}; use xcm_builder::TakeRevenue; use xcm_executor::traits::{MatchesFungibles, TransactAsset, WeightTrader}; /// Xcm router which recognises the `Parent` destination and handles it by sending the message into @@ -105,7 +108,7 @@ impl< // If everything goes well, we charge. fn buy_weight( &mut self, - weight: Weight, + weight: XCMWeight, payment: xcm_executor::Assets, ) -> Result { log::trace!(target: "xcm::weight", "TakeFirstAssetTrader::buy_weight weight: {:?}, payment: {:?}", weight, payment); @@ -115,6 +118,8 @@ impl< return Err(XcmError::NotWithdrawable) } + let weight = Weight::from_ref_time(weight); + // We take the very first multiasset from payment let multiassets: MultiAssets = payment.clone().into(); @@ -155,14 +160,14 @@ impl< Ok(unused) } - fn refund_weight(&mut self, weight: Weight) -> Option { + fn refund_weight(&mut self, weight: XCMWeight) -> Option { log::trace!(target: "xcm::weight", "TakeFirstAssetTrader::refund_weight weight: {:?}", weight); if let Some(AssetTraderRefunder { mut weight_outstanding, outstanding_concrete_asset: MultiAsset { id, fun }, }) = self.0.clone() { - let weight = weight.min(weight_outstanding); + let weight = Weight::from_ref_time(weight).min(weight_outstanding); // Get the local asset id in which we can refund fees let (local_asset_id, outstanding_balance) = diff --git a/test/runtime/src/lib.rs b/test/runtime/src/lib.rs index b6567887cdd..7feb25aa26a 100644 --- a/test/runtime/src/lib.rs +++ b/test/runtime/src/lib.rs @@ -138,7 +138,7 @@ const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(10); /// by Operational extrinsics. const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75); /// We allow for .5 seconds of compute with a 12 second average block time. -const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND / 2; +const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND.scalar_div(2); parameter_types! { pub const BlockHashCount: BlockNumber = 250; @@ -348,8 +348,7 @@ pub struct TestOnRuntimeUpgrade; impl OnRuntimeUpgrade for TestOnRuntimeUpgrade { fn on_runtime_upgrade() -> frame_support::weights::Weight { assert_eq!(sp_io::storage::get(TEST_RUNTIME_UPGRADE_KEY), Some(vec![1, 2, 3, 4].into())); - - 1 + Weight::one() } } diff --git a/test/service/src/lib.rs b/test/service/src/lib.rs index 9132983e3eb..c0a0067ec30 100644 --- a/test/service/src/lib.rs +++ b/test/service/src/lib.rs @@ -28,6 +28,7 @@ use std::{ }; use url::Url; +use crate::runtime::Weight; use cumulus_client_cli::CollatorOptions; use cumulus_client_consensus_common::{ParachainCandidate, ParachainConsensus}; use cumulus_client_network::BlockAnnounceValidator; @@ -717,7 +718,10 @@ impl TestNode { let call = frame_system::Call::set_code { code: validation }; self.send_extrinsic( - runtime::SudoCall::sudo_unchecked_weight { call: Box::new(call.into()), weight: 1_000 }, + runtime::SudoCall::sudo_unchecked_weight { + call: Box::new(call.into()), + weight: Weight::from_ref_time(1_000), + }, Sr25519Keyring::Alice, ) .await