From 54cbd076c5571450dc93050becb3927ace9bb108 Mon Sep 17 00:00:00 2001 From: brenzi Date: Mon, 31 Jul 2023 19:18:54 +0100 Subject: [PATCH] add faucet and reputation-commitments pallets (#193) * first attempt * fmt * tx fee rpc fixes * fix benchmarks build * missing pallet integrations for benchmarks * taplo fmt * fix benchmakr build and add that build to CI * srtool stable * fix try-runtime * fix and rerun benchmarks --- .github/workflows/ci.yml | 45 +- Cargo.lock | 94 +++- polkadot-parachains/Cargo.toml | 1 + .../encointer-runtime/Cargo.toml | 15 +- .../encointer-runtime/src/lib.rs | 55 ++- .../src/weights/cumulus_pallet_xcmp_queue.rs | 27 +- .../src/weights/frame_system.rs | 96 +++- .../encointer-runtime/src/weights/mod.rs | 2 + .../src/weights/pallet_balances.rs | 103 +++- .../src/weights/pallet_collective.rs | 315 ++++++++---- .../src/weights/pallet_encointer_balances.rs | 39 +- .../src/weights/pallet_encointer_bazaar.rs | 74 ++- .../weights/pallet_encointer_ceremonies.rs | 448 +++++++++++++----- .../weights/pallet_encointer_communities.rs | 167 +++++-- .../src/weights/pallet_encointer_faucet.rs | 122 +++++ ...pallet_encointer_reputation_commitments.rs | 65 +++ .../src/weights/pallet_encointer_scheduler.rs | 67 ++- .../src/weights/pallet_membership.rs | 187 +++++--- .../src/weights/pallet_proxy.rs | 294 +++++++----- .../src/weights/pallet_timestamp.rs | 39 +- .../src/weights/pallet_treasury.rs | 109 +++-- .../src/weights/pallet_utility.rs | 64 ++- .../encointer-runtime/src/xcm_config.rs | 7 + polkadot-parachains/launch-runtime/Cargo.toml | 4 +- .../launch-runtime/src/xcm_config.rs | 7 + polkadot-parachains/runtime-common/src/lib.rs | 3 + polkadot-parachains/src/chain_spec.rs | 3 + polkadot-parachains/src/command.rs | 37 +- polkadot-parachains/src/rpc.rs | 9 +- scripts/benchmark_encointer_runtime.sh | 29 +- 30 files changed, 1886 insertions(+), 641 deletions(-) create mode 100644 polkadot-parachains/encointer-runtime/src/weights/pallet_encointer_faucet.rs create mode 100644 polkadot-parachains/encointer-runtime/src/weights/pallet_encointer_reputation_commitments.rs diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4b69e63e..3efd44fc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -72,6 +72,48 @@ jobs: name: encointer-collator-${{ github.sha }} path: target/release/encointer-collator + build_try_runtime_and_benchmark_binaries: + name: extra flags build ${{ matrix.binary }} for ${{ matrix.rust-target }} on (${{ matrix.os }}) + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-20.04] + rust: [stable] + binary: [release] + env: + RUST_BACKTRACE: full + RUSTV: ${{ matrix.rust }} + TARGET: ${{ matrix.rust-target }} + RUST_BIN_DIR: target/${{ matrix.rust-target }}/debug + RELEASE_NAME: debug + steps: + - uses: actions/checkout@v3 + - name: Install protoc + run: sudo apt-get install protobuf-compiler + + - name: Print env + run: | + echo "RUST_BIN_DIR = ${{ env.RUST_BIN_DIR }} " + + # With rustup's nice new toml format, we just need to run rustup show to install the toolchain + # https://github.com/actions-rs/toolchain/issues/126#issuecomment-782989659 + - name: Setup Rust toolchain + run: rustup show + + - uses: Swatinem/rust-cache@v2 + with: + key: ${{ matrix.os }}-${{ env.RUST_BIN_DIR }}-${{ matrix.binary }} + + - name: Release + if: ${{ matrix.binary == 'release' }} + run: cargo build --locked --release --features try-runtime,runtime-benchmarks + + # Upload artifacts + - name: Upload encointer-collator + uses: actions/upload-artifact@v3 + with: + name: encointer-collator-benchmark-try-runtime-${{ github.sha }} + path: target/release/encointer-collator # Run all checks and unit test. This always run on debug mode check: @@ -134,7 +176,7 @@ jobs: - name: Install protoc run: sudo apt-get install protobuf-compiler - + - name: Cache target dir uses: actions/cache@v3 with: @@ -149,7 +191,6 @@ jobs: uses: chevdor/srtool-actions@v0.7.0 with: chain: ${{ matrix.runtime }} - tag: 1.66.1 runtime_dir: polkadot-parachains/${{ matrix.runtime }}-runtime - name: Summary diff --git a/Cargo.lock b/Cargo.lock index 588d5b18..e8ac8ab7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2448,7 +2448,7 @@ dependencies = [ [[package]] name = "encointer-balances-tx-payment" version = "1.0.0" -source = "git+https://github.com/encointer/pallets?branch=polkadot-v0.9.42-pallets-v1.3.0#c0084c23dd241e45cc09d8c6ac0e5f12e39abc43" +source = "git+https://github.com/encointer/pallets?branch=polkadot-v0.9.42-pallets-v1.3.0#fd903c2a9044dc137ee431e85b33e98cb935ffe5" dependencies = [ "encointer-primitives", "frame-support", @@ -2461,10 +2461,23 @@ dependencies = [ "sp-runtime", ] +[[package]] +name = "encointer-balances-tx-payment-rpc-runtime-api" +version = "1.0.0" +source = "git+https://github.com/encointer/pallets?branch=polkadot-v0.9.42-pallets-v1.3.0#fd903c2a9044dc137ee431e85b33e98cb935ffe5" +dependencies = [ + "encointer-primitives", + "frame-support", + "parity-scale-codec", + "scale-info", + "sp-api", + "sp-std", +] + [[package]] name = "encointer-ceremonies-assignment" version = "1.2.0" -source = "git+https://github.com/encointer/pallets?branch=polkadot-v0.9.42-pallets-v1.3.0#c0084c23dd241e45cc09d8c6ac0e5f12e39abc43" +source = "git+https://github.com/encointer/pallets?branch=polkadot-v0.9.42-pallets-v1.3.0#fd903c2a9044dc137ee431e85b33e98cb935ffe5" dependencies = [ "encointer-primitives", "sp-runtime", @@ -2489,6 +2502,7 @@ dependencies = [ "cumulus-relay-chain-inprocess-interface", "cumulus-relay-chain-interface", "cumulus-relay-chain-rpc-interface", + "encointer-balances-tx-payment-rpc-runtime-api", "encointer-runtime", "frame-benchmarking", "frame-benchmarking-cli", @@ -2556,7 +2570,7 @@ dependencies = [ [[package]] name = "encointer-meetup-validation" version = "1.2.0" -source = "git+https://github.com/encointer/pallets?branch=polkadot-v0.9.42-pallets-v1.3.0#c0084c23dd241e45cc09d8c6ac0e5f12e39abc43" +source = "git+https://github.com/encointer/pallets?branch=polkadot-v0.9.42-pallets-v1.3.0#fd903c2a9044dc137ee431e85b33e98cb935ffe5" dependencies = [ "encointer-primitives", "parity-scale-codec", @@ -2569,7 +2583,7 @@ dependencies = [ [[package]] name = "encointer-primitives" version = "1.3.0" -source = "git+https://github.com/encointer/pallets?branch=polkadot-v0.9.42-pallets-v1.3.0#c0084c23dd241e45cc09d8c6ac0e5f12e39abc43" +source = "git+https://github.com/encointer/pallets?branch=polkadot-v0.9.42-pallets-v1.3.0#fd903c2a9044dc137ee431e85b33e98cb935ffe5" dependencies = [ "bs58", "crc 2.1.0", @@ -2589,7 +2603,7 @@ dependencies = [ [[package]] name = "encointer-rpc" version = "0.1.0" -source = "git+https://github.com/encointer/pallets?branch=polkadot-v0.9.42-pallets-v1.3.0#c0084c23dd241e45cc09d8c6ac0e5f12e39abc43" +source = "git+https://github.com/encointer/pallets?branch=polkadot-v0.9.42-pallets-v1.3.0#fd903c2a9044dc137ee431e85b33e98cb935ffe5" dependencies = [ "jsonrpsee", "thiserror", @@ -2608,6 +2622,7 @@ dependencies = [ "cumulus-primitives-timestamp", "cumulus-primitives-utility", "encointer-balances-tx-payment", + "encointer-balances-tx-payment-rpc-runtime-api", "encointer-primitives", "frame-benchmarking", "frame-executive", @@ -2629,6 +2644,8 @@ dependencies = [ "pallet-encointer-ceremonies-rpc-runtime-api", "pallet-encointer-communities", "pallet-encointer-communities-rpc-runtime-api", + "pallet-encointer-faucet", + "pallet-encointer-reputation-commitments", "pallet-encointer-scheduler", "pallet-insecure-randomness-collective-flip", "pallet-membership", @@ -2732,7 +2749,7 @@ checksum = "e48c92028aaa870e83d51c64e5d4e0b6981b360c522198c23959f219a4e1b15b" [[package]] name = "ep-core" version = "1.2.0" -source = "git+https://github.com/encointer/pallets?branch=polkadot-v0.9.42-pallets-v1.3.0#c0084c23dd241e45cc09d8c6ac0e5f12e39abc43" +source = "git+https://github.com/encointer/pallets?branch=polkadot-v0.9.42-pallets-v1.3.0#fd903c2a9044dc137ee431e85b33e98cb935ffe5" dependencies = [ "impl-serde 0.3.2", "parity-scale-codec", @@ -6195,7 +6212,7 @@ dependencies = [ [[package]] name = "pallet-encointer-balances" version = "1.2.0" -source = "git+https://github.com/encointer/pallets?branch=polkadot-v0.9.42-pallets-v1.3.0#c0084c23dd241e45cc09d8c6ac0e5f12e39abc43" +source = "git+https://github.com/encointer/pallets?branch=polkadot-v0.9.42-pallets-v1.3.0#fd903c2a9044dc137ee431e85b33e98cb935ffe5" dependencies = [ "approx", "encointer-primitives", @@ -6214,7 +6231,7 @@ dependencies = [ [[package]] name = "pallet-encointer-bazaar" version = "1.1.0" -source = "git+https://github.com/encointer/pallets?branch=polkadot-v0.9.42-pallets-v1.3.0#c0084c23dd241e45cc09d8c6ac0e5f12e39abc43" +source = "git+https://github.com/encointer/pallets?branch=polkadot-v0.9.42-pallets-v1.3.0#fd903c2a9044dc137ee431e85b33e98cb935ffe5" dependencies = [ "encointer-primitives", "frame-benchmarking", @@ -6231,7 +6248,7 @@ dependencies = [ [[package]] name = "pallet-encointer-bazaar-rpc" version = "1.0.0" -source = "git+https://github.com/encointer/pallets?branch=polkadot-v0.9.42-pallets-v1.3.0#c0084c23dd241e45cc09d8c6ac0e5f12e39abc43" +source = "git+https://github.com/encointer/pallets?branch=polkadot-v0.9.42-pallets-v1.3.0#fd903c2a9044dc137ee431e85b33e98cb935ffe5" dependencies = [ "encointer-primitives", "encointer-rpc", @@ -6250,7 +6267,7 @@ dependencies = [ [[package]] name = "pallet-encointer-bazaar-rpc-runtime-api" version = "1.0.0" -source = "git+https://github.com/encointer/pallets?branch=polkadot-v0.9.42-pallets-v1.3.0#c0084c23dd241e45cc09d8c6ac0e5f12e39abc43" +source = "git+https://github.com/encointer/pallets?branch=polkadot-v0.9.42-pallets-v1.3.0#fd903c2a9044dc137ee431e85b33e98cb935ffe5" dependencies = [ "encointer-primitives", "frame-support", @@ -6261,7 +6278,7 @@ dependencies = [ [[package]] name = "pallet-encointer-ceremonies" version = "1.2.0" -source = "git+https://github.com/encointer/pallets?branch=polkadot-v0.9.42-pallets-v1.3.0#c0084c23dd241e45cc09d8c6ac0e5f12e39abc43" +source = "git+https://github.com/encointer/pallets?branch=polkadot-v0.9.42-pallets-v1.3.0#fd903c2a9044dc137ee431e85b33e98cb935ffe5" dependencies = [ "encointer-ceremonies-assignment", "encointer-meetup-validation", @@ -6286,7 +6303,7 @@ dependencies = [ [[package]] name = "pallet-encointer-ceremonies-rpc" version = "1.2.0" -source = "git+https://github.com/encointer/pallets?branch=polkadot-v0.9.42-pallets-v1.3.0#c0084c23dd241e45cc09d8c6ac0e5f12e39abc43" +source = "git+https://github.com/encointer/pallets?branch=polkadot-v0.9.42-pallets-v1.3.0#fd903c2a9044dc137ee431e85b33e98cb935ffe5" dependencies = [ "encointer-primitives", "encointer-rpc", @@ -6305,7 +6322,7 @@ dependencies = [ [[package]] name = "pallet-encointer-ceremonies-rpc-runtime-api" version = "1.2.0" -source = "git+https://github.com/encointer/pallets?branch=polkadot-v0.9.42-pallets-v1.3.0#c0084c23dd241e45cc09d8c6ac0e5f12e39abc43" +source = "git+https://github.com/encointer/pallets?branch=polkadot-v0.9.42-pallets-v1.3.0#fd903c2a9044dc137ee431e85b33e98cb935ffe5" dependencies = [ "encointer-primitives", "frame-support", @@ -6316,7 +6333,7 @@ dependencies = [ [[package]] name = "pallet-encointer-communities" version = "1.3.0" -source = "git+https://github.com/encointer/pallets?branch=polkadot-v0.9.42-pallets-v1.3.0#c0084c23dd241e45cc09d8c6ac0e5f12e39abc43" +source = "git+https://github.com/encointer/pallets?branch=polkadot-v0.9.42-pallets-v1.3.0#fd903c2a9044dc137ee431e85b33e98cb935ffe5" dependencies = [ "encointer-primitives", "frame-benchmarking", @@ -6335,7 +6352,7 @@ dependencies = [ [[package]] name = "pallet-encointer-communities-rpc" version = "1.2.0" -source = "git+https://github.com/encointer/pallets?branch=polkadot-v0.9.42-pallets-v1.3.0#c0084c23dd241e45cc09d8c6ac0e5f12e39abc43" +source = "git+https://github.com/encointer/pallets?branch=polkadot-v0.9.42-pallets-v1.3.0#fd903c2a9044dc137ee431e85b33e98cb935ffe5" dependencies = [ "encointer-primitives", "encointer-rpc", @@ -6354,17 +6371,60 @@ dependencies = [ [[package]] name = "pallet-encointer-communities-rpc-runtime-api" version = "1.2.0" -source = "git+https://github.com/encointer/pallets?branch=polkadot-v0.9.42-pallets-v1.3.0#c0084c23dd241e45cc09d8c6ac0e5f12e39abc43" +source = "git+https://github.com/encointer/pallets?branch=polkadot-v0.9.42-pallets-v1.3.0#fd903c2a9044dc137ee431e85b33e98cb935ffe5" dependencies = [ "encointer-primitives", "sp-api", "sp-std", ] +[[package]] +name = "pallet-encointer-faucet" +version = "1.2.0" +source = "git+https://github.com/encointer/pallets?branch=polkadot-v0.9.42-pallets-v1.3.0#fd903c2a9044dc137ee431e85b33e98cb935ffe5" +dependencies = [ + "approx", + "encointer-primitives", + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "pallet-encointer-communities", + "pallet-encointer-reputation-commitments", + "pallet-treasury", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-encointer-reputation-commitments" +version = "1.2.0" +source = "git+https://github.com/encointer/pallets?branch=polkadot-v0.9.42-pallets-v1.3.0#fd903c2a9044dc137ee431e85b33e98cb935ffe5" +dependencies = [ + "approx", + "encointer-primitives", + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "pallet-encointer-ceremonies", + "pallet-encointer-communities", + "pallet-encointer-scheduler", + "pallet-timestamp", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-runtime", + "sp-std", +] + [[package]] name = "pallet-encointer-scheduler" version = "1.1.0" -source = "git+https://github.com/encointer/pallets?branch=polkadot-v0.9.42-pallets-v1.3.0#c0084c23dd241e45cc09d8c6ac0e5f12e39abc43" +source = "git+https://github.com/encointer/pallets?branch=polkadot-v0.9.42-pallets-v1.3.0#fd903c2a9044dc137ee431e85b33e98cb935ffe5" dependencies = [ "encointer-primitives", "frame-benchmarking", diff --git a/polkadot-parachains/Cargo.toml b/polkadot-parachains/Cargo.toml index 93549045..b629b1df 100644 --- a/polkadot-parachains/Cargo.toml +++ b/polkadot-parachains/Cargo.toml @@ -29,6 +29,7 @@ launch-runtime = { package = "launch-runtime", path = "launch-runtime" } parachain-runtime = { package = "encointer-runtime", path = "encointer-runtime" } # encointer dependencies +encointer-balances-tx-payment-rpc-runtime-api = { git = "https://github.com/encointer/pallets", branch = "polkadot-v0.9.42-pallets-v1.3.0" } pallet-encointer-bazaar-rpc = { git = "https://github.com/encointer/pallets", branch = "polkadot-v0.9.42-pallets-v1.3.0" } pallet-encointer-bazaar-rpc-runtime-api = { git = "https://github.com/encointer/pallets", branch = "polkadot-v0.9.42-pallets-v1.3.0" } pallet-encointer-ceremonies-rpc = { git = "https://github.com/encointer/pallets", branch = "polkadot-v0.9.42-pallets-v1.3.0" } diff --git a/polkadot-parachains/encointer-runtime/Cargo.toml b/polkadot-parachains/encointer-runtime/Cargo.toml index 66fdb47e..1ac8a071 100644 --- a/polkadot-parachains/encointer-runtime/Cargo.toml +++ b/polkadot-parachains/encointer-runtime/Cargo.toml @@ -22,6 +22,7 @@ serde = { version = "1.0.132", default-features = false, optional = true, featur # encointer deps encointer-balances-tx-payment = { default-features = false, git = "https://github.com/encointer/pallets", branch = "polkadot-v0.9.42-pallets-v1.3.0" } +encointer-balances-tx-payment-rpc-runtime-api = { default-features = false, git = "https://github.com/encointer/pallets", branch = "polkadot-v0.9.42-pallets-v1.3.0" } encointer-primitives = { default-features = false, git = "https://github.com/encointer/pallets", branch = "polkadot-v0.9.42-pallets-v1.3.0" } pallet-encointer-balances = { default-features = false, git = "https://github.com/encointer/pallets", branch = "polkadot-v0.9.42-pallets-v1.3.0" } pallet-encointer-bazaar = { default-features = false, git = "https://github.com/encointer/pallets", branch = "polkadot-v0.9.42-pallets-v1.3.0" } @@ -30,6 +31,8 @@ pallet-encointer-ceremonies = { default-features = false, git = "https://github. pallet-encointer-ceremonies-rpc-runtime-api = { default-features = false, git = "https://github.com/encointer/pallets", branch = "polkadot-v0.9.42-pallets-v1.3.0" } pallet-encointer-communities = { default-features = false, git = "https://github.com/encointer/pallets", branch = "polkadot-v0.9.42-pallets-v1.3.0" } pallet-encointer-communities-rpc-runtime-api = { default-features = false, git = "https://github.com/encointer/pallets", branch = "polkadot-v0.9.42-pallets-v1.3.0" } +pallet-encointer-faucet = { default-features = false, git = "https://github.com/encointer/pallets", branch = "polkadot-v0.9.42-pallets-v1.3.0" } +pallet-encointer-reputation-commitments = { default-features = false, git = "https://github.com/encointer/pallets", branch = "polkadot-v0.9.42-pallets-v1.3.0" } pallet-encointer-scheduler = { default-features = false, git = "https://github.com/encointer/pallets", branch = "polkadot-v0.9.42-pallets-v1.3.0" } runtime-common = { default-features = false, path = "../runtime-common" } @@ -98,9 +101,9 @@ substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", bran [features] default = ["std"] runtime-benchmarks = [ - "frame-benchmarking", + "frame-benchmarking/runtime-benchmarks", "frame-support/runtime-benchmarks", - "frame-system-benchmarking", + "frame-system-benchmarking/runtime-benchmarks", "hex-literal", "sp-runtime/runtime-benchmarks", "xcm-builder/runtime-benchmarks", @@ -112,6 +115,7 @@ runtime-benchmarks = [ "pallet-balances/runtime-benchmarks", "pallet-collective/runtime-benchmarks", "pallet-membership/runtime-benchmarks", + "pallet-proxy/runtime-benchmarks", "pallet-timestamp/runtime-benchmarks", "pallet-treasury/runtime-benchmarks", "pallet-utility/runtime-benchmarks", @@ -119,6 +123,8 @@ runtime-benchmarks = [ "pallet-encointer-bazaar/runtime-benchmarks", "pallet-encointer-ceremonies/runtime-benchmarks", "pallet-encointer-communities/runtime-benchmarks", + "pallet-encointer-faucet/runtime-benchmarks", + "pallet-encointer-reputation-commitments/runtime-benchmarks", "pallet-encointer-scheduler/runtime-benchmarks", ] std = [ @@ -172,6 +178,7 @@ std = [ # encointer "runtime-common/std", "encointer-balances-tx-payment/std", + "encointer-balances-tx-payment-rpc-runtime-api/std", "encointer-primitives/std", "encointer-primitives/serde_derive", "pallet-encointer-balances/std", @@ -181,6 +188,8 @@ std = [ "pallet-encointer-ceremonies-rpc-runtime-api/std", "pallet-encointer-communities/std", "pallet-encointer-communities-rpc-runtime-api/std", + "pallet-encointer-faucet/std", + "pallet-encointer-reputation-commitments/std", "pallet-encointer-scheduler/std", "frame-try-runtime/std", ] @@ -214,4 +223,6 @@ try-runtime = [ "pallet-encointer-communities/try-runtime", "pallet-encointer-balances/try-runtime", "pallet-encointer-bazaar/try-runtime", + "pallet-encointer-faucet/try-runtime", + "pallet-encointer-reputation-commitments/try-runtime", ] diff --git a/polkadot-parachains/encointer-runtime/src/lib.rs b/polkadot-parachains/encointer-runtime/src/lib.rs index 9fdc8728..506f753f 100644 --- a/polkadot-parachains/encointer-runtime/src/lib.rs +++ b/polkadot-parachains/encointer-runtime/src/lib.rs @@ -50,11 +50,15 @@ use sp_version::NativeVersion; use sp_version::RuntimeVersion; use codec::{Decode, Encode, MaxEncodedLen}; +use encointer_balances_tx_payment::{AssetBalanceOf, AssetIdOf, BalanceToCommunityBalance}; use frame_support::{ construct_runtime, dispatch::DispatchClass, parameter_types, - traits::{Contains, EitherOfDiverse, EqualPrivilegeOnly, InstanceFilter}, + traits::{ + tokens::ConversionToAssetBalance, Contains, EitherOfDiverse, EqualPrivilegeOnly, + InstanceFilter, + }, weights::{ConstantMultiplier, Weight}, PalletId, RuntimeDebug, }; @@ -63,6 +67,8 @@ use frame_system::{ EnsureRoot, }; pub use parachains_common as common; +pub use parachains_common::MILLISECS_PER_BLOCK; + use parachains_common::{ opaque, AuraId, AVERAGE_ON_INITIALIZE_RATIO, DAYS, HOURS, MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, SLOT_DURATION, @@ -78,6 +84,8 @@ pub use pallet_encointer_bazaar::Call as EncointerBazaarCall; pub use pallet_encointer_ceremonies::Call as EncointerCeremoniesCall; pub use pallet_encointer_communities::Call as EncointerCommunitiesCall; // pub use pallet_encointer_personhood_oracle::Call as EncointerPersonhoodOracleCall; +pub use pallet_encointer_faucet::Call as EncointerFaucetCall; +pub use pallet_encointer_reputation_commitments::Call as EncointerReputationCommitmentsCall; pub use pallet_encointer_scheduler::Call as EncointerSchedulerCall; // pub use pallet_encointer_sybil_gate_template::Call as EncointerSybilGateCall; @@ -110,6 +118,9 @@ pub(crate) use runtime_common::{ pub type Moment = u64; pub const ONE_DAY: Moment = 86_400_000; +pub type AssetId = AssetIdOf; +pub type AssetBalance = AssetBalanceOf; + impl_opaque_keys! { pub struct SessionKeys { pub aura: Aura, @@ -440,6 +451,7 @@ parameter_types! { pub const MeetupSizeTarget: u64 = 10; pub const MeetupMinSize: u64 = 3; pub const MeetupNewbieLimitDivider: u64 = 2; // 2 means 1/3 of participants may be newbies + pub const FaucetPalletId: PalletId = PalletId(*b"ectrfct0"); } impl pallet_encointer_scheduler::Config for Runtime { @@ -487,19 +499,18 @@ impl pallet_encointer_bazaar::Config for Runtime { type WeightInfo = weights::pallet_encointer_bazaar::WeightInfo; } -// impl pallet_encointer_personhood_oracle::Config for Runtime { -// type RuntimeEvent = RuntimeEvent; -// type XcmSender = XcmRouter; -// } -// -// impl pallet_encointer_sybil_gate_template::Config for Runtime { -// type RuntimeEvent = RuntimeEvent; -// type RuntimeCall = RuntimeCall; -// type XcmSender = XcmRouter; -// type Currency = Balances; -// type Public = ::Signer; -// type Signature = Signature; -// } +impl pallet_encointer_reputation_commitments::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type WeightInfo = weights::pallet_encointer_reputation_commitments::WeightInfo; +} + +impl pallet_encointer_faucet::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type ControllerOrigin = EnsureRoot; + type Currency = Balances; + type PalletId = FaucetPalletId; + type WeightInfo = weights::pallet_encointer_faucet::WeightInfo; +} impl pallet_aura::Config for Runtime { type AuthorityId = AuraId; @@ -601,9 +612,8 @@ construct_runtime! { EncointerCommunities: pallet_encointer_communities::{Pallet, Call, Storage, Config, Event} = 62, EncointerBalances: pallet_encointer_balances::{Pallet, Call, Storage, Config, Event} = 63, EncointerBazaar: pallet_encointer_bazaar::{Pallet, Call, Storage, Event} = 64, - // - // EncointerPersonhoodOracle: pallet_encointer_personhood_oracle::{Pallet, Call, Event} = 70, - // EncointerSybilGate: pallet_encointer_sybil_gate_template::{Pallet, Call, Storage, Event} = 71, + EncointerReputationCommitments: pallet_encointer_reputation_commitments::{Pallet, Call, Storage, Event} = 65, + EncointerFaucet: pallet_encointer_faucet::{Pallet, Call, Storage, Config, Event} = 66, } } @@ -665,10 +675,13 @@ mod benches { [pallet_timestamp, Timestamp] [pallet_treasury, Treasury] [pallet_utility, Utility] + [pallet_proxy, Proxy] [pallet_encointer_balances, EncointerBalances] [pallet_encointer_bazaar, EncointerBazaar] [pallet_encointer_ceremonies, EncointerCeremonies] [pallet_encointer_communities, EncointerCommunities] + [pallet_encointer_faucet, EncointerFaucet] + [pallet_encointer_reputation_commitments, EncointerReputationCommitments] [pallet_encointer_scheduler, EncointerScheduler] [cumulus_pallet_xcmp_queue, XcmpQueue] ); @@ -834,6 +847,14 @@ impl_runtime_apis! { } } + impl encointer_balances_tx_payment_rpc_runtime_api::BalancesTxPaymentApi for Runtime { + fn balance_to_asset_balance(amount: Balance, asset_id: AssetId) -> Result { + BalanceToCommunityBalance::::to_asset_balance(amount, asset_id).map_err(|_e| + encointer_balances_tx_payment_rpc_runtime_api::Error::RuntimeError + ) + } + } + #[cfg(feature = "try-runtime")] impl frame_try_runtime::TryRuntime for Runtime { fn on_runtime_upgrade(checks: frame_try_runtime::UpgradeCheckSelect) -> (Weight, Weight) { diff --git a/polkadot-parachains/encointer-runtime/src/weights/cumulus_pallet_xcmp_queue.rs b/polkadot-parachains/encointer-runtime/src/weights/cumulus_pallet_xcmp_queue.rs index 4417d4a9..f10766cb 100644 --- a/polkadot-parachains/encointer-runtime/src/weights/cumulus_pallet_xcmp_queue.rs +++ b/polkadot-parachains/encointer-runtime/src/weights/cumulus_pallet_xcmp_queue.rs @@ -2,7 +2,9 @@ //! Autogenerated weights for `cumulus_pallet_xcmp_queue` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-06-04, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `caribe`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("encointer-rococo-local-dev"), DB CACHE: 1024 // Executed Command: @@ -22,22 +24,35 @@ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +#![allow(missing_docs)] use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; +use core::marker::PhantomData; /// Weight functions for `cumulus_pallet_xcmp_queue`. pub struct WeightInfo(PhantomData); impl cumulus_pallet_xcmp_queue::WeightInfo for WeightInfo { - // Storage: XcmpQueue QueueConfig (r:1 w:1) + /// Storage: XcmpQueue QueueConfig (r:1 w:1) + /// Proof Skipped: XcmpQueue QueueConfig (max_values: Some(1), max_size: None, mode: Measured) fn set_config_with_u32() -> Weight { - Weight::from_parts(7_600_000, 0) + // Proof Size summary in bytes: + // Measured: `42` + // Estimated: `1527` + // Minimum execution time: 4_338_000 picoseconds. + Weight::from_parts(4_474_000, 0) + .saturating_add(Weight::from_parts(0, 1527)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: XcmpQueue QueueConfig (r:1 w:1) + /// Storage: XcmpQueue QueueConfig (r:1 w:1) + /// Proof Skipped: XcmpQueue QueueConfig (max_values: Some(1), max_size: None, mode: Measured) fn set_config_with_weight() -> Weight { - Weight::from_parts(7_700_000, 0) + // Proof Size summary in bytes: + // Measured: `42` + // Estimated: `1527` + // Minimum execution time: 4_285_000 picoseconds. + Weight::from_parts(4_439_000, 0) + .saturating_add(Weight::from_parts(0, 1527)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/polkadot-parachains/encointer-runtime/src/weights/frame_system.rs b/polkadot-parachains/encointer-runtime/src/weights/frame_system.rs index 6d2ebf2c..fdd4c1c0 100644 --- a/polkadot-parachains/encointer-runtime/src/weights/frame_system.rs +++ b/polkadot-parachains/encointer-runtime/src/weights/frame_system.rs @@ -2,13 +2,16 @@ //! Autogenerated weights for `frame_system` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-03-21, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("encointer-rococo-fresh"), DB CACHE: 1024 +//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `caribe`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("encointer-rococo-local-dev"), DB CACHE: 1024 // Executed Command: // target/release/encointer-collator // benchmark -// --chain=encointer-rococo-fresh +// pallet +// --chain=encointer-rococo-local-dev // --steps=50 // --repeat=20 // --pallet=frame_system @@ -21,47 +24,92 @@ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +#![allow(missing_docs)] use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; +use core::marker::PhantomData; /// Weight functions for `frame_system`. pub struct WeightInfo(PhantomData); impl frame_system::WeightInfo for WeightInfo { - fn remark(_b: u32, ) -> Weight { - Weight::from_parts(4_131_000, 0) + /// The range of component `b` is `[0, 3932160]`. + fn remark(b: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 1_825_000 picoseconds. + Weight::from_parts(1_851_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 0 + .saturating_add(Weight::from_parts(230, 0).saturating_mul(b.into())) } + /// The range of component `b` is `[0, 3932160]`. fn remark_with_event(b: u32, ) -> Weight { - Weight::from_parts(0, 0) - // Standard Error: 0 - .saturating_add(Weight::from_parts(2_000_u64, 0).saturating_mul(b.into())) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 7_322_000 picoseconds. + Weight::from_parts(27_401_876, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 2 + .saturating_add(Weight::from_parts(1_123, 0).saturating_mul(b.into())) } - // Storage: System Digest (r:1 w:1) - // Storage: unknown [0x3a686561707061676573] (r:0 w:1) + /// Storage: System Digest (r:1 w:1) + /// Proof Skipped: System Digest (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: unknown `0x3a686561707061676573` (r:0 w:1) + /// Proof Skipped: unknown `0x3a686561707061676573` (r:0 w:1) fn set_heap_pages() -> Weight { - Weight::from_parts(6_000_000, 0) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `1485` + // Minimum execution time: 3_106_000 picoseconds. + Weight::from_parts(3_302_000, 0) + .saturating_add(Weight::from_parts(0, 1485)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: Skipped Metadata (r:0 w:0) + /// Storage: Skipped Metadata (r:0 w:0) + /// Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) + /// The range of component `i` is `[0, 1000]`. fn set_storage(i: u32, ) -> Weight { - Weight::from_parts(0, 0) - // Standard Error: 3_000 - .saturating_add(Weight::from_parts(677_000_u64, 0).saturating_mul(i.into())) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 1_782_000 picoseconds. + Weight::from_parts(1_836_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 1_303 + .saturating_add(Weight::from_parts(630_699, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } - // Storage: Skipped Metadata (r:0 w:0) + /// Storage: Skipped Metadata (r:0 w:0) + /// Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) + /// The range of component `i` is `[0, 1000]`. fn kill_storage(i: u32, ) -> Weight { - Weight::from_parts(0, 0) - // Standard Error: 4_000 - .saturating_add(Weight::from_parts(468_000_u64, 0).saturating_mul(i.into())) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 1_802_000 picoseconds. + Weight::from_parts(1_853_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 567 + .saturating_add(Weight::from_parts(439_023, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } - // Storage: Skipped Metadata (r:0 w:0) + /// Storage: Skipped Metadata (r:0 w:0) + /// Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) + /// The range of component `p` is `[0, 1000]`. fn kill_prefix(p: u32, ) -> Weight { - Weight::from_parts(12_503_000, 0) - // Standard Error: 11_000 - .saturating_add(Weight::from_parts(1_191_000_u64, 0).saturating_mul(p.into())) + // Proof Size summary in bytes: + // Measured: `70 + p * (69 ±0)` + // Estimated: `76 + p * (70 ±0)` + // Minimum execution time: 3_331_000 picoseconds. + Weight::from_parts(3_480_000, 0) + .saturating_add(Weight::from_parts(0, 76)) + // Standard Error: 649 + .saturating_add(Weight::from_parts(833_917, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) + .saturating_add(Weight::from_parts(0, 70).saturating_mul(p.into())) } } diff --git a/polkadot-parachains/encointer-runtime/src/weights/mod.rs b/polkadot-parachains/encointer-runtime/src/weights/mod.rs index 80e88d15..ff97cbe0 100644 --- a/polkadot-parachains/encointer-runtime/src/weights/mod.rs +++ b/polkadot-parachains/encointer-runtime/src/weights/mod.rs @@ -27,6 +27,8 @@ pub mod pallet_encointer_balances; pub mod pallet_encointer_bazaar; pub mod pallet_encointer_ceremonies; pub mod pallet_encointer_communities; +pub mod pallet_encointer_faucet; +pub mod pallet_encointer_reputation_commitments; pub mod pallet_encointer_scheduler; pub mod pallet_membership; pub mod pallet_proxy; diff --git a/polkadot-parachains/encointer-runtime/src/weights/pallet_balances.rs b/polkadot-parachains/encointer-runtime/src/weights/pallet_balances.rs index 09b89609..449621b5 100644 --- a/polkadot-parachains/encointer-runtime/src/weights/pallet_balances.rs +++ b/polkadot-parachains/encointer-runtime/src/weights/pallet_balances.rs @@ -2,13 +2,16 @@ //! Autogenerated weights for `pallet_balances` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-03-21, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("encointer-rococo-fresh"), DB CACHE: 1024 +//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `caribe`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("encointer-rococo-local-dev"), DB CACHE: 1024 // Executed Command: // target/release/encointer-collator // benchmark -// --chain=encointer-rococo-fresh +// pallet +// --chain=encointer-rococo-local-dev // --steps=50 // --repeat=20 // --pallet=pallet_balances @@ -21,58 +24,112 @@ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +#![allow(missing_docs)] use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; +use core::marker::PhantomData; /// Weight functions for `pallet_balances`. pub struct WeightInfo(PhantomData); impl pallet_balances::WeightInfo for WeightInfo { - // Storage: System Account (r:1 w:1) + /// Storage: System Account (r:1 w:1) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) fn transfer_allow_death() -> Weight { - Weight::from_parts(75_000_000, 0) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `3593` + // Minimum execution time: 51_062_000 picoseconds. + Weight::from_parts(52_242_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - fn upgrade_accounts(_val: u32) -> Weight { - // Minimum execution time: 63_500 nanoseconds. - Weight::from_parts(75_000_000, 0u64) - .saturating_add(T::DbWeight::get().reads(1)) - } - // Storage: System Account (r:1 w:1) + /// Storage: System Account (r:1 w:1) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) fn transfer_keep_alive() -> Weight { - Weight::from_parts(53_000_000, 0) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `3593` + // Minimum execution time: 38_442_000 picoseconds. + Weight::from_parts(38_796_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: System Account (r:1 w:1) + /// Storage: System Account (r:1 w:1) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) fn force_set_balance_creating() -> Weight { - Weight::from_parts(28_000_000, 0) + // Proof Size summary in bytes: + // Measured: `103` + // Estimated: `3593` + // Minimum execution time: 12_980_000 picoseconds. + Weight::from_parts(13_172_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: System Account (r:1 w:1) + /// Storage: System Account (r:1 w:1) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) fn force_set_balance_killing() -> Weight { - Weight::from_parts(33_000_000, 0) + // Proof Size summary in bytes: + // Measured: `103` + // Estimated: `3593` + // Minimum execution time: 19_468_000 picoseconds. + Weight::from_parts(19_763_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: System Account (r:2 w:2) + /// Storage: System Account (r:2 w:2) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) fn force_transfer() -> Weight { - Weight::from_parts(62_000_000, 0) + // Proof Size summary in bytes: + // Measured: `103` + // Estimated: `6196` + // Minimum execution time: 51_765_000 picoseconds. + Weight::from_parts(52_610_000, 0) + .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: System Account (r:1 w:1) + /// Storage: System Account (r:1 w:1) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) fn transfer_all() -> Weight { - Weight::from_parts(54_000_000, 0) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `3593` + // Minimum execution time: 47_586_000 picoseconds. + Weight::from_parts(48_295_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: System Account (r:1 w:1) + /// Storage: System Account (r:1 w:1) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) fn force_unreserve() -> Weight { - Weight::from_parts(24_000_000, 0) + // Proof Size summary in bytes: + // Measured: `103` + // Estimated: `3593` + // Minimum execution time: 15_891_000 picoseconds. + Weight::from_parts(16_204_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } + /// Storage: System Account (r:999 w:999) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// The range of component `u` is `[1, 1000]`. + fn upgrade_accounts(u: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0 + u * (135 ±0)` + // Estimated: `990 + u * (2603 ±0)` + // Minimum execution time: 15_647_000 picoseconds. + Weight::from_parts(15_952_000, 0) + .saturating_add(Weight::from_parts(0, 990)) + // Standard Error: 99_031 + .saturating_add(Weight::from_parts(15_553_741, 0).saturating_mul(u.into())) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(u.into()))) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(u.into()))) + .saturating_add(Weight::from_parts(0, 2603).saturating_mul(u.into())) + } } diff --git a/polkadot-parachains/encointer-runtime/src/weights/pallet_collective.rs b/polkadot-parachains/encointer-runtime/src/weights/pallet_collective.rs index 102c8dce..2587a89d 100644 --- a/polkadot-parachains/encointer-runtime/src/weights/pallet_collective.rs +++ b/polkadot-parachains/encointer-runtime/src/weights/pallet_collective.rs @@ -2,13 +2,16 @@ //! Autogenerated weights for `pallet_collective` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-03-21, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("encointer-rococo-fresh"), DB CACHE: 1024 +//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `caribe`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("encointer-rococo-local-dev"), DB CACHE: 1024 // Executed Command: // target/release/encointer-collator // benchmark -// --chain=encointer-rococo-fresh +// pallet +// --chain=encointer-rococo-local-dev // --steps=50 // --repeat=20 // --pallet=pallet_collective @@ -21,138 +24,264 @@ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +#![allow(missing_docs)] use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; +use core::marker::PhantomData; /// Weight functions for `pallet_collective`. pub struct WeightInfo(PhantomData); impl pallet_collective::WeightInfo for WeightInfo { - // Storage: Collective Members (r:1 w:1) - // Storage: Collective Proposals (r:1 w:0) - // Storage: Collective Voting (r:100 w:100) - // Storage: Collective Prime (r:0 w:1) - fn set_members(m: u32, n: u32, p: u32, ) -> Weight { - Weight::from_parts(0, 0) - // Standard Error: 206_000 - .saturating_add(Weight::from_parts(19_611_000_u64, 0).saturating_mul(m.into())) - // Standard Error: 206_000 - .saturating_add(Weight::from_parts(2_865_000_u64, 0).saturating_mul(n.into())) - // Standard Error: 206_000 - .saturating_add(Weight::from_parts(22_526_000_u64, 0).saturating_mul(p.into())) + /// Storage: Collective Members (r:1 w:1) + /// Proof Skipped: Collective Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Collective Proposals (r:1 w:0) + /// Proof Skipped: Collective Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Collective Voting (r:100 w:100) + /// Proof Skipped: Collective Voting (max_values: None, max_size: None, mode: Measured) + /// Storage: Collective Prime (r:0 w:1) + /// Proof Skipped: Collective Prime (max_values: Some(1), max_size: None, mode: Measured) + /// The range of component `m` is `[0, 100]`. + /// The range of component `n` is `[0, 100]`. + /// The range of component `p` is `[0, 100]`. + fn set_members(m: u32, _n: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0 + m * (3232 ±0) + p * (3190 ±0)` + // Estimated: `15728 + m * (1967 ±24) + p * (4332 ±24)` + // Minimum execution time: 12_612_000 picoseconds. + Weight::from_parts(12_817_000, 0) + .saturating_add(Weight::from_parts(0, 15728)) + // Standard Error: 54_992 + .saturating_add(Weight::from_parts(4_313_092, 0).saturating_mul(m.into())) + // Standard Error: 54_992 + .saturating_add(Weight::from_parts(6_586_060, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) + .saturating_add(Weight::from_parts(0, 1967).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 4332).saturating_mul(p.into())) } - // Storage: Collective Members (r:1 w:0) + /// Storage: Collective Members (r:1 w:0) + /// Proof Skipped: Collective Members (max_values: Some(1), max_size: None, mode: Measured) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[1, 100]`. fn execute(b: u32, m: u32, ) -> Weight { - Weight::from_parts(28_352_000, 0) - // Standard Error: 0 - .saturating_add(Weight::from_parts(3_000_u64, 0).saturating_mul(b.into())) - // Standard Error: 0 - .saturating_add(Weight::from_parts(106_000_u64, 0).saturating_mul(m.into())) + // Proof Size summary in bytes: + // Measured: `69 + m * (32 ±0)` + // Estimated: `1555 + m * (32 ±0)` + // Minimum execution time: 13_615_000 picoseconds. + Weight::from_parts(13_294_322, 0) + .saturating_add(Weight::from_parts(0, 1555)) + // Standard Error: 24 + .saturating_add(Weight::from_parts(1_137, 0).saturating_mul(b.into())) + // Standard Error: 250 + .saturating_add(Weight::from_parts(9_446, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into())) } - // Storage: Collective Members (r:1 w:0) - // Storage: Collective ProposalOf (r:1 w:0) + /// Storage: Collective Members (r:1 w:0) + /// Proof Skipped: Collective Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Collective ProposalOf (r:1 w:0) + /// Proof Skipped: Collective ProposalOf (max_values: None, max_size: None, mode: Measured) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[1, 100]`. fn propose_execute(b: u32, m: u32, ) -> Weight { - Weight::from_parts(34_024_000, 0) - // Standard Error: 0 - .saturating_add(Weight::from_parts(2_000_u64, 0).saturating_mul(b.into())) - // Standard Error: 1_000 - .saturating_add(Weight::from_parts(199_000_u64, 0).saturating_mul(m.into())) + // Proof Size summary in bytes: + // Measured: `69 + m * (32 ±0)` + // Estimated: `3535 + m * (32 ±0)` + // Minimum execution time: 16_050_000 picoseconds. + Weight::from_parts(15_173_364, 0) + .saturating_add(Weight::from_parts(0, 3535)) + // Standard Error: 43 + .saturating_add(Weight::from_parts(1_403, 0).saturating_mul(b.into())) + // Standard Error: 453 + .saturating_add(Weight::from_parts(18_210, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into())) } - // Storage: Collective Members (r:1 w:0) - // Storage: Collective ProposalOf (r:1 w:1) - // Storage: Collective Proposals (r:1 w:1) - // Storage: Collective ProposalCount (r:1 w:1) - // Storage: Collective Voting (r:0 w:1) + /// Storage: Collective Members (r:1 w:0) + /// Proof Skipped: Collective Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Collective ProposalOf (r:1 w:1) + /// Proof Skipped: Collective ProposalOf (max_values: None, max_size: None, mode: Measured) + /// Storage: Collective Proposals (r:1 w:1) + /// Proof Skipped: Collective Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Collective ProposalCount (r:1 w:1) + /// Proof Skipped: Collective ProposalCount (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Collective Voting (r:0 w:1) + /// Proof Skipped: Collective Voting (max_values: None, max_size: None, mode: Measured) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[2, 100]`. + /// The range of component `p` is `[1, 100]`. fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { - Weight::from_parts(35_045_000, 0) - // Standard Error: 0 - .saturating_add(Weight::from_parts(23_000_u64, 0).saturating_mul(b.into())) - // Standard Error: 3_000 - .saturating_add(Weight::from_parts(188_000_u64, 0).saturating_mul(m.into())) - // Standard Error: 3_000 - .saturating_add(Weight::from_parts(365_000_u64, 0).saturating_mul(p.into())) + // Proof Size summary in bytes: + // Measured: `359 + m * (32 ±0) + p * (36 ±0)` + // Estimated: `3751 + m * (33 ±0) + p * (36 ±0)` + // Minimum execution time: 22_203_000 picoseconds. + Weight::from_parts(22_610_277, 0) + .saturating_add(Weight::from_parts(0, 3751)) + // Standard Error: 95 + .saturating_add(Weight::from_parts(2_707, 0).saturating_mul(b.into())) + // Standard Error: 1_000 + .saturating_add(Weight::from_parts(23_109, 0).saturating_mul(m.into())) + // Standard Error: 988 + .saturating_add(Weight::from_parts(189_590, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(Weight::from_parts(0, 33).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 36).saturating_mul(p.into())) } - // Storage: Collective Members (r:1 w:0) - // Storage: Collective Voting (r:1 w:1) + /// Storage: Collective Members (r:1 w:0) + /// Proof Skipped: Collective Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Collective Voting (r:1 w:1) + /// Proof Skipped: Collective Voting (max_values: None, max_size: None, mode: Measured) + /// The range of component `m` is `[5, 100]`. fn vote(m: u32, ) -> Weight { - Weight::from_parts(54_429_000, 0) - // Standard Error: 6_000 - .saturating_add(Weight::from_parts(437_000_u64, 0).saturating_mul(m.into())) + // Proof Size summary in bytes: + // Measured: `808 + m * (64 ±0)` + // Estimated: `4272 + m * (64 ±0)` + // Minimum execution time: 22_632_000 picoseconds. + Weight::from_parts(23_889_147, 0) + .saturating_add(Weight::from_parts(0, 4272)) + // Standard Error: 1_170 + .saturating_add(Weight::from_parts(34_147, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) } - // Storage: Collective Voting (r:1 w:1) - // Storage: Collective Members (r:1 w:0) - // Storage: Collective Proposals (r:1 w:1) - // Storage: Collective ProposalOf (r:0 w:1) + /// Storage: Collective Voting (r:1 w:1) + /// Proof Skipped: Collective Voting (max_values: None, max_size: None, mode: Measured) + /// Storage: Collective Members (r:1 w:0) + /// Proof Skipped: Collective Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Collective Proposals (r:1 w:1) + /// Proof Skipped: Collective Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Collective ProposalOf (r:0 w:1) + /// Proof Skipped: Collective ProposalOf (max_values: None, max_size: None, mode: Measured) + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. fn close_early_disapproved(m: u32, p: u32, ) -> Weight { - Weight::from_parts(69_509_000, 0) - // Standard Error: 8_000 - .saturating_add(Weight::from_parts(54_000_u64, 0).saturating_mul(m.into())) - // Standard Error: 8_000 - .saturating_add(Weight::from_parts(462_000_u64, 0).saturating_mul(p.into())) + // Proof Size summary in bytes: + // Measured: `397 + m * (64 ±0) + p * (36 ±0)` + // Estimated: `3842 + m * (65 ±0) + p * (36 ±0)` + // Minimum execution time: 25_176_000 picoseconds. + Weight::from_parts(26_526_585, 0) + .saturating_add(Weight::from_parts(0, 3842)) + // Standard Error: 1_143 + .saturating_add(Weight::from_parts(19_843, 0).saturating_mul(m.into())) + // Standard Error: 1_114 + .saturating_add(Weight::from_parts(185_128, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 65).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 36).saturating_mul(p.into())) } - // Storage: Collective Voting (r:1 w:1) - // Storage: Collective Members (r:1 w:0) - // Storage: Collective ProposalOf (r:1 w:1) - // Storage: Collective Proposals (r:1 w:1) - fn close_early_approved(_b: u32, m: u32, p: u32, ) -> Weight { - Weight::from_parts(90_585_000, 0) - // Standard Error: 6_000 - .saturating_add(Weight::from_parts(109_000_u64, 0).saturating_mul(m.into())) - // Standard Error: 6_000 - .saturating_add(Weight::from_parts(367_000_u64, 0).saturating_mul(p.into())) + /// Storage: Collective Voting (r:1 w:1) + /// Proof Skipped: Collective Voting (max_values: None, max_size: None, mode: Measured) + /// Storage: Collective Members (r:1 w:0) + /// Proof Skipped: Collective Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Collective ProposalOf (r:1 w:1) + /// Proof Skipped: Collective ProposalOf (max_values: None, max_size: None, mode: Measured) + /// Storage: Collective Proposals (r:1 w:1) + /// Proof Skipped: Collective Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. + fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `699 + b * (1 ±0) + m * (64 ±0) + p * (40 ±0)` + // Estimated: `4016 + b * (1 ±0) + m * (66 ±0) + p * (40 ±0)` + // Minimum execution time: 35_905_000 picoseconds. + Weight::from_parts(37_097_894, 0) + .saturating_add(Weight::from_parts(0, 4016)) + // Standard Error: 155 + .saturating_add(Weight::from_parts(2_460, 0).saturating_mul(b.into())) + // Standard Error: 1_638 + .saturating_add(Weight::from_parts(25_075, 0).saturating_mul(m.into())) + // Standard Error: 1_597 + .saturating_add(Weight::from_parts(220_820, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(0, 66).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 40).saturating_mul(p.into())) } - // Storage: Collective Voting (r:1 w:1) - // Storage: Collective Members (r:1 w:0) - // Storage: Collective Prime (r:1 w:0) - // Storage: Collective Proposals (r:1 w:1) - // Storage: Collective ProposalOf (r:0 w:1) + /// Storage: Collective Voting (r:1 w:1) + /// Proof Skipped: Collective Voting (max_values: None, max_size: None, mode: Measured) + /// Storage: Collective Members (r:1 w:0) + /// Proof Skipped: Collective Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Collective Prime (r:1 w:0) + /// Proof Skipped: Collective Prime (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Collective Proposals (r:1 w:1) + /// Proof Skipped: Collective Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Collective ProposalOf (r:0 w:1) + /// Proof Skipped: Collective ProposalOf (max_values: None, max_size: None, mode: Measured) + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. fn close_disapproved(m: u32, p: u32, ) -> Weight { - Weight::from_parts(59_699_000, 0) - // Standard Error: 9_000 - .saturating_add(Weight::from_parts(281_000_u64, 0).saturating_mul(m.into())) - // Standard Error: 8_000 - .saturating_add(Weight::from_parts(258_000_u64, 0).saturating_mul(p.into())) + // Proof Size summary in bytes: + // Measured: `417 + m * (64 ±0) + p * (36 ±0)` + // Estimated: `3862 + m * (65 ±0) + p * (36 ±0)` + // Minimum execution time: 27_232_000 picoseconds. + Weight::from_parts(28_648_248, 0) + .saturating_add(Weight::from_parts(0, 3862)) + // Standard Error: 921 + .saturating_add(Weight::from_parts(27_951, 0).saturating_mul(m.into())) + // Standard Error: 898 + .saturating_add(Weight::from_parts(183_334, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 65).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 36).saturating_mul(p.into())) } - // Storage: Collective Voting (r:1 w:1) - // Storage: Collective Members (r:1 w:0) - // Storage: Collective Prime (r:1 w:0) - // Storage: Collective ProposalOf (r:1 w:1) - // Storage: Collective Proposals (r:1 w:1) + /// Storage: Collective Voting (r:1 w:1) + /// Proof Skipped: Collective Voting (max_values: None, max_size: None, mode: Measured) + /// Storage: Collective Members (r:1 w:0) + /// Proof Skipped: Collective Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Collective Prime (r:1 w:0) + /// Proof Skipped: Collective Prime (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Collective ProposalOf (r:1 w:1) + /// Proof Skipped: Collective ProposalOf (max_values: None, max_size: None, mode: Measured) + /// Storage: Collective Proposals (r:1 w:1) + /// Proof Skipped: Collective Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { - Weight::from_parts(77_812_000, 0) - // Standard Error: 0 - .saturating_add(Weight::from_parts(1_000_u64, 0).saturating_mul(b.into())) - // Standard Error: 4_000 - .saturating_add(Weight::from_parts(332_000_u64, 0).saturating_mul(m.into())) - // Standard Error: 4_000 - .saturating_add(Weight::from_parts(263_000_u64, 0).saturating_mul(p.into())) + // Proof Size summary in bytes: + // Measured: `719 + b * (1 ±0) + m * (64 ±0) + p * (40 ±0)` + // Estimated: `4036 + b * (1 ±0) + m * (66 ±0) + p * (40 ±0)` + // Minimum execution time: 37_906_000 picoseconds. + Weight::from_parts(41_399_461, 0) + .saturating_add(Weight::from_parts(0, 4036)) + // Standard Error: 124 + .saturating_add(Weight::from_parts(1_721, 0).saturating_mul(b.into())) + // Standard Error: 1_311 + .saturating_add(Weight::from_parts(22_182, 0).saturating_mul(m.into())) + // Standard Error: 1_278 + .saturating_add(Weight::from_parts(214_365, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(0, 66).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 40).saturating_mul(p.into())) } - // Storage: Collective Proposals (r:1 w:1) - // Storage: Collective Voting (r:0 w:1) - // Storage: Collective ProposalOf (r:0 w:1) + /// Storage: Collective Proposals (r:1 w:1) + /// Proof Skipped: Collective Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Collective Voting (r:0 w:1) + /// Proof Skipped: Collective Voting (max_values: None, max_size: None, mode: Measured) + /// Storage: Collective ProposalOf (r:0 w:1) + /// Proof Skipped: Collective ProposalOf (max_values: None, max_size: None, mode: Measured) + /// The range of component `p` is `[1, 100]`. fn disapprove_proposal(p: u32, ) -> Weight { - Weight::from_parts(34_862_000, 0) - // Standard Error: 2_000 - .saturating_add(Weight::from_parts(322_000_u64, 0).saturating_mul(p.into())) + // Proof Size summary in bytes: + // Measured: `226 + p * (32 ±0)` + // Estimated: `1711 + p * (32 ±0)` + // Minimum execution time: 13_796_000 picoseconds. + Weight::from_parts(15_669_737, 0) + .saturating_add(Weight::from_parts(0, 1711)) + // Standard Error: 1_075 + .saturating_add(Weight::from_parts(172_017, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 32).saturating_mul(p.into())) } } diff --git a/polkadot-parachains/encointer-runtime/src/weights/pallet_encointer_balances.rs b/polkadot-parachains/encointer-runtime/src/weights/pallet_encointer_balances.rs index 9485c99b..e8c813ba 100644 --- a/polkadot-parachains/encointer-runtime/src/weights/pallet_encointer_balances.rs +++ b/polkadot-parachains/encointer-runtime/src/weights/pallet_encointer_balances.rs @@ -2,7 +2,9 @@ //! Autogenerated weights for `pallet_encointer_balances` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-06-22, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `caribe`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("encointer-rococo-local-dev"), DB CACHE: 1024 // Executed Command: @@ -22,26 +24,43 @@ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +#![allow(missing_docs)] use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; +use core::marker::PhantomData; /// Weight functions for `pallet_encointer_balances`. pub struct WeightInfo(PhantomData); impl pallet_encointer_balances::WeightInfo for WeightInfo { - // Storage: EncointerBalances Balance (r:2 w:2) - // Storage: EncointerBalances DemurragePerBlock (r:1 w:0) - // Storage: System Account (r:1 w:1) + /// Storage: EncointerBalances Balance (r:2 w:2) + /// Proof: EncointerBalances Balance (max_values: None, max_size: Some(93), added: 2568, mode: MaxEncodedLen) + /// Storage: EncointerBalances DemurragePerBlock (r:1 w:0) + /// Proof: EncointerBalances DemurragePerBlock (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) + /// Storage: System Account (r:1 w:1) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) fn transfer() -> Weight { - Weight::from_parts(131_000_000, 0) + // Proof Size summary in bytes: + // Measured: `235` + // Estimated: `6126` + // Minimum execution time: 83_473_000 picoseconds. + Weight::from_parts(84_889_000, 0) + .saturating_add(Weight::from_parts(0, 6126)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } - // Storage: EncointerBalances Balance (r:2 w:2) - // Storage: EncointerBalances DemurragePerBlock (r:1 w:0) - // Storage: System Account (r:2 w:2) + /// Storage: EncointerBalances Balance (r:2 w:2) + /// Proof: EncointerBalances Balance (max_values: None, max_size: Some(93), added: 2568, mode: MaxEncodedLen) + /// Storage: EncointerBalances DemurragePerBlock (r:1 w:0) + /// Proof: EncointerBalances DemurragePerBlock (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) + /// Storage: System Account (r:2 w:2) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) fn transfer_all() -> Weight { - Weight::from_parts(151_000_000, 0) + // Proof Size summary in bytes: + // Measured: `235` + // Estimated: `6196` + // Minimum execution time: 117_542_000 picoseconds. + Weight::from_parts(119_322_000, 0) + .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) } diff --git a/polkadot-parachains/encointer-runtime/src/weights/pallet_encointer_bazaar.rs b/polkadot-parachains/encointer-runtime/src/weights/pallet_encointer_bazaar.rs index e7a4c571..2bbab537 100644 --- a/polkadot-parachains/encointer-runtime/src/weights/pallet_encointer_bazaar.rs +++ b/polkadot-parachains/encointer-runtime/src/weights/pallet_encointer_bazaar.rs @@ -2,12 +2,15 @@ //! Autogenerated weights for `pallet_encointer_bazaar` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-03-21, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `caribe`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("encointer-rococo-local-dev"), DB CACHE: 1024 // Executed Command: // target/release/encointer-collator // benchmark +// pallet // --chain=encointer-rococo-local-dev // --steps=50 // --repeat=20 @@ -21,48 +24,87 @@ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +#![allow(missing_docs)] use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; +use core::marker::PhantomData; /// Weight functions for `pallet_encointer_bazaar`. pub struct WeightInfo(PhantomData); impl pallet_encointer_bazaar::WeightInfo for WeightInfo { - // Storage: EncointerCommunities CommunityIdentifiers (r:1 w:0) - // Storage: EncointerBazaar BusinessRegistry (r:1 w:1) + /// Storage: EncointerCommunities CommunityIdentifiers (r:1 w:0) + /// Proof: EncointerCommunities CommunityIdentifiers (max_values: Some(1), max_size: Some(90002), added: 90497, mode: MaxEncodedLen) + /// Storage: EncointerBazaar BusinessRegistry (r:1 w:1) + /// Proof Skipped: EncointerBazaar BusinessRegistry (max_values: None, max_size: None, mode: Measured) fn create_business() -> Weight { - Weight::from_parts(35_000_000, 0) + // Proof Size summary in bytes: + // Measured: `263` + // Estimated: `91487` + // Minimum execution time: 28_826_000 picoseconds. + Weight::from_parts(31_307_000, 0) + .saturating_add(Weight::from_parts(0, 91487)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: EncointerBazaar BusinessRegistry (r:1 w:1) + /// Storage: EncointerBazaar BusinessRegistry (r:1 w:1) + /// Proof Skipped: EncointerBazaar BusinessRegistry (max_values: None, max_size: None, mode: Measured) fn update_business() -> Weight { - Weight::from_parts(29_000_000, 0) + // Proof Size summary in bytes: + // Measured: `162` + // Estimated: `3627` + // Minimum execution time: 24_215_000 picoseconds. + Weight::from_parts(26_309_000, 0) + .saturating_add(Weight::from_parts(0, 3627)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: EncointerBazaar BusinessRegistry (r:1 w:1) + /// Storage: EncointerBazaar BusinessRegistry (r:1 w:1) + /// Proof Skipped: EncointerBazaar BusinessRegistry (max_values: None, max_size: None, mode: Measured) fn delete_business() -> Weight { - Weight::from_parts(33_000_000, 0) + // Proof Size summary in bytes: + // Measured: `162` + // Estimated: `3627` + // Minimum execution time: 27_141_000 picoseconds. + Weight::from_parts(28_669_000, 0) + .saturating_add(Weight::from_parts(0, 3627)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: EncointerBazaar BusinessRegistry (r:1 w:1) - // Storage: EncointerBazaar OfferingRegistry (r:0 w:1) + /// Storage: EncointerBazaar BusinessRegistry (r:1 w:1) + /// Proof Skipped: EncointerBazaar BusinessRegistry (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerBazaar OfferingRegistry (r:0 w:1) + /// Proof Skipped: EncointerBazaar OfferingRegistry (max_values: None, max_size: None, mode: Measured) fn create_offering() -> Weight { - Weight::from_parts(40_000_000, 0) + // Proof Size summary in bytes: + // Measured: `162` + // Estimated: `3627` + // Minimum execution time: 29_322_000 picoseconds. + Weight::from_parts(30_740_000, 0) + .saturating_add(Weight::from_parts(0, 3627)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: EncointerBazaar OfferingRegistry (r:1 w:1) + /// Storage: EncointerBazaar OfferingRegistry (r:1 w:1) + /// Proof Skipped: EncointerBazaar OfferingRegistry (max_values: None, max_size: None, mode: Measured) fn update_offering() -> Weight { - Weight::from_parts(36_000_000, 0) + // Proof Size summary in bytes: + // Measured: `196` + // Estimated: `3661` + // Minimum execution time: 21_668_000 picoseconds. + Weight::from_parts(22_897_000, 0) + .saturating_add(Weight::from_parts(0, 3661)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: EncointerBazaar OfferingRegistry (r:1 w:1) + /// Storage: EncointerBazaar OfferingRegistry (r:1 w:1) + /// Proof Skipped: EncointerBazaar OfferingRegistry (max_values: None, max_size: None, mode: Measured) fn delete_offering() -> Weight { - Weight::from_parts(28_000_000, 0) + // Proof Size summary in bytes: + // Measured: `196` + // Estimated: `3661` + // Minimum execution time: 19_727_000 picoseconds. + Weight::from_parts(20_387_000, 0) + .saturating_add(Weight::from_parts(0, 3661)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/polkadot-parachains/encointer-runtime/src/weights/pallet_encointer_ceremonies.rs b/polkadot-parachains/encointer-runtime/src/weights/pallet_encointer_ceremonies.rs index 9a8d1133..94370b83 100644 --- a/polkadot-parachains/encointer-runtime/src/weights/pallet_encointer_ceremonies.rs +++ b/polkadot-parachains/encointer-runtime/src/weights/pallet_encointer_ceremonies.rs @@ -2,7 +2,9 @@ //! Autogenerated weights for `pallet_encointer_ceremonies` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-06-22, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `caribe`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("encointer-rococo-local-dev"), DB CACHE: 1024 // Executed Command: @@ -22,160 +24,378 @@ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +#![allow(missing_docs)] use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; +use core::marker::PhantomData; /// Weight functions for `pallet_encointer_ceremonies`. pub struct WeightInfo(PhantomData); impl pallet_encointer_ceremonies::WeightInfo for WeightInfo { - // Storage: EncointerScheduler CurrentPhase (r:1 w:0) - // Storage: EncointerCommunities CommunityIdentifiers (r:1 w:0) - // Storage: EncointerScheduler CurrentCeremonyIndex (r:1 w:0) - // Storage: EncointerCeremonies BootstrapperIndex (r:1 w:0) - // Storage: EncointerCeremonies ReputableIndex (r:1 w:1) - // Storage: EncointerCeremonies EndorseeIndex (r:1 w:0) - // Storage: EncointerCeremonies NewbieIndex (r:1 w:0) - // Storage: EncointerCeremonies ReputationLifetime (r:1 w:0) - // Storage: EncointerCeremonies ParticipantReputation (r:1 w:2) - // Storage: EncointerCommunities Bootstrappers (r:1 w:0) - // Storage: EncointerBalances TotalIssuance (r:1 w:0) - // Storage: EncointerBalances DemurragePerBlock (r:1 w:0) - // Storage: EncointerCeremonies ReputableCount (r:1 w:1) - // Storage: EncointerCeremonies ReputableRegistry (r:0 w:1) + /// Storage: EncointerScheduler CurrentPhase (r:1 w:0) + /// Proof: EncointerScheduler CurrentPhase (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// Storage: EncointerCommunities CommunityIdentifiers (r:1 w:0) + /// Proof: EncointerCommunities CommunityIdentifiers (max_values: Some(1), max_size: Some(90002), added: 90497, mode: MaxEncodedLen) + /// Storage: EncointerScheduler CurrentCeremonyIndex (r:1 w:0) + /// Proof: EncointerScheduler CurrentCeremonyIndex (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: EncointerCeremonies BootstrapperIndex (r:1 w:0) + /// Proof Skipped: EncointerCeremonies BootstrapperIndex (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies ReputableIndex (r:1 w:1) + /// Proof Skipped: EncointerCeremonies ReputableIndex (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies EndorseeIndex (r:1 w:0) + /// Proof Skipped: EncointerCeremonies EndorseeIndex (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies NewbieIndex (r:1 w:0) + /// Proof Skipped: EncointerCeremonies NewbieIndex (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies ReputationLifetime (r:1 w:0) + /// Proof Skipped: EncointerCeremonies ReputationLifetime (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: EncointerCeremonies ParticipantReputation (r:1 w:2) + /// Proof Skipped: EncointerCeremonies ParticipantReputation (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCommunities Bootstrappers (r:1 w:0) + /// Proof: EncointerCommunities Bootstrappers (max_values: None, max_size: Some(320027), added: 322502, mode: MaxEncodedLen) + /// Storage: EncointerBalances TotalIssuance (r:1 w:0) + /// Proof: EncointerBalances TotalIssuance (max_values: None, max_size: Some(45), added: 2520, mode: MaxEncodedLen) + /// Storage: EncointerBalances DemurragePerBlock (r:1 w:0) + /// Proof: EncointerBalances DemurragePerBlock (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) + /// Storage: EncointerCeremonies ReputableCount (r:1 w:1) + /// Proof Skipped: EncointerCeremonies ReputableCount (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies ReputableRegistry (r:0 w:1) + /// Proof Skipped: EncointerCeremonies ReputableRegistry (max_values: None, max_size: None, mode: Measured) fn register_participant() -> Weight { - Weight::from_parts(183_000_000, 0) + // Proof Size summary in bytes: + // Measured: `862` + // Estimated: `323492` + // Minimum execution time: 141_377_000 picoseconds. + Weight::from_parts(150_107_000, 0) + .saturating_add(Weight::from_parts(0, 323492)) .saturating_add(T::DbWeight::get().reads(13)) .saturating_add(T::DbWeight::get().writes(5)) } - // Storage: EncointerScheduler CurrentPhase (r:1 w:0) - // Storage: EncointerCommunities CommunityIdentifiers (r:1 w:0) - // Storage: EncointerScheduler CurrentCeremonyIndex (r:1 w:0) - // Storage: EncointerCeremonies MeetupCount (r:1 w:0) - // Storage: EncointerCeremonies AssignmentCounts (r:1 w:0) - // Storage: EncointerCeremonies Assignments (r:1 w:0) - // Storage: EncointerCeremonies BootstrapperIndex (r:1 w:0) - // Storage: EncointerCeremonies ReputableIndex (r:1 w:0) - // Storage: EncointerCeremonies ReputableRegistry (r:8 w:0) - // Storage: EncointerCeremonies NewbieRegistry (r:2 w:0) - // Storage: EncointerCommunities Locations (r:2 w:0) - // Storage: EncointerScheduler PhaseDurations (r:1 w:0) - // Storage: EncointerScheduler NextPhaseTimestamp (r:1 w:0) - // Storage: EncointerCeremonies MeetupTimeOffset (r:1 w:0) - // Storage: EncointerCeremonies AttestationCount (r:1 w:1) - // Storage: EncointerCeremonies AttestationIndex (r:1 w:1) - // Storage: EncointerCeremonies MeetupParticipantCountVote (r:0 w:1) - // Storage: EncointerCeremonies AttestationRegistry (r:0 w:1) + /// Storage: EncointerScheduler CurrentPhase (r:1 w:0) + /// Proof: EncointerScheduler CurrentPhase (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// Storage: EncointerCommunities CommunityIdentifiers (r:1 w:0) + /// Proof: EncointerCommunities CommunityIdentifiers (max_values: Some(1), max_size: Some(90002), added: 90497, mode: MaxEncodedLen) + /// Storage: EncointerScheduler CurrentCeremonyIndex (r:1 w:0) + /// Proof: EncointerScheduler CurrentCeremonyIndex (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: EncointerCeremonies BootstrapperIndex (r:1 w:0) + /// Proof Skipped: EncointerCeremonies BootstrapperIndex (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies ReputableIndex (r:1 w:1) + /// Proof Skipped: EncointerCeremonies ReputableIndex (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies EndorseeIndex (r:1 w:0) + /// Proof Skipped: EncointerCeremonies EndorseeIndex (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies NewbieIndex (r:1 w:1) + /// Proof Skipped: EncointerCeremonies NewbieIndex (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies NewbieCount (r:1 w:1) + /// Proof Skipped: EncointerCeremonies NewbieCount (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies NewbieRegistry (r:1 w:1) + /// Proof Skipped: EncointerCeremonies NewbieRegistry (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies ReputationLifetime (r:1 w:0) + /// Proof Skipped: EncointerCeremonies ReputationLifetime (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: EncointerCeremonies ParticipantReputation (r:1 w:2) + /// Proof Skipped: EncointerCeremonies ParticipantReputation (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCommunities Bootstrappers (r:1 w:0) + /// Proof: EncointerCommunities Bootstrappers (max_values: None, max_size: Some(320027), added: 322502, mode: MaxEncodedLen) + /// Storage: EncointerBalances TotalIssuance (r:1 w:0) + /// Proof: EncointerBalances TotalIssuance (max_values: None, max_size: Some(45), added: 2520, mode: MaxEncodedLen) + /// Storage: EncointerBalances DemurragePerBlock (r:1 w:0) + /// Proof: EncointerBalances DemurragePerBlock (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) + /// Storage: EncointerCeremonies ReputableCount (r:1 w:1) + /// Proof Skipped: EncointerCeremonies ReputableCount (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies ReputableRegistry (r:0 w:1) + /// Proof Skipped: EncointerCeremonies ReputableRegistry (max_values: None, max_size: None, mode: Measured) + fn upgrade_registration() -> Weight { + // Proof Size summary in bytes: + // Measured: `1140` + // Estimated: `323492` + // Minimum execution time: 170_801_000 picoseconds. + Weight::from_parts(177_027_000, 0) + .saturating_add(Weight::from_parts(0, 323492)) + .saturating_add(T::DbWeight::get().reads(15)) + .saturating_add(T::DbWeight::get().writes(8)) + } + /// Storage: EncointerScheduler CurrentPhase (r:1 w:0) + /// Proof: EncointerScheduler CurrentPhase (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// Storage: EncointerCommunities CommunityIdentifiers (r:1 w:0) + /// Proof: EncointerCommunities CommunityIdentifiers (max_values: Some(1), max_size: Some(90002), added: 90497, mode: MaxEncodedLen) + /// Storage: EncointerScheduler CurrentCeremonyIndex (r:1 w:0) + /// Proof: EncointerScheduler CurrentCeremonyIndex (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: EncointerCeremonies BootstrapperIndex (r:1 w:0) + /// Proof Skipped: EncointerCeremonies BootstrapperIndex (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies ReputableIndex (r:1 w:1) + /// Proof Skipped: EncointerCeremonies ReputableIndex (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies ReputationLifetime (r:1 w:0) + /// Proof Skipped: EncointerCeremonies ReputationLifetime (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: EncointerCeremonies ParticipantReputation (r:1 w:2) + /// Proof Skipped: EncointerCeremonies ParticipantReputation (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies ReputableCount (r:1 w:1) + /// Proof Skipped: EncointerCeremonies ReputableCount (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies ReputableRegistry (r:1 w:1) + /// Proof Skipped: EncointerCeremonies ReputableRegistry (max_values: None, max_size: None, mode: Measured) + fn unregister_participant() -> Weight { + // Proof Size summary in bytes: + // Measured: `943` + // Estimated: `91487` + // Minimum execution time: 62_897_000 picoseconds. + Weight::from_parts(65_129_000, 0) + .saturating_add(Weight::from_parts(0, 91487)) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(5)) + } + /// Storage: EncointerScheduler CurrentPhase (r:1 w:0) + /// Proof: EncointerScheduler CurrentPhase (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// Storage: EncointerCommunities CommunityIdentifiers (r:1 w:0) + /// Proof: EncointerCommunities CommunityIdentifiers (max_values: Some(1), max_size: Some(90002), added: 90497, mode: MaxEncodedLen) + /// Storage: EncointerScheduler CurrentCeremonyIndex (r:1 w:0) + /// Proof: EncointerScheduler CurrentCeremonyIndex (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: EncointerCeremonies MeetupCount (r:1 w:0) + /// Proof Skipped: EncointerCeremonies MeetupCount (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies AssignmentCounts (r:1 w:0) + /// Proof Skipped: EncointerCeremonies AssignmentCounts (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies Assignments (r:1 w:0) + /// Proof Skipped: EncointerCeremonies Assignments (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies BootstrapperIndex (r:1 w:0) + /// Proof Skipped: EncointerCeremonies BootstrapperIndex (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies ReputableIndex (r:1 w:0) + /// Proof Skipped: EncointerCeremonies ReputableIndex (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies ReputableRegistry (r:8 w:0) + /// Proof Skipped: EncointerCeremonies ReputableRegistry (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies NewbieRegistry (r:2 w:0) + /// Proof Skipped: EncointerCeremonies NewbieRegistry (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCommunities Locations (r:2 w:0) + /// Proof: EncointerCommunities Locations (max_values: None, max_size: Some(320032), added: 322507, mode: MaxEncodedLen) + /// Storage: EncointerScheduler PhaseDurations (r:1 w:0) + /// Proof: EncointerScheduler PhaseDurations (max_values: None, max_size: Some(25), added: 2500, mode: MaxEncodedLen) + /// Storage: EncointerScheduler NextPhaseTimestamp (r:1 w:0) + /// Proof: EncointerScheduler NextPhaseTimestamp (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) + /// Storage: EncointerCeremonies MeetupTimeOffset (r:1 w:0) + /// Proof Skipped: EncointerCeremonies MeetupTimeOffset (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: EncointerCeremonies AttestationCount (r:1 w:1) + /// Proof Skipped: EncointerCeremonies AttestationCount (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies AttestationIndex (r:1 w:1) + /// Proof Skipped: EncointerCeremonies AttestationIndex (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies MeetupParticipantCountVote (r:0 w:1) + /// Proof Skipped: EncointerCeremonies MeetupParticipantCountVote (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies AttestationRegistry (r:0 w:1) + /// Proof Skipped: EncointerCeremonies AttestationRegistry (max_values: None, max_size: None, mode: Measured) fn attest_attendees() -> Weight { - Weight::from_parts(224_000_000, 0) + // Proof Size summary in bytes: + // Measured: `2137` + // Estimated: `646004` + // Minimum execution time: 123_019_000 picoseconds. + Weight::from_parts(126_476_000, 0) + .saturating_add(Weight::from_parts(0, 646004)) .saturating_add(T::DbWeight::get().reads(25)) .saturating_add(T::DbWeight::get().writes(4)) } - // Storage: EncointerCommunities CommunityIdentifiers (r:1 w:0) - // Storage: EncointerCommunities Bootstrappers (r:1 w:0) - // Storage: EncointerCeremonies BurnedBootstrapperNewbieTickets (r:1 w:1) - // Storage: EncointerCeremonies EndorsementTicketsPerBootstrapper (r:1 w:0) - // Storage: EncointerScheduler CurrentCeremonyIndex (r:1 w:0) - // Storage: EncointerScheduler CurrentPhase (r:1 w:0) - // Storage: EncointerCeremonies Endorsees (r:1 w:1) - // Storage: EncointerCeremonies EndorseesCount (r:1 w:1) - // Storage: EncointerCeremonies NewbieIndex (r:1 w:1) - // Storage: EncointerCeremonies NewbieCount (r:1 w:1) - // Storage: EncointerCeremonies NewbieRegistry (r:1 w:1) - // Storage: EncointerBalances TotalIssuance (r:1 w:0) - // Storage: EncointerBalances DemurragePerBlock (r:1 w:0) - // Storage: EncointerCeremonies EndorseeCount (r:1 w:1) - // Storage: EncointerCeremonies EndorseeRegistry (r:0 w:1) - // Storage: EncointerCeremonies EndorseeIndex (r:0 w:1) + /// Storage: EncointerCommunities CommunityIdentifiers (r:1 w:0) + /// Proof: EncointerCommunities CommunityIdentifiers (max_values: Some(1), max_size: Some(90002), added: 90497, mode: MaxEncodedLen) + /// Storage: EncointerScheduler CurrentCeremonyIndex (r:1 w:0) + /// Proof: EncointerScheduler CurrentCeremonyIndex (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: EncointerScheduler CurrentPhase (r:1 w:0) + /// Proof: EncointerScheduler CurrentPhase (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// Storage: EncointerCeremonies ReputationLifetime (r:1 w:0) + /// Proof Skipped: EncointerCeremonies ReputationLifetime (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: EncointerCeremonies Endorsees (r:2 w:1) + /// Proof Skipped: EncointerCeremonies Endorsees (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies ParticipantReputation (r:2 w:0) + /// Proof Skipped: EncointerCeremonies ParticipantReputation (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies BurnedReputableNewbieTickets (r:1 w:1) + /// Proof Skipped: EncointerCeremonies BurnedReputableNewbieTickets (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies EndorsementTicketsPerReputable (r:1 w:0) + /// Proof Skipped: EncointerCeremonies EndorsementTicketsPerReputable (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: EncointerCeremonies EndorseeCount (r:1 w:1) + /// Proof Skipped: EncointerCeremonies EndorseeCount (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies NewbieIndex (r:1 w:1) + /// Proof Skipped: EncointerCeremonies NewbieIndex (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies BootstrapperIndex (r:1 w:0) + /// Proof Skipped: EncointerCeremonies BootstrapperIndex (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies ReputableIndex (r:1 w:0) + /// Proof Skipped: EncointerCeremonies ReputableIndex (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies EndorseeIndex (r:1 w:1) + /// Proof Skipped: EncointerCeremonies EndorseeIndex (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies NewbieCount (r:1 w:1) + /// Proof Skipped: EncointerCeremonies NewbieCount (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies NewbieRegistry (r:1 w:1) + /// Proof Skipped: EncointerCeremonies NewbieRegistry (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCommunities Bootstrappers (r:1 w:0) + /// Proof: EncointerCommunities Bootstrappers (max_values: None, max_size: Some(320027), added: 322502, mode: MaxEncodedLen) + /// Storage: EncointerBalances TotalIssuance (r:1 w:0) + /// Proof: EncointerBalances TotalIssuance (max_values: None, max_size: Some(45), added: 2520, mode: MaxEncodedLen) + /// Storage: EncointerBalances DemurragePerBlock (r:1 w:0) + /// Proof: EncointerBalances DemurragePerBlock (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) + /// Storage: EncointerCeremonies EndorseeRegistry (r:0 w:1) + /// Proof Skipped: EncointerCeremonies EndorseeRegistry (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies EndorseesCount (r:0 w:1) + /// Proof Skipped: EncointerCeremonies EndorseesCount (max_values: None, max_size: None, mode: Measured) fn endorse_newcomer() -> Weight { - Weight::from_parts(158_000_000, 0) - .saturating_add(T::DbWeight::get().reads(14)) + // Proof Size summary in bytes: + // Measured: `1130` + // Estimated: `323492` + // Minimum execution time: 116_739_000 picoseconds. + Weight::from_parts(119_393_000, 0) + .saturating_add(Weight::from_parts(0, 323492)) + .saturating_add(T::DbWeight::get().reads(20)) .saturating_add(T::DbWeight::get().writes(9)) } - // Storage: EncointerScheduler CurrentPhase (r:1 w:0) - // Storage: EncointerScheduler CurrentCeremonyIndex (r:1 w:0) - // Storage: EncointerCeremonies MeetupCount (r:1 w:0) - // Storage: EncointerCeremonies AssignmentCounts (r:1 w:0) - // Storage: EncointerCeremonies Assignments (r:1 w:0) - // Storage: EncointerCeremonies BootstrapperIndex (r:1 w:0) - // Storage: EncointerCeremonies ReputableIndex (r:1 w:0) - // Storage: EncointerCeremonies IssuedRewards (r:1 w:1) - // Storage: EncointerCeremonies ReputableRegistry (r:8 w:0) - // Storage: EncointerCeremonies NewbieRegistry (r:2 w:0) - // Storage: EncointerCeremonies AttestationIndex (r:10 w:0) - // Storage: EncointerCeremonies AttestationRegistry (r:10 w:0) - // Storage: EncointerCeremonies MeetupParticipantCountVote (r:10 w:0) - // Storage: EncointerCommunities NominalIncome (r:1 w:0) - // Storage: EncointerCeremonies CeremonyReward (r:1 w:0) - // Storage: EncointerBalances Balance (r:10 w:10) - // Storage: EncointerBalances DemurragePerBlock (r:1 w:0) - // Storage: EncointerBalances TotalIssuance (r:1 w:1) - // Storage: EncointerCeremonies ParticipantReputation (r:0 w:10) + /// Storage: EncointerScheduler CurrentPhase (r:1 w:0) + /// Proof: EncointerScheduler CurrentPhase (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// Storage: EncointerScheduler CurrentCeremonyIndex (r:1 w:0) + /// Proof: EncointerScheduler CurrentCeremonyIndex (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: EncointerCeremonies MeetupCount (r:1 w:0) + /// Proof Skipped: EncointerCeremonies MeetupCount (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies AssignmentCounts (r:1 w:0) + /// Proof Skipped: EncointerCeremonies AssignmentCounts (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies Assignments (r:1 w:0) + /// Proof Skipped: EncointerCeremonies Assignments (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies BootstrapperIndex (r:1 w:0) + /// Proof Skipped: EncointerCeremonies BootstrapperIndex (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies ReputableIndex (r:1 w:0) + /// Proof Skipped: EncointerCeremonies ReputableIndex (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies IssuedRewards (r:1 w:1) + /// Proof Skipped: EncointerCeremonies IssuedRewards (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies ReputableRegistry (r:8 w:0) + /// Proof Skipped: EncointerCeremonies ReputableRegistry (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies NewbieRegistry (r:2 w:0) + /// Proof Skipped: EncointerCeremonies NewbieRegistry (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies AttestationIndex (r:10 w:0) + /// Proof Skipped: EncointerCeremonies AttestationIndex (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies AttestationRegistry (r:10 w:0) + /// Proof Skipped: EncointerCeremonies AttestationRegistry (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies MeetupParticipantCountVote (r:10 w:0) + /// Proof Skipped: EncointerCeremonies MeetupParticipantCountVote (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCommunities NominalIncome (r:1 w:0) + /// Proof: EncointerCommunities NominalIncome (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) + /// Storage: EncointerCeremonies CeremonyReward (r:1 w:0) + /// Proof Skipped: EncointerCeremonies CeremonyReward (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: EncointerBalances Balance (r:10 w:10) + /// Proof: EncointerBalances Balance (max_values: None, max_size: Some(93), added: 2568, mode: MaxEncodedLen) + /// Storage: EncointerBalances DemurragePerBlock (r:1 w:0) + /// Proof: EncointerBalances DemurragePerBlock (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) + /// Storage: EncointerBalances TotalIssuance (r:1 w:1) + /// Proof: EncointerBalances TotalIssuance (max_values: None, max_size: Some(45), added: 2520, mode: MaxEncodedLen) + /// Storage: EncointerCeremonies ParticipantReputation (r:0 w:10) + /// Proof Skipped: EncointerCeremonies ParticipantReputation (max_values: None, max_size: None, mode: Measured) fn claim_rewards() -> Weight { - Weight::from_parts(782_000_000, 0) + // Proof Size summary in bytes: + // Measured: `7649` + // Estimated: `33389` + // Minimum execution time: 441_163_000 picoseconds. + Weight::from_parts(455_147_000, 0) + .saturating_add(Weight::from_parts(0, 33389)) .saturating_add(T::DbWeight::get().reads(62)) .saturating_add(T::DbWeight::get().writes(22)) } - // Storage: EncointerCeremonies InactivityTimeout (r:0 w:1) + /// Storage: EncointerCeremonies InactivityTimeout (r:0 w:1) + /// Proof Skipped: EncointerCeremonies InactivityTimeout (max_values: Some(1), max_size: None, mode: Measured) fn set_inactivity_timeout() -> Weight { - Weight::from_parts(27_000_000, 0) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 8_151_000 picoseconds. + Weight::from_parts(8_366_000, 0) + .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: EncointerScheduler CurrentPhase (r:1 w:0) - // Storage: EncointerCeremonies MeetupTimeOffset (r:0 w:1) + /// Storage: EncointerScheduler CurrentPhase (r:1 w:0) + /// Proof: EncointerScheduler CurrentPhase (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// Storage: EncointerCeremonies MeetupTimeOffset (r:0 w:1) + /// Proof Skipped: EncointerCeremonies MeetupTimeOffset (max_values: Some(1), max_size: None, mode: Measured) fn set_meetup_time_offset() -> Weight { - Weight::from_parts(32_000_000, 0) + // Proof Size summary in bytes: + // Measured: `73` + // Estimated: `1486` + // Minimum execution time: 10_374_000 picoseconds. + Weight::from_parts(10_844_000, 0) + .saturating_add(Weight::from_parts(0, 1486)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: EncointerCeremonies ReputationLifetime (r:0 w:1) + /// Storage: EncointerCeremonies ReputationLifetime (r:0 w:1) + /// Proof Skipped: EncointerCeremonies ReputationLifetime (max_values: Some(1), max_size: None, mode: Measured) fn set_reputation_lifetime() -> Weight { - Weight::from_parts(28_000_000, 0) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 8_514_000 picoseconds. + Weight::from_parts(8_789_000, 0) + .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: EncointerCeremonies EndorsementTicketsPerBootstrapper (r:0 w:1) + /// Storage: EncointerCeremonies EndorsementTicketsPerBootstrapper (r:0 w:1) + /// Proof Skipped: EncointerCeremonies EndorsementTicketsPerBootstrapper (max_values: Some(1), max_size: None, mode: Measured) fn set_endorsement_tickets_per_bootstrapper() -> Weight { - Weight::from_parts(30_000_000, 0) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 8_173_000 picoseconds. + Weight::from_parts(8_489_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: EncointerCeremonies EndorsementTicketsPerReputable (r:0 w:1) + /// Proof Skipped: EncointerCeremonies EndorsementTicketsPerReputable (max_values: Some(1), max_size: None, mode: Measured) + fn set_endorsement_tickets_per_reputable() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 8_431_000 picoseconds. + Weight::from_parts(8_612_000, 0) + .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: EncointerCeremonies TimeTolerance (r:0 w:1) + /// Storage: EncointerCeremonies TimeTolerance (r:0 w:1) + /// Proof Skipped: EncointerCeremonies TimeTolerance (max_values: Some(1), max_size: None, mode: Measured) fn set_time_tolerance() -> Weight { - Weight::from_parts(32_000_000, 0) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 8_506_000 picoseconds. + Weight::from_parts(8_655_000, 0) + .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: EncointerCeremonies LocationTolerance (r:0 w:1) + /// Storage: EncointerCeremonies LocationTolerance (r:0 w:1) + /// Proof Skipped: EncointerCeremonies LocationTolerance (max_values: Some(1), max_size: None, mode: Measured) fn set_location_tolerance() -> Weight { - Weight::from_parts(28_000_000, 0) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 8_300_000 picoseconds. + Weight::from_parts(8_793_000, 0) + .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: EncointerCeremonies Assignments (r:0 w:1) - // Storage: EncointerCeremonies ParticipantReputation (r:0 w:1) - // Storage: EncointerCeremonies MeetupCount (r:0 w:1) - // Storage: EncointerCeremonies ReputableRegistry (r:0 w:1) - // Storage: EncointerCeremonies NewbieCount (r:0 w:1) - // Storage: EncointerCeremonies ReputableCount (r:0 w:1) - // Storage: EncointerCeremonies AssignmentCounts (r:0 w:1) - // Storage: EncointerCeremonies BootstrapperCount (r:0 w:1) - // Storage: EncointerCeremonies ReputableIndex (r:0 w:1) - // Storage: EncointerCeremonies AttestationCount (r:0 w:1) - // Storage: EncointerCeremonies EndorseeCount (r:0 w:1) - // Storage: EncointerCeremonies EndorseesCount (r:0 w:1) + /// Storage: EncointerCeremonies ReputableRegistry (r:1 w:1) + /// Proof Skipped: EncointerCeremonies ReputableRegistry (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies ReputableIndex (r:1 w:1) + /// Proof Skipped: EncointerCeremonies ReputableIndex (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies ParticipantReputation (r:1 w:1) + /// Proof Skipped: EncointerCeremonies ParticipantReputation (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies Assignments (r:0 w:1) + /// Proof Skipped: EncointerCeremonies Assignments (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies MeetupCount (r:0 w:1) + /// Proof Skipped: EncointerCeremonies MeetupCount (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies NewbieCount (r:0 w:1) + /// Proof Skipped: EncointerCeremonies NewbieCount (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies ReputableCount (r:0 w:1) + /// Proof Skipped: EncointerCeremonies ReputableCount (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies AssignmentCounts (r:0 w:1) + /// Proof Skipped: EncointerCeremonies AssignmentCounts (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies BootstrapperCount (r:0 w:1) + /// Proof Skipped: EncointerCeremonies BootstrapperCount (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies AttestationCount (r:0 w:1) + /// Proof Skipped: EncointerCeremonies AttestationCount (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies EndorseeCount (r:0 w:1) + /// Proof Skipped: EncointerCeremonies EndorseeCount (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies EndorseesCount (r:0 w:1) + /// Proof Skipped: EncointerCeremonies EndorseesCount (max_values: None, max_size: None, mode: Measured) fn purge_community_ceremony() -> Weight { - Weight::from_parts(185_000_000, 0) + // Proof Size summary in bytes: + // Measured: `641` + // Estimated: `4106` + // Minimum execution time: 74_214_000 picoseconds. + Weight::from_parts(76_621_000, 0) + .saturating_add(Weight::from_parts(0, 4106)) + .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(12)) } - fn upgrade_registration() -> Weight { - Weight::from_parts(247_000_000, 0) - .saturating_add(T::DbWeight::get().reads(15)) - .saturating_add(T::DbWeight::get().writes(8)) - } - - fn unregister_participant() -> Weight { - Weight::from_parts(91_000_000, 0) - .saturating_add(T::DbWeight::get().reads(9)) - .saturating_add(T::DbWeight::get().writes(5)) - } - fn set_endorsement_tickets_per_reputable() -> Weight { - Weight::from_parts(38_000_000_u64, 0).saturating_add(T::DbWeight::get().writes(1)) - } } diff --git a/polkadot-parachains/encointer-runtime/src/weights/pallet_encointer_communities.rs b/polkadot-parachains/encointer-runtime/src/weights/pallet_encointer_communities.rs index e4725065..da64e979 100644 --- a/polkadot-parachains/encointer-runtime/src/weights/pallet_encointer_communities.rs +++ b/polkadot-parachains/encointer-runtime/src/weights/pallet_encointer_communities.rs @@ -2,12 +2,15 @@ //! Autogenerated weights for `pallet_encointer_communities` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-03-21, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `caribe`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("encointer-rococo-local-dev"), DB CACHE: 1024 // Executed Command: // target/release/encointer-collator // benchmark +// pallet // --chain=encointer-rococo-local-dev // --steps=50 // --repeat=20 @@ -21,85 +24,163 @@ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +#![allow(missing_docs)] use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; +use core::marker::PhantomData; /// Weight functions for `pallet_encointer_communities`. pub struct WeightInfo(PhantomData); impl pallet_encointer_communities::WeightInfo for WeightInfo { - // Storage: EncointerCommunities CommunityIdentifiers (r:1 w:1) - // Storage: EncointerCommunities MaxSpeedMps (r:1 w:0) - // Storage: EncointerCommunities MinSolarTripTimeS (r:1 w:0) - // Storage: EncointerCommunities CommunityIdentifiersByGeohash (r:1 w:1) - // Storage: EncointerCommunities Locations (r:1 w:1) - // Storage: EncointerCommunities NominalIncome (r:0 w:1) - // Storage: EncointerCommunities CommunityMetadata (r:0 w:1) - // Storage: EncointerCommunities Bootstrappers (r:0 w:1) - // Storage: EncointerBalances DemurragePerBlock (r:0 w:1) + /// Storage: EncointerCommunities CommunityIdentifiers (r:1 w:1) + /// Proof: EncointerCommunities CommunityIdentifiers (max_values: Some(1), max_size: Some(90002), added: 90497, mode: MaxEncodedLen) + /// Storage: EncointerCommunities MaxSpeedMps (r:1 w:0) + /// Proof: EncointerCommunities MaxSpeedMps (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: EncointerCommunities MinSolarTripTimeS (r:1 w:0) + /// Proof: EncointerCommunities MinSolarTripTimeS (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: EncointerCommunities CommunityIdentifiersByGeohash (r:1 w:1) + /// Proof: EncointerCommunities CommunityIdentifiersByGeohash (max_values: None, max_size: Some(90007), added: 92482, mode: MaxEncodedLen) + /// Storage: EncointerCommunities Locations (r:1 w:1) + /// Proof: EncointerCommunities Locations (max_values: None, max_size: Some(320032), added: 322507, mode: MaxEncodedLen) + /// Storage: EncointerCommunities NominalIncome (r:0 w:1) + /// Proof: EncointerCommunities NominalIncome (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) + /// Storage: EncointerCommunities CommunityMetadata (r:0 w:1) + /// Proof: EncointerCommunities CommunityMetadata (max_values: None, max_size: Some(1352), added: 3827, mode: MaxEncodedLen) + /// Storage: EncointerCommunities Bootstrappers (r:0 w:1) + /// Proof: EncointerCommunities Bootstrappers (max_values: None, max_size: Some(320027), added: 322502, mode: MaxEncodedLen) + /// Storage: EncointerBalances DemurragePerBlock (r:0 w:1) + /// Proof: EncointerBalances DemurragePerBlock (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) fn new_community() -> Weight { - Weight::from_parts(8_678_000_000, 0) + // Proof Size summary in bytes: + // Measured: `6448` + // Estimated: `323497` + // Minimum execution time: 5_643_876_000 picoseconds. + Weight::from_parts(5_676_264_000, 0) + .saturating_add(Weight::from_parts(0, 323497)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(7)) } - // Storage: EncointerScheduler CurrentPhase (r:1 w:0) - // Storage: EncointerCommunities CommunityIdentifiers (r:1 w:0) - // Storage: EncointerCommunities MaxSpeedMps (r:1 w:0) - // Storage: EncointerCommunities MinSolarTripTimeS (r:1 w:0) - // Storage: EncointerCommunities CommunityIdentifiersByGeohash (r:1 w:0) - // Storage: EncointerCommunities Locations (r:1 w:1) + /// Storage: EncointerScheduler CurrentPhase (r:1 w:0) + /// Proof: EncointerScheduler CurrentPhase (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// Storage: EncointerCommunities CommunityIdentifiers (r:1 w:0) + /// Proof: EncointerCommunities CommunityIdentifiers (max_values: Some(1), max_size: Some(90002), added: 90497, mode: MaxEncodedLen) + /// Storage: EncointerCommunities MaxSpeedMps (r:1 w:0) + /// Proof: EncointerCommunities MaxSpeedMps (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: EncointerCommunities MinSolarTripTimeS (r:1 w:0) + /// Proof: EncointerCommunities MinSolarTripTimeS (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: EncointerCommunities CommunityIdentifiersByGeohash (r:1 w:0) + /// Proof: EncointerCommunities CommunityIdentifiersByGeohash (max_values: None, max_size: Some(90007), added: 92482, mode: MaxEncodedLen) + /// Storage: EncointerCommunities Locations (r:1 w:1) + /// Proof: EncointerCommunities Locations (max_values: None, max_size: Some(320032), added: 322507, mode: MaxEncodedLen) fn add_location() -> Weight { - Weight::from_parts(9_091_000_000, 0) + // Proof Size summary in bytes: + // Measured: `6521` + // Estimated: `323497` + // Minimum execution time: 5_627_080_000 picoseconds. + Weight::from_parts(5_682_831_000, 0) + .saturating_add(Weight::from_parts(0, 323497)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: EncointerScheduler CurrentPhase (r:1 w:0) - // Storage: EncointerCommunities CommunityIdentifiers (r:1 w:0) - // Storage: EncointerCommunities Locations (r:1 w:1) + /// Storage: EncointerScheduler CurrentPhase (r:1 w:0) + /// Proof: EncointerScheduler CurrentPhase (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// Storage: EncointerCommunities CommunityIdentifiers (r:1 w:0) + /// Proof: EncointerCommunities CommunityIdentifiers (max_values: Some(1), max_size: Some(90002), added: 90497, mode: MaxEncodedLen) + /// Storage: EncointerCommunities Locations (r:1 w:1) + /// Proof: EncointerCommunities Locations (max_values: None, max_size: Some(320032), added: 322507, mode: MaxEncodedLen) fn remove_location() -> Weight { - Weight::from_parts(61_000_000, 0) + // Proof Size summary in bytes: + // Measured: `6500` + // Estimated: `323497` + // Minimum execution time: 37_629_000 picoseconds. + Weight::from_parts(39_837_000, 0) + .saturating_add(Weight::from_parts(0, 323497)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: EncointerCommunities CommunityIdentifiers (r:1 w:0) - // Storage: EncointerCommunities CommunityMetadata (r:0 w:1) + /// Storage: EncointerCommunities CommunityIdentifiers (r:1 w:0) + /// Proof: EncointerCommunities CommunityIdentifiers (max_values: Some(1), max_size: Some(90002), added: 90497, mode: MaxEncodedLen) + /// Storage: EncointerCommunities CommunityMetadata (r:0 w:1) + /// Proof: EncointerCommunities CommunityMetadata (max_values: None, max_size: Some(1352), added: 3827, mode: MaxEncodedLen) fn update_community_metadata() -> Weight { - Weight::from_parts(34_000_000, 0) + // Proof Size summary in bytes: + // Measured: `221` + // Estimated: `91487` + // Minimum execution time: 16_765_000 picoseconds. + Weight::from_parts(17_226_000, 0) + .saturating_add(Weight::from_parts(0, 91487)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: EncointerCommunities CommunityIdentifiers (r:1 w:0) - // Storage: EncointerBalances DemurragePerBlock (r:0 w:1) + /// Storage: EncointerCommunities CommunityIdentifiers (r:1 w:0) + /// Proof: EncointerCommunities CommunityIdentifiers (max_values: Some(1), max_size: Some(90002), added: 90497, mode: MaxEncodedLen) + /// Storage: EncointerBalances DemurragePerBlock (r:0 w:1) + /// Proof: EncointerBalances DemurragePerBlock (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) fn update_demurrage() -> Weight { - Weight::from_parts(31_000_000, 0) + // Proof Size summary in bytes: + // Measured: `221` + // Estimated: `91487` + // Minimum execution time: 14_259_000 picoseconds. + Weight::from_parts(14_985_000, 0) + .saturating_add(Weight::from_parts(0, 91487)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: EncointerCommunities CommunityIdentifiers (r:1 w:0) - // Storage: EncointerCommunities NominalIncome (r:0 w:1) + /// Storage: EncointerCommunities CommunityIdentifiers (r:1 w:0) + /// Proof: EncointerCommunities CommunityIdentifiers (max_values: Some(1), max_size: Some(90002), added: 90497, mode: MaxEncodedLen) + /// Storage: EncointerCommunities NominalIncome (r:0 w:1) + /// Proof: EncointerCommunities NominalIncome (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) fn update_nominal_income() -> Weight { - Weight::from_parts(31_000_000, 0) + // Proof Size summary in bytes: + // Measured: `221` + // Estimated: `91487` + // Minimum execution time: 14_959_000 picoseconds. + Weight::from_parts(15_675_000, 0) + .saturating_add(Weight::from_parts(0, 91487)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: EncointerCommunities MinSolarTripTimeS (r:0 w:1) + /// Storage: EncointerCommunities MinSolarTripTimeS (r:0 w:1) + /// Proof: EncointerCommunities MinSolarTripTimeS (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) fn set_min_solar_trip_time_s() -> Weight { - Weight::from_parts(22_000_000, 0) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 8_071_000 picoseconds. + Weight::from_parts(8_746_000, 0) + .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: EncointerCommunities MaxSpeedMps (r:0 w:1) + /// Storage: EncointerCommunities MaxSpeedMps (r:0 w:1) + /// Proof: EncointerCommunities MaxSpeedMps (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) fn set_max_speed_mps() -> Weight { - Weight::from_parts(22_000_000, 0) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 8_080_000 picoseconds. + Weight::from_parts(8_636_000, 0) + .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: EncointerCommunities Locations (r:2 w:1) - // Storage: EncointerCommunities CommunityIdentifiersByGeohash (r:1 w:1) - // Storage: EncointerCommunities CommunityIdentifiers (r:1 w:1) - // Storage: EncointerCommunities NominalIncome (r:0 w:1) - // Storage: EncointerCommunities CommunityMetadata (r:0 w:1) - // Storage: EncointerCommunities Bootstrappers (r:0 w:1) + /// Storage: EncointerCommunities Locations (r:2 w:1) + /// Proof: EncointerCommunities Locations (max_values: None, max_size: Some(320032), added: 322507, mode: MaxEncodedLen) + /// Storage: EncointerCommunities CommunityIdentifiersByGeohash (r:1 w:1) + /// Proof: EncointerCommunities CommunityIdentifiersByGeohash (max_values: None, max_size: Some(90007), added: 92482, mode: MaxEncodedLen) + /// Storage: EncointerCommunities CommunityIdentifiers (r:1 w:1) + /// Proof: EncointerCommunities CommunityIdentifiers (max_values: Some(1), max_size: Some(90002), added: 90497, mode: MaxEncodedLen) + /// Storage: EncointerCommunities NominalIncome (r:0 w:1) + /// Proof: EncointerCommunities NominalIncome (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) + /// Storage: EncointerCommunities CommunityMetadata (r:0 w:1) + /// Proof: EncointerCommunities CommunityMetadata (max_values: None, max_size: Some(1352), added: 3827, mode: MaxEncodedLen) + /// Storage: EncointerCommunities Bootstrappers (r:0 w:1) + /// Proof: EncointerCommunities Bootstrappers (max_values: None, max_size: Some(320027), added: 322502, mode: MaxEncodedLen) fn purge_community() -> Weight { - Weight::from_parts(44_041_000_000, 0) + // Proof Size summary in bytes: + // Measured: `482` + // Estimated: `646004` + // Minimum execution time: 45_935_000 picoseconds. + Weight::from_parts(47_790_000, 0) + .saturating_add(Weight::from_parts(0, 646004)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(6)) } diff --git a/polkadot-parachains/encointer-runtime/src/weights/pallet_encointer_faucet.rs b/polkadot-parachains/encointer-runtime/src/weights/pallet_encointer_faucet.rs new file mode 100644 index 00000000..1567e280 --- /dev/null +++ b/polkadot-parachains/encointer-runtime/src/weights/pallet_encointer_faucet.rs @@ -0,0 +1,122 @@ + +//! Autogenerated weights for `pallet_encointer_faucet` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `caribe`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("encointer-rococo-local-dev"), DB CACHE: 1024 + +// Executed Command: +// target/release/encointer-collator +// benchmark +// pallet +// --chain=encointer-rococo-local-dev +// --steps=50 +// --repeat=20 +// --pallet=pallet_encointer_faucet +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=polkadot-parachains/encointer-runtime/src/weights/pallet_encointer_faucet.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_encointer_faucet`. +pub struct WeightInfo(PhantomData); +impl pallet_encointer_faucet::WeightInfo for WeightInfo { + /// Storage: EncointerCommunities CommunityIdentifiers (r:1 w:0) + /// Proof: EncointerCommunities CommunityIdentifiers (max_values: Some(1), max_size: Some(90002), added: 90497, mode: MaxEncodedLen) + /// Storage: EncointerFaucet Faucets (r:1 w:1) + /// Proof: EncointerFaucet Faucets (max_values: None, max_size: Some(9373), added: 11848, mode: MaxEncodedLen) + /// Storage: EncointerFaucet ReserveAmount (r:1 w:0) + /// Proof: EncointerFaucet ReserveAmount (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) + /// Storage: Balances Reserves (r:1 w:1) + /// Proof: Balances Reserves (max_values: None, max_size: Some(1249), added: 3724, mode: MaxEncodedLen) + /// Storage: System Account (r:2 w:2) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: EncointerReputationCommitments CurrentPurposeId (r:1 w:1) + /// Proof: EncointerReputationCommitments CurrentPurposeId (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) + /// Storage: EncointerReputationCommitments Purposes (r:0 w:1) + /// Proof: EncointerReputationCommitments Purposes (max_values: None, max_size: Some(138), added: 2613, mode: MaxEncodedLen) + fn create_faucet() -> Weight { + // Proof Size summary in bytes: + // Measured: `371` + // Estimated: `91487` + // Minimum execution time: 94_701_000 picoseconds. + Weight::from_parts(97_700_000, 0) + .saturating_add(Weight::from_parts(0, 91487)) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(6)) + } + /// Storage: EncointerFaucet Faucets (r:1 w:0) + /// Proof: EncointerFaucet Faucets (max_values: None, max_size: Some(9373), added: 11848, mode: MaxEncodedLen) + /// Storage: EncointerReputationCommitments Purposes (r:1 w:0) + /// Proof: EncointerReputationCommitments Purposes (max_values: None, max_size: Some(138), added: 2613, mode: MaxEncodedLen) + /// Storage: EncointerCeremonies ParticipantReputation (r:1 w:0) + /// Proof Skipped: EncointerCeremonies ParticipantReputation (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerReputationCommitments Commitments (r:1 w:1) + /// Proof: EncointerReputationCommitments Commitments (max_values: None, max_size: Some(102), added: 2577, mode: MaxEncodedLen) + /// Storage: System Account (r:2 w:2) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + fn drip() -> Weight { + // Proof Size summary in bytes: + // Measured: `680` + // Estimated: `12838` + // Minimum execution time: 72_829_000 picoseconds. + Weight::from_parts(76_945_000, 0) + .saturating_add(Weight::from_parts(0, 12838)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: EncointerFaucet Faucets (r:1 w:1) + /// Proof: EncointerFaucet Faucets (max_values: None, max_size: Some(9373), added: 11848, mode: MaxEncodedLen) + /// Storage: Balances Reserves (r:1 w:1) + /// Proof: Balances Reserves (max_values: None, max_size: Some(1249), added: 3724, mode: MaxEncodedLen) + /// Storage: System Account (r:3 w:3) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + fn dissolve_faucet() -> Weight { + // Proof Size summary in bytes: + // Measured: `507` + // Estimated: `12838` + // Minimum execution time: 78_329_000 picoseconds. + Weight::from_parts(80_171_000, 0) + .saturating_add(Weight::from_parts(0, 12838)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(5)) + } + /// Storage: EncointerFaucet Faucets (r:1 w:1) + /// Proof: EncointerFaucet Faucets (max_values: None, max_size: Some(9373), added: 11848, mode: MaxEncodedLen) + /// Storage: System Account (r:2 w:2) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: Balances Reserves (r:1 w:1) + /// Proof: Balances Reserves (max_values: None, max_size: Some(1249), added: 3724, mode: MaxEncodedLen) + fn close_faucet() -> Weight { + // Proof Size summary in bytes: + // Measured: `507` + // Estimated: `12838` + // Minimum execution time: 72_776_000 picoseconds. + Weight::from_parts(74_301_000, 0) + .saturating_add(Weight::from_parts(0, 12838)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) + } + /// Storage: EncointerFaucet ReserveAmount (r:0 w:1) + /// Proof: EncointerFaucet ReserveAmount (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) + fn set_reserve_amount() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 7_612_000 picoseconds. + Weight::from_parts(8_143_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } +} diff --git a/polkadot-parachains/encointer-runtime/src/weights/pallet_encointer_reputation_commitments.rs b/polkadot-parachains/encointer-runtime/src/weights/pallet_encointer_reputation_commitments.rs new file mode 100644 index 00000000..c85a0c53 --- /dev/null +++ b/polkadot-parachains/encointer-runtime/src/weights/pallet_encointer_reputation_commitments.rs @@ -0,0 +1,65 @@ + +//! Autogenerated weights for `pallet_encointer_reputation_commitments` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `caribe`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("encointer-rococo-local-dev"), DB CACHE: 1024 + +// Executed Command: +// target/release/encointer-collator +// benchmark +// pallet +// --chain=encointer-rococo-local-dev +// --steps=50 +// --repeat=20 +// --pallet=pallet_encointer_reputation_commitments +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=polkadot-parachains/encointer-runtime/src/weights/pallet_encointer_reputation_commitments.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_encointer_reputation_commitments`. +pub struct WeightInfo(PhantomData); +impl pallet_encointer_reputation_commitments::WeightInfo for WeightInfo { + /// Storage: EncointerReputationCommitments CurrentPurposeId (r:1 w:1) + /// Proof: EncointerReputationCommitments CurrentPurposeId (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) + /// Storage: EncointerReputationCommitments Purposes (r:0 w:1) + /// Proof: EncointerReputationCommitments Purposes (max_values: None, max_size: Some(138), added: 2613, mode: MaxEncodedLen) + fn register_purpose() -> Weight { + // Proof Size summary in bytes: + // Measured: `4` + // Estimated: `1493` + // Minimum execution time: 21_094_000 picoseconds. + Weight::from_parts(22_125_000, 0) + .saturating_add(Weight::from_parts(0, 1493)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: EncointerReputationCommitments Purposes (r:1 w:0) + /// Proof: EncointerReputationCommitments Purposes (max_values: None, max_size: Some(138), added: 2613, mode: MaxEncodedLen) + /// Storage: EncointerCeremonies ParticipantReputation (r:1 w:0) + /// Proof Skipped: EncointerCeremonies ParticipantReputation (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerReputationCommitments Commitments (r:1 w:1) + /// Proof: EncointerReputationCommitments Commitments (max_values: None, max_size: Some(102), added: 2577, mode: MaxEncodedLen) + fn commit_reputation() -> Weight { + // Proof Size summary in bytes: + // Measured: `329` + // Estimated: `3794` + // Minimum execution time: 36_854_000 picoseconds. + Weight::from_parts(39_205_000, 0) + .saturating_add(Weight::from_parts(0, 3794)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(1)) + } +} diff --git a/polkadot-parachains/encointer-runtime/src/weights/pallet_encointer_scheduler.rs b/polkadot-parachains/encointer-runtime/src/weights/pallet_encointer_scheduler.rs index 715adbb4..8fc6dd74 100644 --- a/polkadot-parachains/encointer-runtime/src/weights/pallet_encointer_scheduler.rs +++ b/polkadot-parachains/encointer-runtime/src/weights/pallet_encointer_scheduler.rs @@ -2,12 +2,15 @@ //! Autogenerated weights for `pallet_encointer_scheduler` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-03-21, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `caribe`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("encointer-rococo-local-dev"), DB CACHE: 1024 // Executed Command: // target/release/encointer-collator // benchmark +// pallet // --chain=encointer-rococo-local-dev // --steps=50 // --repeat=20 @@ -21,40 +24,68 @@ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +#![allow(missing_docs)] use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; +use core::marker::PhantomData; /// Weight functions for `pallet_encointer_scheduler`. pub struct WeightInfo(PhantomData); impl pallet_encointer_scheduler::WeightInfo for WeightInfo { - // Storage: EncointerScheduler CurrentPhase (r:1 w:1) - // Storage: EncointerScheduler CurrentCeremonyIndex (r:1 w:1) - // Storage: EncointerScheduler NextPhaseTimestamp (r:1 w:1) - // Storage: EncointerScheduler PhaseDurations (r:3 w:0) - // Storage: Timestamp Now (r:1 w:0) - // Storage: EncointerCeremonies ReputationLifetime (r:1 w:0) - // Storage: EncointerCeremonies InactivityTimeout (r:1 w:0) - // Storage: EncointerCommunities CommunityIdentifiers (r:1 w:0) + /// Storage: EncointerScheduler CurrentPhase (r:1 w:1) + /// Proof: EncointerScheduler CurrentPhase (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// Storage: EncointerScheduler CurrentCeremonyIndex (r:1 w:1) + /// Proof: EncointerScheduler CurrentCeremonyIndex (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: EncointerScheduler NextPhaseTimestamp (r:1 w:1) + /// Proof: EncointerScheduler NextPhaseTimestamp (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) + /// Storage: EncointerScheduler PhaseDurations (r:3 w:0) + /// Proof: EncointerScheduler PhaseDurations (max_values: None, max_size: Some(25), added: 2500, mode: MaxEncodedLen) + /// Storage: Timestamp Now (r:1 w:0) + /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) + /// Storage: EncointerCeremonies ReputationLifetime (r:1 w:0) + /// Proof Skipped: EncointerCeremonies ReputationLifetime (max_values: Some(1), max_size: None, mode: Measured) fn next_phase() -> Weight { - Weight::from_parts(83_000_000, 0) - .saturating_add(T::DbWeight::get().reads(10)) + // Proof Size summary in bytes: + // Measured: `409` + // Estimated: `8490` + // Minimum execution time: 61_397_000 picoseconds. + Weight::from_parts(63_823_000, 0) + .saturating_add(Weight::from_parts(0, 8490)) + .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(3)) } - // Storage: EncointerScheduler NextPhaseTimestamp (r:1 w:1) + /// Storage: EncointerScheduler NextPhaseTimestamp (r:1 w:1) + /// Proof: EncointerScheduler NextPhaseTimestamp (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) fn push_by_one_day() -> Weight { - Weight::from_parts(24_000_000, 0) + // Proof Size summary in bytes: + // Measured: `73` + // Estimated: `1493` + // Minimum execution time: 14_946_000 picoseconds. + Weight::from_parts(15_438_000, 0) + .saturating_add(Weight::from_parts(0, 1493)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: EncointerScheduler PhaseDurations (r:0 w:1) + /// Storage: EncointerScheduler PhaseDurations (r:0 w:1) + /// Proof: EncointerScheduler PhaseDurations (max_values: None, max_size: Some(25), added: 2500, mode: MaxEncodedLen) fn set_phase_duration() -> Weight { - Weight::from_parts(3_000_000, 0) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 5_814_000 picoseconds. + Weight::from_parts(6_076_000, 0) + .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: EncointerScheduler NextPhaseTimestamp (r:0 w:1) + /// Storage: EncointerScheduler NextPhaseTimestamp (r:0 w:1) + /// Proof: EncointerScheduler NextPhaseTimestamp (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) fn set_next_phase_timestamp() -> Weight { - Weight::from_parts(2_000_000, 0) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 4_283_000 picoseconds. + Weight::from_parts(4_476_000, 0) + .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } } diff --git a/polkadot-parachains/encointer-runtime/src/weights/pallet_membership.rs b/polkadot-parachains/encointer-runtime/src/weights/pallet_membership.rs index 26cc1296..844851fd 100644 --- a/polkadot-parachains/encointer-runtime/src/weights/pallet_membership.rs +++ b/polkadot-parachains/encointer-runtime/src/weights/pallet_membership.rs @@ -2,13 +2,16 @@ //! Autogenerated weights for `pallet_membership` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-03-21, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("encointer-rococo-fresh"), DB CACHE: 1024 +//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `caribe`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("encointer-rococo-local-dev"), DB CACHE: 1024 // Executed Command: // target/release/encointer-collator // benchmark -// --chain=encointer-rococo-fresh +// pallet +// --chain=encointer-rococo-local-dev // --steps=50 // --repeat=20 // --pallet=pallet_membership @@ -21,88 +24,162 @@ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +#![allow(missing_docs)] use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; +use core::marker::PhantomData; /// Weight functions for `pallet_membership`. pub struct WeightInfo(PhantomData); impl pallet_membership::WeightInfo for WeightInfo { - // Storage: Membership Members (r:1 w:1) - // Storage: Collective Proposals (r:1 w:0) - // Storage: Collective Members (r:0 w:1) - // Storage: Collective Prime (r:0 w:1) + /// Storage: Membership Members (r:1 w:1) + /// Proof: Membership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen) + /// Storage: Collective Proposals (r:1 w:0) + /// Proof Skipped: Collective Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Collective Members (r:0 w:1) + /// Proof Skipped: Collective Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Collective Prime (r:0 w:1) + /// Proof Skipped: Collective Prime (max_values: Some(1), max_size: None, mode: Measured) + /// The range of component `m` is `[1, 99]`. fn add_member(m: u32, ) -> Weight { - Weight::from_parts(35_155_000, 0) - // Standard Error: 3_000 - .saturating_add(Weight::from_parts(144_000_u64, 0).saturating_mul(m.into())) + // Proof Size summary in bytes: + // Measured: `102 + m * (64 ±0)` + // Estimated: `4687 + m * (64 ±0)` + // Minimum execution time: 16_503_000 picoseconds. + Weight::from_parts(22_233_968, 0) + .saturating_add(Weight::from_parts(0, 4687)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) } - // Storage: Membership Members (r:1 w:1) - // Storage: Collective Proposals (r:1 w:0) - // Storage: Membership Prime (r:1 w:0) - // Storage: Collective Members (r:0 w:1) - // Storage: Collective Prime (r:0 w:1) + /// Storage: Membership Members (r:1 w:1) + /// Proof: Membership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen) + /// Storage: Collective Proposals (r:1 w:0) + /// Proof Skipped: Collective Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Membership Prime (r:1 w:0) + /// Proof: Membership Prime (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + /// Storage: Collective Members (r:0 w:1) + /// Proof Skipped: Collective Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Collective Prime (r:0 w:1) + /// Proof Skipped: Collective Prime (max_values: Some(1), max_size: None, mode: Measured) + /// The range of component `m` is `[2, 100]`. fn remove_member(m: u32, ) -> Weight { - Weight::from_parts(41_616_000, 0) - // Standard Error: 1_000 - .saturating_add(Weight::from_parts(127_000_u64, 0).saturating_mul(m.into())) + // Proof Size summary in bytes: + // Measured: `206 + m * (64 ±0)` + // Estimated: `4687 + m * (64 ±0)` + // Minimum execution time: 16_035_000 picoseconds. + Weight::from_parts(16_899_394, 0) + .saturating_add(Weight::from_parts(0, 4687)) + // Standard Error: 569 + .saturating_add(Weight::from_parts(26_212, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) } - // Storage: Membership Members (r:1 w:1) - // Storage: Collective Proposals (r:1 w:0) - // Storage: Membership Prime (r:1 w:0) - // Storage: Collective Members (r:0 w:1) - // Storage: Collective Prime (r:0 w:1) + /// Storage: Membership Members (r:1 w:1) + /// Proof: Membership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen) + /// Storage: Collective Proposals (r:1 w:0) + /// Proof Skipped: Collective Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Membership Prime (r:1 w:0) + /// Proof: Membership Prime (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + /// Storage: Collective Members (r:0 w:1) + /// Proof Skipped: Collective Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Collective Prime (r:0 w:1) + /// Proof Skipped: Collective Prime (max_values: Some(1), max_size: None, mode: Measured) + /// The range of component `m` is `[2, 100]`. fn swap_member(m: u32, ) -> Weight { - Weight::from_parts(41_459_000, 0) - // Standard Error: 3_000 - .saturating_add(Weight::from_parts(162_000_u64, 0).saturating_mul(m.into())) + // Proof Size summary in bytes: + // Measured: `206 + m * (64 ±0)` + // Estimated: `4687 + m * (64 ±0)` + // Minimum execution time: 15_874_000 picoseconds. + Weight::from_parts(16_897_269, 0) + .saturating_add(Weight::from_parts(0, 4687)) + // Standard Error: 463 + .saturating_add(Weight::from_parts(37_531, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) } - // Storage: Membership Members (r:1 w:1) - // Storage: Collective Proposals (r:1 w:0) - // Storage: Membership Prime (r:1 w:0) - // Storage: Collective Members (r:0 w:1) - // Storage: Collective Prime (r:0 w:1) + /// Storage: Membership Members (r:1 w:1) + /// Proof: Membership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen) + /// Storage: Collective Proposals (r:1 w:0) + /// Proof Skipped: Collective Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Membership Prime (r:1 w:0) + /// Proof: Membership Prime (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + /// Storage: Collective Members (r:0 w:1) + /// Proof Skipped: Collective Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Collective Prime (r:0 w:1) + /// Proof Skipped: Collective Prime (max_values: Some(1), max_size: None, mode: Measured) + /// The range of component `m` is `[1, 100]`. fn reset_member(m: u32, ) -> Weight { - Weight::from_parts(41_378_000, 0) - // Standard Error: 2_000 - .saturating_add(Weight::from_parts(325_000_u64, 0).saturating_mul(m.into())) + // Proof Size summary in bytes: + // Measured: `206 + m * (64 ±0)` + // Estimated: `4687 + m * (64 ±0)` + // Minimum execution time: 15_407_000 picoseconds. + Weight::from_parts(17_311_131, 0) + .saturating_add(Weight::from_parts(0, 4687)) + // Standard Error: 892 + .saturating_add(Weight::from_parts(118_312, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) } - // Storage: Membership Members (r:1 w:1) - // Storage: Collective Proposals (r:1 w:0) - // Storage: Membership Prime (r:1 w:1) - // Storage: Collective Members (r:0 w:1) - // Storage: Collective Prime (r:0 w:1) + /// Storage: Membership Members (r:1 w:1) + /// Proof: Membership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen) + /// Storage: Collective Proposals (r:1 w:0) + /// Proof Skipped: Collective Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Membership Prime (r:1 w:1) + /// Proof: Membership Prime (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + /// Storage: Collective Members (r:0 w:1) + /// Proof Skipped: Collective Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Collective Prime (r:0 w:1) + /// Proof Skipped: Collective Prime (max_values: Some(1), max_size: None, mode: Measured) + /// The range of component `m` is `[1, 100]`. fn change_key(m: u32, ) -> Weight { - Weight::from_parts(44_099_000, 0) - // Standard Error: 1_000 - .saturating_add(Weight::from_parts(139_000_u64, 0).saturating_mul(m.into())) + // Proof Size summary in bytes: + // Measured: `206 + m * (64 ±0)` + // Estimated: `4687 + m * (64 ±0)` + // Minimum execution time: 16_110_000 picoseconds. + Weight::from_parts(17_298_112, 0) + .saturating_add(Weight::from_parts(0, 4687)) + // Standard Error: 705 + .saturating_add(Weight::from_parts(37_102, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) } - // Storage: Membership Members (r:1 w:0) - // Storage: Membership Prime (r:0 w:1) - // Storage: Collective Prime (r:0 w:1) + /// Storage: Membership Members (r:1 w:0) + /// Proof: Membership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen) + /// Storage: Membership Prime (r:0 w:1) + /// Proof: Membership Prime (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + /// Storage: Collective Prime (r:0 w:1) + /// Proof Skipped: Collective Prime (max_values: Some(1), max_size: None, mode: Measured) + /// The range of component `m` is `[1, 100]`. fn set_prime(m: u32, ) -> Weight { - Weight::from_parts(10_973_000, 0) - // Standard Error: 0 - .saturating_add(Weight::from_parts(103_000_u64, 0).saturating_mul(m.into())) + // Proof Size summary in bytes: + // Measured: `32 + m * (32 ±0)` + // Estimated: `4687 + m * (32 ±0)` + // Minimum execution time: 5_906_000 picoseconds. + Weight::from_parts(6_230_458, 0) + .saturating_add(Weight::from_parts(0, 4687)) + // Standard Error: 230 + .saturating_add(Weight::from_parts(7_792, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) + .saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into())) } - // Storage: Membership Prime (r:0 w:1) - // Storage: Collective Prime (r:0 w:1) - fn clear_prime(m: u32, ) -> Weight { - Weight::from_parts(3_660_000, 0) - // Standard Error: 0 - .saturating_add(Weight::from_parts(3_000_u64, 0).saturating_mul(m.into())) + /// Storage: Membership Prime (r:0 w:1) + /// Proof: Membership Prime (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + /// Storage: Collective Prime (r:0 w:1) + /// Proof Skipped: Collective Prime (max_values: Some(1), max_size: None, mode: Measured) + /// The range of component `m` is `[1, 100]`. + fn clear_prime(_m: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_695_000 picoseconds. + Weight::from_parts(2_946_268, 0) + .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(2)) } } diff --git a/polkadot-parachains/encointer-runtime/src/weights/pallet_proxy.rs b/polkadot-parachains/encointer-runtime/src/weights/pallet_proxy.rs index c67d28ce..c28ce0c2 100644 --- a/polkadot-parachains/encointer-runtime/src/weights/pallet_proxy.rs +++ b/polkadot-parachains/encointer-runtime/src/weights/pallet_proxy.rs @@ -1,126 +1,208 @@ -// Copyright 2021 Parity Technologies (UK) Ltd. -// This file is part of Cumulus. - -// Cumulus is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Cumulus is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Cumulus. If not, see . //! Autogenerated weights for `pallet_proxy` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-03-28, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemine-dev"), DB CACHE: 1024 +//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `caribe`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("encointer-rococo-local-dev"), DB CACHE: 1024 // Executed Command: -// ./target/production/polkadot-collator +// target/release/encointer-collator // benchmark -// --chain=statemine-dev -// --execution=wasm -// --wasm-execution=compiled -// --pallet=pallet_proxy -// --extrinsic=* +// pallet +// --chain=encointer-rococo-local-dev // --steps=50 // --repeat=20 -// --json-file=./bench-statemine.json -// --header=./file_header.txt -// --output=./polkadot-parachains/statemine/src/weights +// --pallet=pallet_proxy +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=polkadot-parachains/encointer-runtime/src/weights/pallet_proxy.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +#![allow(missing_docs)] use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; +use core::marker::PhantomData; /// Weight functions for `pallet_proxy`. pub struct WeightInfo(PhantomData); impl pallet_proxy::WeightInfo for WeightInfo { - // Storage: Proxy Proxies (r:1 w:0) - fn proxy(p: u32, ) -> Weight { - Weight::from_parts(13_530_000, 0) - // Standard Error: 2_000 - .saturating_add(Weight::from_parts(91_000_u64, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(1)) - } - // Storage: Proxy Proxies (r:1 w:0) - // Storage: Proxy Announcements (r:1 w:1) - // Storage: System Account (r:1 w:1) - fn proxy_announced(a: u32, p: u32, ) -> Weight { - Weight::from_parts(29_316_000, 0) - // Standard Error: 1_000 - .saturating_add(Weight::from_parts(218_000_u64, 0).saturating_mul(a.into())) - // Standard Error: 1_000 - .saturating_add(Weight::from_parts(92_000_u64, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(2)) - } - // Storage: Proxy Announcements (r:1 w:1) - // Storage: System Account (r:1 w:1) - fn remove_announcement(a: u32, p: u32, ) -> Weight { - Weight::from_parts(19_752_000, 0) - // Standard Error: 1_000 - .saturating_add(Weight::from_parts(230_000_u64, 0).saturating_mul(a.into())) - // Standard Error: 1_000 - .saturating_add(Weight::from_parts(14_000_u64, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - } - // Storage: Proxy Announcements (r:1 w:1) - // Storage: System Account (r:1 w:1) - fn reject_announcement(a: u32, p: u32, ) -> Weight { - Weight::from_parts(19_699_000, 0) - // Standard Error: 1_000 - .saturating_add(Weight::from_parts(231_000_u64, 0).saturating_mul(a.into())) - // Standard Error: 1_000 - .saturating_add(Weight::from_parts(16_000_u64, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - } - // Storage: Proxy Proxies (r:1 w:0) - // Storage: Proxy Announcements (r:1 w:1) - // Storage: System Account (r:1 w:1) - fn announce(a: u32, p: u32, ) -> Weight { - Weight::from_parts(27_298_000, 0) - // Standard Error: 1_000 - .saturating_add(Weight::from_parts(218_000_u64, 0).saturating_mul(a.into())) - // Standard Error: 1_000 - .saturating_add(Weight::from_parts(88_000_u64, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(2)) - } - // Storage: Proxy Proxies (r:1 w:1) - fn add_proxy(p: u32, ) -> Weight { - Weight::from_parts(22_349_000, 0) - // Standard Error: 2_000 - .saturating_add(Weight::from_parts(147_000_u64, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - // Storage: Proxy Proxies (r:1 w:1) - fn remove_proxy(p: u32, ) -> Weight { - Weight::from_parts(18_618_000, 0) - // Standard Error: 2_000 - .saturating_add(Weight::from_parts(161_000_u64, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - // Storage: Proxy Proxies (r:1 w:1) - fn remove_proxies(p: u32, ) -> Weight { - Weight::from_parts(18_655_000, 0) - // Standard Error: 1_000 - .saturating_add(Weight::from_parts(85_000_u64, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - fn create_pure(_: u32) -> Weight { todo!() } - fn kill_pure(_: u32) -> Weight { todo!() } + /// Storage: Proxy Proxies (r:1 w:0) + /// Proof: Proxy Proxies (max_values: None, max_size: Some(1241), added: 3716, mode: MaxEncodedLen) + /// The range of component `p` is `[1, 31]`. + fn proxy(p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `127 + p * (37 ±0)` + // Estimated: `4706` + // Minimum execution time: 12_149_000 picoseconds. + Weight::from_parts(12_734_566, 0) + .saturating_add(Weight::from_parts(0, 4706)) + // Standard Error: 1_902 + .saturating_add(Weight::from_parts(28_028, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(1)) + } + /// Storage: Proxy Proxies (r:1 w:0) + /// Proof: Proxy Proxies (max_values: None, max_size: Some(1241), added: 3716, mode: MaxEncodedLen) + /// Storage: Proxy Announcements (r:1 w:1) + /// Proof: Proxy Announcements (max_values: None, max_size: Some(2233), added: 4708, mode: MaxEncodedLen) + /// Storage: System Account (r:1 w:1) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// The range of component `a` is `[0, 31]`. + /// The range of component `p` is `[1, 31]`. + fn proxy_announced(a: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `417 + a * (68 ±0) + p * (37 ±0)` + // Estimated: `5698` + // Minimum execution time: 31_507_000 picoseconds. + Weight::from_parts(31_594_293, 0) + .saturating_add(Weight::from_parts(0, 5698)) + // Standard Error: 4_810 + .saturating_add(Weight::from_parts(180_418, 0).saturating_mul(a.into())) + // Standard Error: 4_969 + .saturating_add(Weight::from_parts(39_603, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: Proxy Announcements (r:1 w:1) + /// Proof: Proxy Announcements (max_values: None, max_size: Some(2233), added: 4708, mode: MaxEncodedLen) + /// Storage: System Account (r:1 w:1) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// The range of component `a` is `[0, 31]`. + /// The range of component `p` is `[1, 31]`. + fn remove_announcement(a: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `332 + a * (68 ±0)` + // Estimated: `5698` + // Minimum execution time: 20_284_000 picoseconds. + Weight::from_parts(20_722_105, 0) + .saturating_add(Weight::from_parts(0, 5698)) + // Standard Error: 2_298 + .saturating_add(Weight::from_parts(169_410, 0).saturating_mul(a.into())) + // Standard Error: 2_374 + .saturating_add(Weight::from_parts(10_908, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: Proxy Announcements (r:1 w:1) + /// Proof: Proxy Announcements (max_values: None, max_size: Some(2233), added: 4708, mode: MaxEncodedLen) + /// Storage: System Account (r:1 w:1) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// The range of component `a` is `[0, 31]`. + /// The range of component `p` is `[1, 31]`. + fn reject_announcement(a: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `332 + a * (68 ±0)` + // Estimated: `5698` + // Minimum execution time: 20_140_000 picoseconds. + Weight::from_parts(20_848_925, 0) + .saturating_add(Weight::from_parts(0, 5698)) + // Standard Error: 1_778 + .saturating_add(Weight::from_parts(165_375, 0).saturating_mul(a.into())) + // Standard Error: 1_838 + .saturating_add(Weight::from_parts(5_838, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: Proxy Proxies (r:1 w:0) + /// Proof: Proxy Proxies (max_values: None, max_size: Some(1241), added: 3716, mode: MaxEncodedLen) + /// Storage: Proxy Announcements (r:1 w:1) + /// Proof: Proxy Announcements (max_values: None, max_size: Some(2233), added: 4708, mode: MaxEncodedLen) + /// Storage: System Account (r:1 w:1) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// The range of component `a` is `[0, 31]`. + /// The range of component `p` is `[1, 31]`. + fn announce(a: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `349 + a * (68 ±0) + p * (37 ±0)` + // Estimated: `5698` + // Minimum execution time: 28_744_000 picoseconds. + Weight::from_parts(29_073_555, 0) + .saturating_add(Weight::from_parts(0, 5698)) + // Standard Error: 3_689 + .saturating_add(Weight::from_parts(157_914, 0).saturating_mul(a.into())) + // Standard Error: 3_812 + .saturating_add(Weight::from_parts(17_443, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: Proxy Proxies (r:1 w:1) + /// Proof: Proxy Proxies (max_values: None, max_size: Some(1241), added: 3716, mode: MaxEncodedLen) + /// The range of component `p` is `[1, 31]`. + fn add_proxy(p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `127 + p * (37 ±0)` + // Estimated: `4706` + // Minimum execution time: 21_558_000 picoseconds. + Weight::from_parts(22_491_797, 0) + .saturating_add(Weight::from_parts(0, 4706)) + // Standard Error: 4_992 + .saturating_add(Weight::from_parts(46_402, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: Proxy Proxies (r:1 w:1) + /// Proof: Proxy Proxies (max_values: None, max_size: Some(1241), added: 3716, mode: MaxEncodedLen) + /// The range of component `p` is `[1, 31]`. + fn remove_proxy(p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `127 + p * (37 ±0)` + // Estimated: `4706` + // Minimum execution time: 21_541_000 picoseconds. + Weight::from_parts(22_387_406, 0) + .saturating_add(Weight::from_parts(0, 4706)) + // Standard Error: 4_158 + .saturating_add(Weight::from_parts(53_564, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: Proxy Proxies (r:1 w:1) + /// Proof: Proxy Proxies (max_values: None, max_size: Some(1241), added: 3716, mode: MaxEncodedLen) + /// The range of component `p` is `[1, 31]`. + fn remove_proxies(p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `127 + p * (37 ±0)` + // Estimated: `4706` + // Minimum execution time: 18_742_000 picoseconds. + Weight::from_parts(19_693_746, 0) + .saturating_add(Weight::from_parts(0, 4706)) + // Standard Error: 2_662 + .saturating_add(Weight::from_parts(21_173, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: Proxy Proxies (r:1 w:1) + /// Proof: Proxy Proxies (max_values: None, max_size: Some(1241), added: 3716, mode: MaxEncodedLen) + /// The range of component `p` is `[1, 31]`. + fn create_pure(p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `139` + // Estimated: `4706` + // Minimum execution time: 23_280_000 picoseconds. + Weight::from_parts(23_905_541, 0) + .saturating_add(Weight::from_parts(0, 4706)) + // Standard Error: 1_045 + .saturating_add(Weight::from_parts(16_212, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: Proxy Proxies (r:1 w:1) + /// Proof: Proxy Proxies (max_values: None, max_size: Some(1241), added: 3716, mode: MaxEncodedLen) + /// The range of component `p` is `[0, 30]`. + fn kill_pure(p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `164 + p * (37 ±0)` + // Estimated: `4706` + // Minimum execution time: 19_541_000 picoseconds. + Weight::from_parts(20_085_014, 0) + .saturating_add(Weight::from_parts(0, 4706)) + // Standard Error: 3_921 + .saturating_add(Weight::from_parts(58_923, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } } diff --git a/polkadot-parachains/encointer-runtime/src/weights/pallet_timestamp.rs b/polkadot-parachains/encointer-runtime/src/weights/pallet_timestamp.rs index 697d5601..81a55117 100644 --- a/polkadot-parachains/encointer-runtime/src/weights/pallet_timestamp.rs +++ b/polkadot-parachains/encointer-runtime/src/weights/pallet_timestamp.rs @@ -2,13 +2,16 @@ //! Autogenerated weights for `pallet_timestamp` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-03-21, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("encointer-rococo-fresh"), DB CACHE: 1024 +//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `caribe`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("encointer-rococo-local-dev"), DB CACHE: 1024 // Executed Command: // target/release/encointer-collator // benchmark -// --chain=encointer-rococo-fresh +// pallet +// --chain=encointer-rococo-local-dev // --steps=50 // --repeat=20 // --pallet=pallet_timestamp @@ -21,20 +24,38 @@ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +#![allow(missing_docs)] use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; +use core::marker::PhantomData; /// Weight functions for `pallet_timestamp`. pub struct WeightInfo(PhantomData); impl pallet_timestamp::WeightInfo for WeightInfo { - // Storage: Timestamp Now (r:1 w:1) + /// Storage: Timestamp Now (r:1 w:1) + /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) + /// Storage: EncointerScheduler NextPhaseTimestamp (r:1 w:1) + /// Proof: EncointerScheduler NextPhaseTimestamp (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) + /// Storage: EncointerScheduler CurrentCeremonyIndex (r:1 w:0) + /// Proof: EncointerScheduler CurrentCeremonyIndex (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: EncointerScheduler PhaseDurations (r:3 w:0) + /// Proof: EncointerScheduler PhaseDurations (max_values: None, max_size: Some(25), added: 2500, mode: MaxEncodedLen) fn set() -> Weight { - Weight::from_parts(11_000_000, 0) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) + // Proof Size summary in bytes: + // Measured: `201` + // Estimated: `8490` + // Minimum execution time: 37_112_000 picoseconds. + Weight::from_parts(38_652_000, 0) + .saturating_add(Weight::from_parts(0, 8490)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(2)) } fn on_finalize() -> Weight { - Weight::from_parts(7_000_000, 0) + // Proof Size summary in bytes: + // Measured: `94` + // Estimated: `0` + // Minimum execution time: 5_720_000 picoseconds. + Weight::from_parts(6_127_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } } diff --git a/polkadot-parachains/encointer-runtime/src/weights/pallet_treasury.rs b/polkadot-parachains/encointer-runtime/src/weights/pallet_treasury.rs index 70d79c63..3e1d6240 100644 --- a/polkadot-parachains/encointer-runtime/src/weights/pallet_treasury.rs +++ b/polkadot-parachains/encointer-runtime/src/weights/pallet_treasury.rs @@ -2,13 +2,16 @@ //! Autogenerated weights for `pallet_treasury` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-03-21, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("encointer-rococo-fresh"), DB CACHE: 1024 +//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `caribe`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("encointer-rococo-local-dev"), DB CACHE: 1024 // Executed Command: // target/release/encointer-collator // benchmark -// --chain=encointer-rococo-fresh +// pallet +// --chain=encointer-rococo-local-dev // --steps=50 // --repeat=20 // --pallet=pallet_treasury @@ -21,55 +24,101 @@ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +#![allow(missing_docs)] use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; +use core::marker::PhantomData; /// Weight functions for `pallet_treasury`. pub struct WeightInfo(PhantomData); impl pallet_treasury::WeightInfo for WeightInfo { fn spend() -> Weight { - Weight::from_parts(150_000, 0) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 366_000 picoseconds. + Weight::from_parts(420_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - // Storage: Treasury ProposalCount (r:1 w:1) - // Storage: Treasury Proposals (r:0 w:1) + /// Storage: Treasury ProposalCount (r:1 w:1) + /// Proof: Treasury ProposalCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: Treasury Proposals (r:0 w:1) + /// Proof: Treasury Proposals (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) fn propose_spend() -> Weight { - Weight::from_parts(57_000_000, 0) + // Proof Size summary in bytes: + // Measured: `107` + // Estimated: `1489` + // Minimum execution time: 44_556_000 picoseconds. + Weight::from_parts(45_578_000, 0) + .saturating_add(Weight::from_parts(0, 1489)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: Treasury Proposals (r:1 w:1) - // Storage: System Account (r:1 w:1) + /// Storage: Treasury Proposals (r:1 w:1) + /// Proof: Treasury Proposals (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + /// Storage: System Account (r:1 w:1) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) fn reject_proposal() -> Weight { - Weight::from_parts(64_000_000, 0) + // Proof Size summary in bytes: + // Measured: `265` + // Estimated: `3593` + // Minimum execution time: 45_779_000 picoseconds. + Weight::from_parts(47_134_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - - fn remove_approval() -> Weight { - Weight::from_parts(64_000_000, 0) + /// Storage: Treasury Proposals (r:1 w:0) + /// Proof: Treasury Proposals (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + /// Storage: Treasury Approvals (r:1 w:1) + /// Proof: Treasury Approvals (max_values: Some(1), max_size: Some(41), added: 536, mode: MaxEncodedLen) + /// The range of component `p` is `[0, 9]`. + fn approve_proposal(_p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `118 + p * (31 ±0)` + // Estimated: `3573` + // Minimum execution time: 9_093_000 picoseconds. + Weight::from_parts(11_820_833, 0) + .saturating_add(Weight::from_parts(0, 3573)) .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Treasury Proposals (r:1 w:0) - // Storage: Treasury Approvals (r:1 w:1) - fn approve_proposal(p: u32, ) -> Weight { - Weight::from_parts(15_471_000, 0) - // Standard Error: 28_000 - .saturating_add(Weight::from_parts(424_000_u64, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(2)) + /// Storage: Treasury Approvals (r:1 w:1) + /// Proof: Treasury Approvals (max_values: Some(1), max_size: Some(41), added: 536, mode: MaxEncodedLen) + fn remove_approval() -> Weight { + // Proof Size summary in bytes: + // Measured: `90` + // Estimated: `1526` + // Minimum execution time: 5_560_000 picoseconds. + Weight::from_parts(5_797_000, 0) + .saturating_add(Weight::from_parts(0, 1526)) + .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Treasury Approvals (r:1 w:1) - // Storage: Treasury Proposals (r:1 w:1) - // Storage: System Account (r:2 w:2) + /// Storage: Treasury Deactivated (r:1 w:1) + /// Proof: Treasury Deactivated (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) + /// Storage: Balances InactiveIssuance (r:1 w:1) + /// Proof: Balances InactiveIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) + /// Storage: Treasury Approvals (r:1 w:1) + /// Proof: Treasury Approvals (max_values: Some(1), max_size: Some(41), added: 536, mode: MaxEncodedLen) + /// Storage: Treasury Proposals (r:10 w:10) + /// Proof: Treasury Proposals (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + /// Storage: System Account (r:20 w:20) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// The range of component `p` is `[0, 10]`. fn on_initialize_proposals(p: u32, ) -> Weight { - Weight::from_parts(73_000_000, 0) - // Standard Error: 277_000 - .saturating_add(Weight::from_parts(84_516_000_u64, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(1)) + // Proof Size summary in bytes: + // Measured: `39 + p * (232 ±0)` + // Estimated: `1526 + p * (5206 ±0)` + // Minimum execution time: 26_465_000 picoseconds. + Weight::from_parts(34_535_717, 0) + .saturating_add(Weight::from_parts(0, 1526)) + // Standard Error: 69_073 + .saturating_add(Weight::from_parts(43_631_242, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(p.into()))) - .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(p.into()))) + .saturating_add(Weight::from_parts(0, 5206).saturating_mul(p.into())) } } diff --git a/polkadot-parachains/encointer-runtime/src/weights/pallet_utility.rs b/polkadot-parachains/encointer-runtime/src/weights/pallet_utility.rs index 5c262482..879b30c8 100644 --- a/polkadot-parachains/encointer-runtime/src/weights/pallet_utility.rs +++ b/polkadot-parachains/encointer-runtime/src/weights/pallet_utility.rs @@ -2,13 +2,16 @@ //! Autogenerated weights for `pallet_utility` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-03-21, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("encointer-rococo-fresh"), DB CACHE: 1024 +//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `caribe`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("encointer-rococo-local-dev"), DB CACHE: 1024 // Executed Command: // target/release/encointer-collator // benchmark -// --chain=encointer-rococo-fresh +// pallet +// --chain=encointer-rococo-local-dev // --steps=50 // --repeat=20 // --pallet=pallet_utility @@ -21,32 +24,61 @@ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +#![allow(missing_docs)] use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; +use core::marker::PhantomData; /// Weight functions for `pallet_utility`. pub struct WeightInfo(PhantomData); impl pallet_utility::WeightInfo for WeightInfo { + /// The range of component `c` is `[0, 1000]`. fn batch(c: u32, ) -> Weight { - Weight::from_parts(54_338_000, 0) - // Standard Error: 18_000 - .saturating_add(Weight::from_parts(8_410_000_u64, 0).saturating_mul(c.into())) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 10_709_000 picoseconds. + Weight::from_parts(94_666_060, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 7_075 + .saturating_add(Weight::from_parts(4_763_921, 0).saturating_mul(c.into())) } fn as_derivative() -> Weight { - Weight::from_parts(6_000_000, 0) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 4_625_000 picoseconds. + Weight::from_parts(4_855_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } + /// The range of component `c` is `[0, 1000]`. fn batch_all(c: u32, ) -> Weight { - Weight::from_parts(216_369_000, 0) - // Standard Error: 22_000 - .saturating_add(Weight::from_parts(7_644_000_u64, 0).saturating_mul(c.into())) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 6_014_000 picoseconds. + Weight::from_parts(10_865_846, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 4_092 + .saturating_add(Weight::from_parts(5_138_384, 0).saturating_mul(c.into())) } fn dispatch_as() -> Weight { - Weight::from_parts(23_000_000, 0) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 8_101_000 picoseconds. + Weight::from_parts(8_401_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - - fn force_batch(_c: u32) -> Weight { - // Todo: dummy weight need to rerun benchmarks - Weight::from_parts(23_000_000, 0) + /// The range of component `c` is `[0, 1000]`. + fn force_batch(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 5_996_000 picoseconds. + Weight::from_parts(4_430_678, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 2_835 + .saturating_add(Weight::from_parts(4_874_052, 0).saturating_mul(c.into())) } } diff --git a/polkadot-parachains/encointer-runtime/src/xcm_config.rs b/polkadot-parachains/encointer-runtime/src/xcm_config.rs index 4e97c665..5eb856ee 100644 --- a/polkadot-parachains/encointer-runtime/src/xcm_config.rs +++ b/polkadot-parachains/encointer-runtime/src/xcm_config.rs @@ -186,6 +186,11 @@ pub type XcmRouter = ( XcmpQueue, ); +#[cfg(feature = "runtime-benchmarks")] +parameter_types! { + pub ReachableDest: Option = Some(Parent.into()); +} + impl pallet_xcm::Config for Runtime { type RuntimeEvent = RuntimeEvent; // We want to disallow users sending (arbitrary) XCMs from this chain. @@ -209,6 +214,8 @@ impl pallet_xcm::Config for Runtime { type SovereignAccountOf = LocationToAccountId; type MaxLockers = ConstU32<8>; type WeightInfo = pallet_xcm::TestWeightInfo; + #[cfg(feature = "runtime-benchmarks")] + type ReachableDest = ReachableDest; type AdminOrigin = EnsureRoot; type UniversalLocation = UniversalLocation; } diff --git a/polkadot-parachains/launch-runtime/Cargo.toml b/polkadot-parachains/launch-runtime/Cargo.toml index 7267bf17..b534b163 100644 --- a/polkadot-parachains/launch-runtime/Cargo.toml +++ b/polkadot-parachains/launch-runtime/Cargo.toml @@ -82,9 +82,9 @@ substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", bran [features] default = ["std"] runtime-benchmarks = [ - "frame-benchmarking", + "frame-benchmarking/runtime-benchmarks", "frame-support/runtime-benchmarks", - "frame-system-benchmarking", + "frame-system-benchmarking/runtime-benchmarks", "hex-literal", "sp-runtime/runtime-benchmarks", "xcm-builder/runtime-benchmarks", diff --git a/polkadot-parachains/launch-runtime/src/xcm_config.rs b/polkadot-parachains/launch-runtime/src/xcm_config.rs index 9f6aa694..2d9737af 100644 --- a/polkadot-parachains/launch-runtime/src/xcm_config.rs +++ b/polkadot-parachains/launch-runtime/src/xcm_config.rs @@ -188,6 +188,11 @@ pub type XcmRouter = ( XcmpQueue, ); +#[cfg(feature = "runtime-benchmarks")] +parameter_types! { + pub ReachableDest: Option = Some(Parent.into()); +} + impl pallet_xcm::Config for Runtime { type RuntimeEvent = RuntimeEvent; // We want to disallow users sending (arbitrary) XCMs from this chain. @@ -212,6 +217,8 @@ impl pallet_xcm::Config for Runtime { type MaxLockers = ConstU32<8>; type WeightInfo = pallet_xcm::TestWeightInfo; type AdminOrigin = EnsureRoot; + #[cfg(feature = "runtime-benchmarks")] + type ReachableDest = ReachableDest; type UniversalLocation = UniversalLocation; } diff --git a/polkadot-parachains/runtime-common/src/lib.rs b/polkadot-parachains/runtime-common/src/lib.rs index fab345b7..47dc3984 100644 --- a/polkadot-parachains/runtime-common/src/lib.rs +++ b/polkadot-parachains/runtime-common/src/lib.rs @@ -25,3 +25,6 @@ pub mod weights; // copied from cumulus/parachains/runtimes/assets/statemine/constants mod constants; pub use constants::{currency, fee}; + +pub const MILLISECS_PER_BLOCK: u64 = 12000; +pub const SLOT_DURATION: u64 = MILLISECS_PER_BLOCK; diff --git a/polkadot-parachains/src/chain_spec.rs b/polkadot-parachains/src/chain_spec.rs index 61e2cc8f..e7711169 100644 --- a/polkadot-parachains/src/chain_spec.rs +++ b/polkadot-parachains/src/chain_spec.rs @@ -240,6 +240,9 @@ fn encointer_genesis( // lower values lead to lower fees in CC proportionally fee_conversion_factor: 100_000, }, + encointer_faucet: parachain_runtime::EncointerFaucetConfig { + reserve_amount: 10_000_000_000_000, + }, } } diff --git a/polkadot-parachains/src/command.rs b/polkadot-parachains/src/command.rs index bf82b01b..4f966c42 100644 --- a/polkadot-parachains/src/command.rs +++ b/polkadot-parachains/src/command.rs @@ -374,34 +374,25 @@ pub fn run() -> Result<()> { }, #[cfg(feature = "try-runtime")] Some(Subcommand::TryRuntime(cmd)) => { - // grab the task manager. + use parachain_runtime::MILLISECS_PER_BLOCK; + use try_runtime_cli::block_building_info::timestamp_with_aura_info; + let runner = cli.create_runner(cmd)?; + + type HostFunctions = + (sp_io::SubstrateHostFunctions, frame_benchmarking::benchmarking::HostFunctions); + + // grab the task manager. let registry = &runner.config().prometheus_config.as_ref().map(|cfg| &cfg.registry); let task_manager = sc_service::TaskManager::new(runner.config().tokio_handle.clone(), *registry) .map_err(|e| format!("Error: {:?}", e))?; - use sc_executor::{sp_wasm_interface::ExtendedHostFunctions, NativeExecutionDispatch}; - type HostFunctionsOf = ExtendedHostFunctions< - sp_io::SubstrateHostFunctions, - ::ExtendHostFunctions, - >; - if runner.config().chain_spec.is_launch() { - runner.async_run(|_| { - Ok(( - cmd.run::>(), - task_manager, - )) - }) - } else if runner.config().chain_spec.is_encointer() { - runner.async_run(|_| { - Ok(( - cmd.run::>(), - task_manager, - )) - }) - } else { - Err("Chain doesn't support try-runtime".into()) - } + + let info_provider = timestamp_with_aura_info(MILLISECS_PER_BLOCK); + + runner.async_run(|_| { + Ok((cmd.run::(Some(info_provider)), task_manager)) + }) }, #[cfg(not(feature = "try-runtime"))] Some(Subcommand::TryRuntime) => Err("Try-runtime was not enabled when building the node. \ diff --git a/polkadot-parachains/src/rpc.rs b/polkadot-parachains/src/rpc.rs index 980868f9..b6e548d6 100644 --- a/polkadot-parachains/src/rpc.rs +++ b/polkadot-parachains/src/rpc.rs @@ -20,7 +20,7 @@ use std::sync::Arc; -use parachain_runtime::Moment; +use parachain_runtime::{AssetBalance, AssetId, Moment}; use parachains_common::{AccountId, Balance, Block, BlockNumber, Index as Nonce}; use sc_client_api::AuxStore; pub use sc_rpc::{DenyUnsafe, SubscriptionTaskExecutor}; @@ -28,7 +28,6 @@ use sc_transaction_pool_api::TransactionPool; use sp_api::ProvideRuntimeApi; use sp_block_builder::BlockBuilder; use sp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata}; - /// A type representing all RPC extensions. pub type RpcExtension = jsonrpsee::RpcModule<()>; @@ -66,6 +65,12 @@ where C::Api: pallet_encointer_communities_rpc_runtime_api::CommunitiesApi, C::Api: pallet_encointer_bazaar_rpc_runtime_api::BazaarApi, + C::Api: encointer_balances_tx_payment_rpc_runtime_api::BalancesTxPaymentApi< + Block, + Balance, + AssetId, + AssetBalance, + >, TBackend: sc_client_api::Backend, // added by encointer >::OffchainStorage: 'static, // added by encointer { diff --git a/scripts/benchmark_encointer_runtime.sh b/scripts/benchmark_encointer_runtime.sh index 1e643288..763a0f89 100755 --- a/scripts/benchmark_encointer_runtime.sh +++ b/scripts/benchmark_encointer_runtime.sh @@ -14,20 +14,23 @@ echo "WEIGHT_OUTPUT_DIR: ${WEIGHT_OUTPUT_DIR}" mkdir -p "$WEIGHT_OUTPUT_DIR" pallets=( - "cumulus_pallet_xcmp_queue" - "frame_system" \ - "pallet_balances" \ - "pallet_collective" \ +# "cumulus_pallet_xcmp_queue" +# "frame_system" \ +# "pallet_balances" \ +# "pallet_collective" \ # ^^^ takes some time to complete - "pallet_membership" \ - "pallet_timestamp" \ - "pallet_treasury" \ - "pallet_utility" \ - "pallet_encointer_balances" \ - "pallet_encointer_bazaar" \ - "pallet_encointer_ceremonies" \ - "pallet_encointer_communities" \ - "pallet_encointer_scheduler" \ +# "pallet_membership" \ +# "pallet_timestamp" \ +# "pallet_treasury" \ +# "pallet_utility" \ + "pallet_proxy" \ +# "pallet_encointer_balances" \ +# "pallet_encointer_bazaar" \ +# "pallet_encointer_ceremonies" \ +# "pallet_encointer_communities" \ +# "pallet_encointer_scheduler" \ + "pallet_encointer_faucet" \ +# "pallet_encointer_reputation_commitments" \ ) for pallet in ${pallets[*]}; do