mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-09 00:08:00 +00:00
Remove kusama and polkadot runtime crates (#1731)
This pull request is removing the Kusama and Polkadot runtime crates. As still some crates dependent on the runtime crates, this pull request is doing some more changes. - It removes the `hostperfcheck` CLI command. This CLI command could compare the current node against the standard hardware by doing some checks. Later we added the hardware benchmark feature to Substrate. This hardware benchmark is running on every node startup and prints a warning if the current node is too slow. This makes this CLI command a duplicate that was also depending on the kusama runtime. - The pull request is removing the emulated integration tests that were requiring the Kusama or Polkadot runtime crates.
This commit is contained in:
@@ -229,12 +229,12 @@ test-deterministic-wasm:
|
||||
artifacts: false
|
||||
script:
|
||||
# build runtime
|
||||
- WASM_BUILD_NO_COLOR=1 cargo build -q --locked --release -p staging-kusama-runtime -p polkadot-runtime -p westend-runtime
|
||||
- WASM_BUILD_NO_COLOR=1 cargo build -q --locked --release -p westend-runtime -p rococo-runtime
|
||||
# make checksum
|
||||
- sha256sum target/release/wbuild/*-runtime/target/wasm32-unknown-unknown/release/*.wasm > checksum.sha256
|
||||
- cargo clean
|
||||
# build again
|
||||
- WASM_BUILD_NO_COLOR=1 cargo build -q --locked --release -p staging-kusama-runtime -p polkadot-runtime -p westend-runtime
|
||||
- WASM_BUILD_NO_COLOR=1 cargo build -q --locked --release -p westend-runtime -p rococo-runtime
|
||||
# confirm checksum
|
||||
- sha256sum -c checksum.sha256
|
||||
|
||||
|
||||
Generated
-356
@@ -692,30 +692,6 @@ version = "1.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9"
|
||||
|
||||
[[package]]
|
||||
name = "asset-hub-kusama-integration-tests"
|
||||
version = "1.0.0"
|
||||
dependencies = [
|
||||
"assert_matches",
|
||||
"asset-hub-kusama-runtime",
|
||||
"frame-support",
|
||||
"frame-system",
|
||||
"integration-tests-common",
|
||||
"pallet-asset-conversion",
|
||||
"pallet-assets",
|
||||
"pallet-balances",
|
||||
"pallet-xcm",
|
||||
"parachains-common",
|
||||
"parity-scale-codec",
|
||||
"polkadot-core-primitives",
|
||||
"polkadot-parachain-primitives",
|
||||
"polkadot-runtime",
|
||||
"polkadot-runtime-parachains",
|
||||
"sp-runtime",
|
||||
"staging-xcm",
|
||||
"xcm-emulator",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "asset-hub-kusama-runtime"
|
||||
version = "0.9.420"
|
||||
@@ -738,7 +714,6 @@ dependencies = [
|
||||
"frame-system-rpc-runtime-api",
|
||||
"frame-try-runtime",
|
||||
"hex-literal",
|
||||
"kusama-runtime-constants",
|
||||
"log",
|
||||
"pallet-asset-conversion",
|
||||
"pallet-asset-conversion-tx-payment",
|
||||
@@ -790,29 +765,6 @@ dependencies = [
|
||||
"substrate-wasm-builder",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "asset-hub-polkadot-integration-tests"
|
||||
version = "1.0.0"
|
||||
dependencies = [
|
||||
"asset-hub-kusama-runtime",
|
||||
"frame-support",
|
||||
"frame-system",
|
||||
"integration-tests-common",
|
||||
"pallet-asset-conversion",
|
||||
"pallet-assets",
|
||||
"pallet-balances",
|
||||
"pallet-xcm",
|
||||
"parachains-common",
|
||||
"parity-scale-codec",
|
||||
"polkadot-core-primitives",
|
||||
"polkadot-parachain-primitives",
|
||||
"polkadot-runtime",
|
||||
"polkadot-runtime-parachains",
|
||||
"sp-runtime",
|
||||
"staging-xcm",
|
||||
"xcm-emulator",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "asset-hub-polkadot-runtime"
|
||||
version = "0.9.420"
|
||||
@@ -860,7 +812,6 @@ dependencies = [
|
||||
"polkadot-core-primitives",
|
||||
"polkadot-parachain-primitives",
|
||||
"polkadot-runtime-common",
|
||||
"polkadot-runtime-constants",
|
||||
"scale-info",
|
||||
"smallvec",
|
||||
"sp-api",
|
||||
@@ -900,7 +851,6 @@ dependencies = [
|
||||
"parity-scale-codec",
|
||||
"polkadot-core-primitives",
|
||||
"polkadot-parachain-primitives",
|
||||
"polkadot-runtime",
|
||||
"polkadot-runtime-parachains",
|
||||
"sp-runtime",
|
||||
"staging-xcm",
|
||||
@@ -1835,7 +1785,6 @@ dependencies = [
|
||||
"frame-system-rpc-runtime-api",
|
||||
"frame-try-runtime",
|
||||
"hex-literal",
|
||||
"kusama-runtime-constants",
|
||||
"log",
|
||||
"pallet-aura",
|
||||
"pallet-authorship",
|
||||
@@ -1918,7 +1867,6 @@ dependencies = [
|
||||
"polkadot-core-primitives",
|
||||
"polkadot-parachain-primitives",
|
||||
"polkadot-runtime-common",
|
||||
"polkadot-runtime-constants",
|
||||
"scale-info",
|
||||
"serde",
|
||||
"smallvec",
|
||||
@@ -1957,7 +1905,6 @@ dependencies = [
|
||||
"parity-scale-codec",
|
||||
"polkadot-core-primitives",
|
||||
"polkadot-parachain-primitives",
|
||||
"polkadot-runtime",
|
||||
"polkadot-runtime-parachains",
|
||||
"staging-xcm",
|
||||
"xcm-emulator",
|
||||
@@ -2560,32 +2507,6 @@ dependencies = [
|
||||
"unicode-width",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "collectives-polkadot-integration-tests"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"collectives-polkadot-runtime",
|
||||
"cumulus-pallet-parachain-system",
|
||||
"cumulus-pallet-xcmp-queue",
|
||||
"frame-support",
|
||||
"integration-tests-common",
|
||||
"pallet-assets",
|
||||
"pallet-balances",
|
||||
"pallet-core-fellowship",
|
||||
"pallet-salary",
|
||||
"pallet-xcm",
|
||||
"parachains-common",
|
||||
"parity-scale-codec",
|
||||
"polkadot-core-primitives",
|
||||
"polkadot-parachain-primitives",
|
||||
"polkadot-runtime",
|
||||
"polkadot-runtime-parachains",
|
||||
"sp-core",
|
||||
"sp-runtime",
|
||||
"staging-xcm",
|
||||
"xcm-emulator",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "collectives-polkadot-runtime"
|
||||
version = "1.0.0"
|
||||
@@ -2634,7 +2555,6 @@ dependencies = [
|
||||
"polkadot-core-primitives",
|
||||
"polkadot-parachain-primitives",
|
||||
"polkadot-runtime-common",
|
||||
"polkadot-runtime-constants",
|
||||
"scale-info",
|
||||
"smallvec",
|
||||
"sp-api",
|
||||
@@ -2824,7 +2744,6 @@ dependencies = [
|
||||
"frame-system-rpc-runtime-api",
|
||||
"frame-try-runtime",
|
||||
"hex-literal",
|
||||
"kusama-runtime-constants",
|
||||
"log",
|
||||
"pallet-aura",
|
||||
"pallet-authorship",
|
||||
@@ -6379,7 +6298,6 @@ dependencies = [
|
||||
"cumulus-pallet-xcmp-queue",
|
||||
"cumulus-primitives-core",
|
||||
"frame-support",
|
||||
"kusama-runtime-constants",
|
||||
"pallet-assets",
|
||||
"pallet-bridge-messages",
|
||||
"pallet-im-online",
|
||||
@@ -6393,8 +6311,6 @@ dependencies = [
|
||||
"polkadot-core-primitives",
|
||||
"polkadot-parachain-primitives",
|
||||
"polkadot-primitives",
|
||||
"polkadot-runtime",
|
||||
"polkadot-runtime-constants",
|
||||
"polkadot-runtime-parachains",
|
||||
"polkadot-service",
|
||||
"rococo-runtime",
|
||||
@@ -6405,7 +6321,6 @@ dependencies = [
|
||||
"sp-consensus-beefy",
|
||||
"sp-core",
|
||||
"sp-runtime",
|
||||
"staging-kusama-runtime",
|
||||
"staging-xcm",
|
||||
"westend-runtime",
|
||||
"westend-runtime-constants",
|
||||
@@ -6836,19 +6751,6 @@ dependencies = [
|
||||
"substrate-wasm-builder",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "kusama-runtime-constants"
|
||||
version = "1.0.0"
|
||||
dependencies = [
|
||||
"frame-support",
|
||||
"polkadot-primitives",
|
||||
"polkadot-runtime-common",
|
||||
"smallvec",
|
||||
"sp-core",
|
||||
"sp-runtime",
|
||||
"sp-weights",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "kvdb"
|
||||
version = "0.13.0"
|
||||
@@ -10952,7 +10854,6 @@ dependencies = [
|
||||
"cumulus-primitives-utility",
|
||||
"frame-support",
|
||||
"frame-system",
|
||||
"kusama-runtime-constants",
|
||||
"log",
|
||||
"num-traits",
|
||||
"pallet-asset-tx-payment",
|
||||
@@ -10963,7 +10864,6 @@ dependencies = [
|
||||
"parity-scale-codec",
|
||||
"polkadot-core-primitives",
|
||||
"polkadot-primitives",
|
||||
"polkadot-runtime-constants",
|
||||
"rococo-runtime-constants",
|
||||
"scale-info",
|
||||
"smallvec",
|
||||
@@ -11579,7 +11479,6 @@ dependencies = [
|
||||
"futures",
|
||||
"log",
|
||||
"polkadot-node-metrics",
|
||||
"polkadot-performance-test",
|
||||
"polkadot-service",
|
||||
"pyroscope",
|
||||
"pyroscope_pprofrs",
|
||||
@@ -12484,23 +12383,6 @@ dependencies = [
|
||||
"sp-std",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "polkadot-performance-test"
|
||||
version = "1.0.0"
|
||||
dependencies = [
|
||||
"env_logger 0.9.3",
|
||||
"log",
|
||||
"polkadot-erasure-coding",
|
||||
"polkadot-node-core-pvf-prepare-worker",
|
||||
"polkadot-node-primitives",
|
||||
"polkadot-primitives",
|
||||
"quote",
|
||||
"sc-executor-common",
|
||||
"sp-maybe-compressed-blob",
|
||||
"staging-kusama-runtime",
|
||||
"thiserror",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "polkadot-primitives"
|
||||
version = "1.0.0"
|
||||
@@ -12569,111 +12451,6 @@ dependencies = [
|
||||
"substrate-state-trie-migration-rpc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "polkadot-runtime"
|
||||
version = "1.0.0"
|
||||
dependencies = [
|
||||
"bitvec",
|
||||
"frame-benchmarking",
|
||||
"frame-election-provider-support",
|
||||
"frame-executive",
|
||||
"frame-remote-externalities",
|
||||
"frame-support",
|
||||
"frame-system",
|
||||
"frame-system-benchmarking",
|
||||
"frame-system-rpc-runtime-api",
|
||||
"frame-try-runtime",
|
||||
"hex-literal",
|
||||
"log",
|
||||
"pallet-authority-discovery",
|
||||
"pallet-authorship",
|
||||
"pallet-babe",
|
||||
"pallet-bags-list",
|
||||
"pallet-balances",
|
||||
"pallet-bounties",
|
||||
"pallet-child-bounties",
|
||||
"pallet-collective",
|
||||
"pallet-conviction-voting",
|
||||
"pallet-democracy",
|
||||
"pallet-election-provider-multi-phase",
|
||||
"pallet-election-provider-support-benchmarking",
|
||||
"pallet-elections-phragmen",
|
||||
"pallet-fast-unstake",
|
||||
"pallet-grandpa",
|
||||
"pallet-identity",
|
||||
"pallet-im-online",
|
||||
"pallet-indices",
|
||||
"pallet-membership",
|
||||
"pallet-message-queue",
|
||||
"pallet-multisig",
|
||||
"pallet-nomination-pools",
|
||||
"pallet-nomination-pools-benchmarking",
|
||||
"pallet-nomination-pools-runtime-api",
|
||||
"pallet-offences",
|
||||
"pallet-offences-benchmarking",
|
||||
"pallet-preimage",
|
||||
"pallet-proxy",
|
||||
"pallet-referenda",
|
||||
"pallet-scheduler",
|
||||
"pallet-session",
|
||||
"pallet-session-benchmarking",
|
||||
"pallet-staking",
|
||||
"pallet-staking-reward-curve",
|
||||
"pallet-staking-runtime-api",
|
||||
"pallet-timestamp",
|
||||
"pallet-tips",
|
||||
"pallet-transaction-payment",
|
||||
"pallet-transaction-payment-rpc-runtime-api",
|
||||
"pallet-treasury",
|
||||
"pallet-utility",
|
||||
"pallet-vesting",
|
||||
"pallet-whitelist",
|
||||
"pallet-xcm",
|
||||
"pallet-xcm-benchmarks",
|
||||
"parity-scale-codec",
|
||||
"polkadot-primitives",
|
||||
"polkadot-runtime-common",
|
||||
"polkadot-runtime-constants",
|
||||
"polkadot-runtime-parachains",
|
||||
"rustc-hex",
|
||||
"scale-info",
|
||||
"separator",
|
||||
"serde",
|
||||
"serde_derive",
|
||||
"serde_json",
|
||||
"smallvec",
|
||||
"sp-api",
|
||||
"sp-arithmetic",
|
||||
"sp-authority-discovery",
|
||||
"sp-block-builder",
|
||||
"sp-consensus-babe",
|
||||
"sp-consensus-beefy",
|
||||
"sp-core",
|
||||
"sp-genesis-builder",
|
||||
"sp-inherents",
|
||||
"sp-io",
|
||||
"sp-keyring",
|
||||
"sp-mmr-primitives",
|
||||
"sp-npos-elections",
|
||||
"sp-offchain",
|
||||
"sp-runtime",
|
||||
"sp-session",
|
||||
"sp-staking",
|
||||
"sp-std",
|
||||
"sp-storage",
|
||||
"sp-tracing",
|
||||
"sp-transaction-pool",
|
||||
"sp-trie",
|
||||
"sp-version",
|
||||
"staging-xcm",
|
||||
"staging-xcm-builder",
|
||||
"staging-xcm-executor",
|
||||
"static_assertions",
|
||||
"substrate-wasm-builder",
|
||||
"tiny-keccak",
|
||||
"tokio",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "polkadot-runtime-common"
|
||||
version = "1.0.0"
|
||||
@@ -12725,19 +12502,6 @@ dependencies = [
|
||||
"static_assertions",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "polkadot-runtime-constants"
|
||||
version = "1.0.0"
|
||||
dependencies = [
|
||||
"frame-support",
|
||||
"polkadot-primitives",
|
||||
"polkadot-runtime-common",
|
||||
"smallvec",
|
||||
"sp-core",
|
||||
"sp-runtime",
|
||||
"sp-weights",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "polkadot-runtime-metrics"
|
||||
version = "1.0.0"
|
||||
@@ -13157,9 +12921,7 @@ version = "1.0.0"
|
||||
dependencies = [
|
||||
"clap 4.4.4",
|
||||
"generate-bags",
|
||||
"polkadot-runtime",
|
||||
"sp-io",
|
||||
"staging-kusama-runtime",
|
||||
"westend-runtime",
|
||||
]
|
||||
|
||||
@@ -13919,14 +13681,10 @@ version = "1.0.0"
|
||||
dependencies = [
|
||||
"clap 4.4.4",
|
||||
"frame-system",
|
||||
"kusama-runtime-constants",
|
||||
"log",
|
||||
"pallet-bags-list-remote-tests",
|
||||
"polkadot-runtime",
|
||||
"polkadot-runtime-constants",
|
||||
"sp-core",
|
||||
"sp-tracing",
|
||||
"staging-kusama-runtime",
|
||||
"tokio",
|
||||
"westend-runtime",
|
||||
"westend-runtime-constants",
|
||||
@@ -17703,120 +17461,6 @@ version = "1.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3"
|
||||
|
||||
[[package]]
|
||||
name = "staging-kusama-runtime"
|
||||
version = "1.0.0"
|
||||
dependencies = [
|
||||
"binary-merkle-tree",
|
||||
"bitvec",
|
||||
"frame-benchmarking",
|
||||
"frame-election-provider-support",
|
||||
"frame-executive",
|
||||
"frame-remote-externalities",
|
||||
"frame-support",
|
||||
"frame-system",
|
||||
"frame-system-benchmarking",
|
||||
"frame-system-rpc-runtime-api",
|
||||
"frame-try-runtime",
|
||||
"hex-literal",
|
||||
"kusama-runtime-constants",
|
||||
"log",
|
||||
"pallet-authority-discovery",
|
||||
"pallet-authorship",
|
||||
"pallet-babe",
|
||||
"pallet-bags-list",
|
||||
"pallet-balances",
|
||||
"pallet-beefy",
|
||||
"pallet-beefy-mmr",
|
||||
"pallet-bounties",
|
||||
"pallet-child-bounties",
|
||||
"pallet-collective",
|
||||
"pallet-conviction-voting",
|
||||
"pallet-democracy",
|
||||
"pallet-election-provider-multi-phase",
|
||||
"pallet-election-provider-support-benchmarking",
|
||||
"pallet-elections-phragmen",
|
||||
"pallet-fast-unstake",
|
||||
"pallet-grandpa",
|
||||
"pallet-identity",
|
||||
"pallet-im-online",
|
||||
"pallet-indices",
|
||||
"pallet-membership",
|
||||
"pallet-message-queue",
|
||||
"pallet-mmr",
|
||||
"pallet-multisig",
|
||||
"pallet-nis",
|
||||
"pallet-nomination-pools",
|
||||
"pallet-nomination-pools-benchmarking",
|
||||
"pallet-nomination-pools-runtime-api",
|
||||
"pallet-offences",
|
||||
"pallet-offences-benchmarking",
|
||||
"pallet-preimage",
|
||||
"pallet-proxy",
|
||||
"pallet-ranked-collective",
|
||||
"pallet-recovery",
|
||||
"pallet-referenda",
|
||||
"pallet-scheduler",
|
||||
"pallet-session",
|
||||
"pallet-session-benchmarking",
|
||||
"pallet-society",
|
||||
"pallet-staking",
|
||||
"pallet-staking-runtime-api",
|
||||
"pallet-state-trie-migration",
|
||||
"pallet-timestamp",
|
||||
"pallet-tips",
|
||||
"pallet-transaction-payment",
|
||||
"pallet-transaction-payment-rpc-runtime-api",
|
||||
"pallet-treasury",
|
||||
"pallet-utility",
|
||||
"pallet-vesting",
|
||||
"pallet-whitelist",
|
||||
"pallet-xcm",
|
||||
"pallet-xcm-benchmarks",
|
||||
"parity-scale-codec",
|
||||
"polkadot-primitives",
|
||||
"polkadot-runtime-common",
|
||||
"polkadot-runtime-parachains",
|
||||
"rustc-hex",
|
||||
"scale-info",
|
||||
"separator",
|
||||
"serde",
|
||||
"serde_derive",
|
||||
"serde_json",
|
||||
"smallvec",
|
||||
"sp-api",
|
||||
"sp-application-crypto",
|
||||
"sp-arithmetic",
|
||||
"sp-authority-discovery",
|
||||
"sp-block-builder",
|
||||
"sp-consensus-babe",
|
||||
"sp-consensus-beefy",
|
||||
"sp-core",
|
||||
"sp-genesis-builder",
|
||||
"sp-inherents",
|
||||
"sp-io",
|
||||
"sp-keyring",
|
||||
"sp-mmr-primitives",
|
||||
"sp-npos-elections",
|
||||
"sp-offchain",
|
||||
"sp-runtime",
|
||||
"sp-session",
|
||||
"sp-staking",
|
||||
"sp-std",
|
||||
"sp-storage",
|
||||
"sp-tracing",
|
||||
"sp-transaction-pool",
|
||||
"sp-trie",
|
||||
"sp-version",
|
||||
"staging-xcm",
|
||||
"staging-xcm-builder",
|
||||
"staging-xcm-executor",
|
||||
"static_assertions",
|
||||
"substrate-wasm-builder",
|
||||
"tiny-keccak",
|
||||
"tokio",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "staging-xcm"
|
||||
version = "1.0.0"
|
||||
|
||||
@@ -59,11 +59,8 @@ members = [
|
||||
"cumulus/parachain-template/pallets/template",
|
||||
"cumulus/parachain-template/runtime",
|
||||
"cumulus/parachains/common",
|
||||
"cumulus/parachains/integration-tests/emulated/assets/asset-hub-kusama",
|
||||
"cumulus/parachains/integration-tests/emulated/assets/asset-hub-polkadot",
|
||||
"cumulus/parachains/integration-tests/emulated/assets/asset-hub-westend",
|
||||
"cumulus/parachains/integration-tests/emulated/bridges/bridge-hub-rococo",
|
||||
"cumulus/parachains/integration-tests/emulated/collectives/collectives-polkadot",
|
||||
"cumulus/parachains/integration-tests/emulated/common",
|
||||
"cumulus/parachains/pallets/parachain-info",
|
||||
"cumulus/parachains/pallets/ping",
|
||||
@@ -141,7 +138,6 @@ members = [
|
||||
"polkadot/node/subsystem-types",
|
||||
"polkadot/node/subsystem-util",
|
||||
"polkadot/node/test/client",
|
||||
"polkadot/node/test/performance-test",
|
||||
"polkadot/node/test/service",
|
||||
"polkadot/node/zombienet-backchannel",
|
||||
"polkadot/parachain",
|
||||
@@ -156,12 +152,8 @@ members = [
|
||||
"polkadot/rpc",
|
||||
"polkadot/runtime/common",
|
||||
"polkadot/runtime/common/slot_range_helper",
|
||||
"polkadot/runtime/kusama",
|
||||
"polkadot/runtime/kusama/constants",
|
||||
"polkadot/runtime/metrics",
|
||||
"polkadot/runtime/parachains",
|
||||
"polkadot/runtime/polkadot",
|
||||
"polkadot/runtime/polkadot/constants",
|
||||
"polkadot/runtime/rococo",
|
||||
"polkadot/runtime/rococo/constants",
|
||||
"polkadot/runtime/test-runtime",
|
||||
|
||||
@@ -29,8 +29,6 @@ sp-runtime = { path = "../../../substrate/primitives/runtime", default-features
|
||||
sp-std = { path = "../../../substrate/primitives/std", default-features = false }
|
||||
|
||||
# Polkadot
|
||||
kusama-runtime-constants = { path = "../../../polkadot/runtime/kusama/constants", default-features = false}
|
||||
polkadot-runtime-constants = { path = "../../../polkadot/runtime/polkadot/constants", default-features = false}
|
||||
rococo-runtime-constants = { path = "../../../polkadot/runtime/rococo/constants", default-features = false}
|
||||
westend-runtime-constants = { path = "../../../polkadot/runtime/westend/constants", default-features = false}
|
||||
polkadot-core-primitives = { path = "../../../polkadot/core-primitives", default-features = false}
|
||||
@@ -58,7 +56,6 @@ std = [
|
||||
"cumulus-primitives-utility/std",
|
||||
"frame-support/std",
|
||||
"frame-system/std",
|
||||
"kusama-runtime-constants/std",
|
||||
"log/std",
|
||||
"pallet-asset-tx-payment/std",
|
||||
"pallet-assets/std",
|
||||
@@ -67,7 +64,6 @@ std = [
|
||||
"pallet-collator-selection/std",
|
||||
"polkadot-core-primitives/std",
|
||||
"polkadot-primitives/std",
|
||||
"polkadot-runtime-constants/std",
|
||||
"rococo-runtime-constants/std",
|
||||
"sp-consensus-aura/std",
|
||||
"sp-core/std",
|
||||
|
||||
@@ -27,20 +27,20 @@ pub mod consensus {
|
||||
|
||||
/// Constants relating to KSM.
|
||||
pub mod currency {
|
||||
use kusama_runtime_constants as constants;
|
||||
use polkadot_core_primitives::Balance;
|
||||
|
||||
/// The existential deposit. Set to 1/10 of its parent Relay Chain.
|
||||
pub const EXISTENTIAL_DEPOSIT: Balance = constants::currency::EXISTENTIAL_DEPOSIT / 10;
|
||||
pub const EXISTENTIAL_DEPOSIT: Balance = 1 * CENTS / 10;
|
||||
|
||||
pub const UNITS: Balance = constants::currency::UNITS;
|
||||
pub const CENTS: Balance = constants::currency::CENTS;
|
||||
pub const GRAND: Balance = constants::currency::GRAND;
|
||||
pub const MILLICENTS: Balance = constants::currency::MILLICENTS;
|
||||
pub const UNITS: Balance = 1_000_000_000_000;
|
||||
pub const QUID: Balance = UNITS / 30;
|
||||
pub const CENTS: Balance = QUID / 100;
|
||||
pub const GRAND: Balance = QUID * 1_000;
|
||||
pub const MILLICENTS: Balance = CENTS / 1_000;
|
||||
|
||||
pub const fn deposit(items: u32, bytes: u32) -> Balance {
|
||||
// map to 1/100 of what the kusama relay chain charges (v9020)
|
||||
constants::currency::deposit(items, bytes) / 100
|
||||
(items as Balance * 2_000 * CENTS + (bytes as Balance) * 100 * MILLICENTS) / 100
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -48,19 +48,19 @@ pub mod consensus {
|
||||
/// Constants relating to DOT.
|
||||
pub mod currency {
|
||||
use polkadot_core_primitives::Balance;
|
||||
use polkadot_runtime_constants as constants;
|
||||
|
||||
/// The existential deposit. Set to 1/10 of its parent Relay Chain.
|
||||
pub const EXISTENTIAL_DEPOSIT: Balance = constants::currency::EXISTENTIAL_DEPOSIT / 10;
|
||||
pub const EXISTENTIAL_DEPOSIT: Balance = 100 * CENTS / 10;
|
||||
|
||||
pub const UNITS: Balance = constants::currency::UNITS;
|
||||
pub const DOLLARS: Balance = constants::currency::DOLLARS;
|
||||
pub const CENTS: Balance = constants::currency::CENTS;
|
||||
pub const MILLICENTS: Balance = constants::currency::MILLICENTS;
|
||||
pub const UNITS: Balance = 10_000_000_000;
|
||||
pub const DOLLARS: Balance = UNITS; // 10_000_000_000
|
||||
pub const GRAND: Balance = DOLLARS * 1_000; // 10_000_000_000_000
|
||||
pub const CENTS: Balance = DOLLARS / 100; // 100_000_000
|
||||
pub const MILLICENTS: Balance = CENTS / 1_000; // 100_000
|
||||
|
||||
pub const fn deposit(items: u32, bytes: u32) -> Balance {
|
||||
// 1/100 of Polkadot
|
||||
constants::currency::deposit(items, bytes) / 100
|
||||
(items as Balance * 20 * DOLLARS + (bytes as Balance) * 100 * MILLICENTS) / 100
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
[package]
|
||||
name = "asset-hub-kusama-integration-tests"
|
||||
version = "1.0.0"
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
||||
license = "Apache-2.0"
|
||||
description = "Asset Hub Kusama runtime integration tests with xcm-emulator"
|
||||
publish = false
|
||||
|
||||
[dependencies]
|
||||
codec = { package = "parity-scale-codec", version = "3.4.0", default-features = false }
|
||||
assert_matches = "1.5.0"
|
||||
|
||||
# Substrate
|
||||
sp-runtime = { path = "../../../../../../substrate/primitives/runtime", default-features = false}
|
||||
frame-support = { path = "../../../../../../substrate/frame/support", default-features = false}
|
||||
frame-system = { path = "../../../../../../substrate/frame/system", default-features = false}
|
||||
pallet-balances = { path = "../../../../../../substrate/frame/balances", default-features = false}
|
||||
pallet-assets = { path = "../../../../../../substrate/frame/assets", default-features = false}
|
||||
pallet-asset-conversion = { path = "../../../../../../substrate/frame/asset-conversion", default-features = false}
|
||||
|
||||
# Polkadot
|
||||
polkadot-core-primitives = { path = "../../../../../../polkadot/core-primitives", default-features = false}
|
||||
polkadot-parachain-primitives = { path = "../../../../../../polkadot/parachain", default-features = false}
|
||||
polkadot-runtime-parachains = { path = "../../../../../../polkadot/runtime/parachains" }
|
||||
polkadot-runtime = { path = "../../../../../../polkadot/runtime/polkadot" }
|
||||
xcm = { package = "staging-xcm", path = "../../../../../../polkadot/xcm", default-features = false}
|
||||
pallet-xcm = { path = "../../../../../../polkadot/xcm/pallet-xcm", default-features = false}
|
||||
|
||||
# Cumulus
|
||||
parachains-common = { path = "../../../../common" }
|
||||
asset-hub-kusama-runtime = { path = "../../../../runtimes/assets/asset-hub-kusama" }
|
||||
|
||||
# Local
|
||||
xcm-emulator = { path = "../../../../../xcm/xcm-emulator", default-features = false}
|
||||
integration-tests-common = { path = "../../common", default-features = false}
|
||||
|
||||
[features]
|
||||
runtime-benchmarks = [
|
||||
"asset-hub-kusama-runtime/runtime-benchmarks",
|
||||
"frame-support/runtime-benchmarks",
|
||||
"frame-system/runtime-benchmarks",
|
||||
"integration-tests-common/runtime-benchmarks",
|
||||
"pallet-asset-conversion/runtime-benchmarks",
|
||||
"pallet-assets/runtime-benchmarks",
|
||||
"pallet-balances/runtime-benchmarks",
|
||||
"pallet-xcm/runtime-benchmarks",
|
||||
"parachains-common/runtime-benchmarks",
|
||||
"polkadot-parachain-primitives/runtime-benchmarks",
|
||||
"polkadot-runtime-parachains/runtime-benchmarks",
|
||||
"polkadot-runtime/runtime-benchmarks",
|
||||
"sp-runtime/runtime-benchmarks",
|
||||
]
|
||||
@@ -1,90 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
pub use codec::Encode;
|
||||
pub use frame_support::{
|
||||
assert_err, assert_ok,
|
||||
pallet_prelude::Weight,
|
||||
sp_runtime::{AccountId32, DispatchError, DispatchResult},
|
||||
traits::fungibles::Inspect,
|
||||
};
|
||||
pub use integration_tests_common::{
|
||||
constants::{
|
||||
asset_hub_kusama::ED as ASSET_HUB_KUSAMA_ED, kusama::ED as KUSAMA_ED, PROOF_SIZE_THRESHOLD,
|
||||
REF_TIME_THRESHOLD, XCM_V3,
|
||||
},
|
||||
xcm_helpers::{xcm_transact_paid_execution, xcm_transact_unpaid_execution},
|
||||
AssetHubKusama, AssetHubKusamaPallet, AssetHubKusamaReceiver, AssetHubKusamaSender, Kusama,
|
||||
KusamaPallet, KusamaReceiver, KusamaSender, PenpalKusamaA, PenpalKusamaAPallet,
|
||||
PenpalKusamaAReceiver, PenpalKusamaASender, PenpalKusamaB, PenpalKusamaBPallet,
|
||||
};
|
||||
pub use parachains_common::{AccountId, Balance};
|
||||
pub use xcm::{
|
||||
prelude::{AccountId32 as AccountId32Junction, *},
|
||||
v3::{Error, NetworkId::Kusama as KusamaId},
|
||||
};
|
||||
pub use xcm_emulator::{
|
||||
assert_expected_events, bx, helpers::weight_within_threshold, Chain, Parachain as Para,
|
||||
RelayChain as Relay, Test, TestArgs, TestContext, TestExt,
|
||||
};
|
||||
|
||||
pub const ASSET_ID: u32 = 1;
|
||||
pub const ASSET_MIN_BALANCE: u128 = 1000;
|
||||
// `Assets` pallet index
|
||||
pub const ASSETS_PALLET_ID: u8 = 50;
|
||||
|
||||
pub type RelayToSystemParaTest = Test<Kusama, AssetHubKusama>;
|
||||
pub type SystemParaToRelayTest = Test<AssetHubKusama, Kusama>;
|
||||
pub type SystemParaToParaTest = Test<AssetHubKusama, PenpalKusamaA>;
|
||||
|
||||
/// Returns a `TestArgs` instance to de used for the Relay Chain accross integraton tests
|
||||
pub fn relay_test_args(amount: Balance) -> TestArgs {
|
||||
TestArgs {
|
||||
dest: Kusama::child_location_of(AssetHubKusama::para_id()),
|
||||
beneficiary: AccountId32Junction {
|
||||
network: None,
|
||||
id: AssetHubKusamaReceiver::get().into(),
|
||||
}
|
||||
.into(),
|
||||
amount,
|
||||
assets: (Here, amount).into(),
|
||||
asset_id: None,
|
||||
fee_asset_item: 0,
|
||||
weight_limit: WeightLimit::Unlimited,
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns a `TestArgs` instance to de used for the System Parachain accross integraton tests
|
||||
pub fn system_para_test_args(
|
||||
dest: MultiLocation,
|
||||
beneficiary_id: AccountId32,
|
||||
amount: Balance,
|
||||
assets: MultiAssets,
|
||||
asset_id: Option<u32>,
|
||||
) -> TestArgs {
|
||||
TestArgs {
|
||||
dest,
|
||||
beneficiary: AccountId32Junction { network: None, id: beneficiary_id.into() }.into(),
|
||||
amount,
|
||||
assets,
|
||||
asset_id,
|
||||
fee_asset_item: 0,
|
||||
weight_limit: WeightLimit::Unlimited,
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[cfg(not(feature = "runtime-benchmarks"))]
|
||||
mod tests;
|
||||
-198
@@ -1,198 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
use crate::*;
|
||||
|
||||
const MAX_CAPACITY: u32 = 8;
|
||||
const MAX_MESSAGE_SIZE: u32 = 8192;
|
||||
|
||||
/// Opening HRMP channels between Parachains should work
|
||||
#[test]
|
||||
fn open_hrmp_channel_between_paras_works() {
|
||||
// Parchain A init values
|
||||
let para_a_id = PenpalKusamaA::para_id();
|
||||
let para_a_root_origin = <PenpalKusamaA as Chain>::RuntimeOrigin::root();
|
||||
|
||||
// Parachain B init values
|
||||
let para_b_id = PenpalKusamaB::para_id();
|
||||
let para_b_root_origin = <PenpalKusamaB as Chain>::RuntimeOrigin::root();
|
||||
|
||||
let fee_amount = KUSAMA_ED * 1000;
|
||||
let fund_amount = KUSAMA_ED * 1000_000_000;
|
||||
|
||||
// Fund Parachain's Sovereign accounts to be able to reserve the deposit
|
||||
let para_a_sovereign_account = Kusama::fund_para_sovereign(fund_amount, para_a_id);
|
||||
let para_b_sovereign_account = Kusama::fund_para_sovereign(fund_amount, para_b_id);
|
||||
|
||||
let relay_destination: VersionedMultiLocation = PenpalKusamaA::parent_location().into();
|
||||
|
||||
// ---- Init Open channel from Parachain to System Parachain
|
||||
let mut call = Kusama::init_open_channel_call(para_b_id, MAX_CAPACITY, MAX_MESSAGE_SIZE);
|
||||
let origin_kind = OriginKind::Native;
|
||||
let native_asset: MultiAsset = (Here, fee_amount).into();
|
||||
let beneficiary = Kusama::sovereign_account_id_of_child_para(para_a_id);
|
||||
|
||||
let mut xcm = xcm_transact_paid_execution(call, origin_kind, native_asset.clone(), beneficiary);
|
||||
|
||||
PenpalKusamaA::execute_with(|| {
|
||||
assert_ok!(<PenpalKusamaA as PenpalKusamaAPallet>::PolkadotXcm::send(
|
||||
para_a_root_origin,
|
||||
bx!(relay_destination.clone()),
|
||||
bx!(xcm),
|
||||
));
|
||||
|
||||
PenpalKusamaA::assert_xcm_pallet_sent();
|
||||
});
|
||||
|
||||
Kusama::execute_with(|| {
|
||||
type RuntimeEvent = <Kusama as Chain>::RuntimeEvent;
|
||||
|
||||
Kusama::assert_ump_queue_processed(
|
||||
true,
|
||||
Some(para_a_id),
|
||||
Some(Weight::from_parts(1_312_558_000, 200000)),
|
||||
);
|
||||
|
||||
assert_expected_events!(
|
||||
Kusama,
|
||||
vec![
|
||||
// Parachain's Sovereign account balance is withdrawn to pay XCM fees
|
||||
RuntimeEvent::Balances(pallet_balances::Event::Withdraw { who, amount }) => {
|
||||
who: *who == para_a_sovereign_account.clone(),
|
||||
amount: *amount == fee_amount,
|
||||
},
|
||||
// Sender deposit is reserved for Parachain's Sovereign account
|
||||
RuntimeEvent::Balances(pallet_balances::Event::Reserved { who, .. }) =>{
|
||||
who: *who == para_a_sovereign_account,
|
||||
},
|
||||
// Open channel requested from Para A to Para B
|
||||
RuntimeEvent::Hrmp(
|
||||
polkadot_runtime_parachains::hrmp::Event::OpenChannelRequested {
|
||||
sender,
|
||||
recipient,
|
||||
proposed_max_capacity: max_capacity,
|
||||
proposed_max_message_size: max_message_size
|
||||
}
|
||||
) => {
|
||||
sender: *sender == para_a_id.into(),
|
||||
recipient: *recipient == para_b_id.into(),
|
||||
max_capacity: *max_capacity == MAX_CAPACITY,
|
||||
max_message_size: *max_message_size == MAX_MESSAGE_SIZE,
|
||||
},
|
||||
]
|
||||
);
|
||||
});
|
||||
|
||||
// ---- Accept Open channel from Parachain to System Parachain
|
||||
call = Kusama::accept_open_channel_call(para_a_id);
|
||||
let beneficiary = Kusama::sovereign_account_id_of_child_para(para_b_id);
|
||||
|
||||
xcm = xcm_transact_paid_execution(call, origin_kind, native_asset, beneficiary);
|
||||
|
||||
PenpalKusamaB::execute_with(|| {
|
||||
assert_ok!(<PenpalKusamaB as PenpalKusamaBPallet>::PolkadotXcm::send(
|
||||
para_b_root_origin,
|
||||
bx!(relay_destination),
|
||||
bx!(xcm),
|
||||
));
|
||||
|
||||
PenpalKusamaB::assert_xcm_pallet_sent();
|
||||
});
|
||||
|
||||
PenpalKusamaB::execute_with(|| {});
|
||||
|
||||
Kusama::execute_with(|| {
|
||||
type RuntimeEvent = <Kusama as Chain>::RuntimeEvent;
|
||||
|
||||
Kusama::assert_ump_queue_processed(
|
||||
true,
|
||||
Some(para_b_id),
|
||||
Some(Weight::from_parts(1_312_558_000, 200_000)),
|
||||
);
|
||||
|
||||
assert_expected_events!(
|
||||
Kusama,
|
||||
vec![
|
||||
// Parachain's Sovereign account balance is withdrawn to pay XCM fees
|
||||
RuntimeEvent::Balances(pallet_balances::Event::Withdraw { who, amount }) => {
|
||||
who: *who == para_b_sovereign_account.clone(),
|
||||
amount: *amount == fee_amount,
|
||||
},
|
||||
// Sender deposit is reserved for Parachain's Sovereign account
|
||||
RuntimeEvent::Balances(pallet_balances::Event::Reserved { who, .. }) =>{
|
||||
who: *who == para_b_sovereign_account,
|
||||
},
|
||||
// Open channel accepted for Para A to Para B
|
||||
RuntimeEvent::Hrmp(
|
||||
polkadot_runtime_parachains::hrmp::Event::OpenChannelAccepted {
|
||||
sender, recipient
|
||||
}
|
||||
) => {
|
||||
sender: *sender == para_a_id.into(),
|
||||
recipient: *recipient == para_b_id.into(),
|
||||
},
|
||||
]
|
||||
);
|
||||
});
|
||||
|
||||
Kusama::force_process_hrmp_open(para_a_id, para_b_id);
|
||||
}
|
||||
|
||||
/// Opening HRMP channels between System Parachains and Parachains should work
|
||||
#[test]
|
||||
fn force_open_hrmp_channel_for_system_para_works() {
|
||||
// Relay Chain init values
|
||||
let relay_root_origin = <Kusama as Chain>::RuntimeOrigin::root();
|
||||
|
||||
// System Para init values
|
||||
let system_para_id = AssetHubKusama::para_id();
|
||||
|
||||
// Parachain A init values
|
||||
let para_a_id = PenpalKusamaA::para_id();
|
||||
|
||||
Kusama::execute_with(|| {
|
||||
assert_ok!(<Kusama as KusamaPallet>::Hrmp::force_open_hrmp_channel(
|
||||
relay_root_origin,
|
||||
system_para_id,
|
||||
para_a_id,
|
||||
MAX_CAPACITY,
|
||||
MAX_MESSAGE_SIZE
|
||||
));
|
||||
|
||||
type RuntimeEvent = <Kusama as Chain>::RuntimeEvent;
|
||||
|
||||
assert_expected_events!(
|
||||
Kusama,
|
||||
vec![
|
||||
// HRMP channel forced opened
|
||||
RuntimeEvent::Hrmp(
|
||||
polkadot_runtime_parachains::hrmp::Event::HrmpChannelForceOpened{
|
||||
sender,
|
||||
recipient,
|
||||
proposed_max_capacity: max_capacity,
|
||||
proposed_max_message_size: max_message_size
|
||||
}
|
||||
) => {
|
||||
sender: *sender == system_para_id.into(),
|
||||
recipient: *recipient == para_a_id.into(),
|
||||
max_capacity: *max_capacity == MAX_CAPACITY,
|
||||
max_message_size: *max_message_size == MAX_MESSAGE_SIZE,
|
||||
},
|
||||
]
|
||||
);
|
||||
});
|
||||
|
||||
Kusama::force_process_hrmp_open(system_para_id, para_a_id);
|
||||
}
|
||||
-21
@@ -1,21 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
mod hrmp_channels;
|
||||
mod reserve_transfer;
|
||||
mod send;
|
||||
mod set_xcm_versions;
|
||||
mod swap;
|
||||
mod teleport;
|
||||
-414
@@ -1,414 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
use crate::*;
|
||||
|
||||
fn relay_origin_assertions(t: RelayToSystemParaTest) {
|
||||
type RuntimeEvent = <Kusama as Chain>::RuntimeEvent;
|
||||
|
||||
Kusama::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts(630_092_000, 6_196)));
|
||||
|
||||
assert_expected_events!(
|
||||
Kusama,
|
||||
vec![
|
||||
// Amount to reserve transfer is transferred to System Parachain's Sovereign account
|
||||
RuntimeEvent::Balances(pallet_balances::Event::Transfer { from, to, amount }) => {
|
||||
from: *from == t.sender.account_id,
|
||||
to: *to == Kusama::sovereign_account_id_of(
|
||||
t.args.dest
|
||||
),
|
||||
amount: *amount == t.args.amount,
|
||||
},
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
fn system_para_dest_assertions_incomplete(_t: RelayToSystemParaTest) {
|
||||
AssetHubKusama::assert_dmp_queue_incomplete(
|
||||
Some(Weight::from_parts(1_000_000_000, 0)),
|
||||
Some(Error::UntrustedReserveLocation),
|
||||
);
|
||||
}
|
||||
|
||||
fn system_para_to_relay_assertions(_t: SystemParaToRelayTest) {
|
||||
AssetHubKusama::assert_xcm_pallet_attempted_error(Some(XcmError::Barrier))
|
||||
}
|
||||
|
||||
fn system_para_to_para_assertions(t: SystemParaToParaTest) {
|
||||
type RuntimeEvent = <AssetHubKusama as Chain>::RuntimeEvent;
|
||||
|
||||
AssetHubKusama::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts(
|
||||
630_092_000,
|
||||
6_196,
|
||||
)));
|
||||
|
||||
assert_expected_events!(
|
||||
AssetHubKusama,
|
||||
vec![
|
||||
// Amount to reserve transfer is transferred to Parachain's Sovereing account
|
||||
RuntimeEvent::Balances(
|
||||
pallet_balances::Event::Transfer { from, to, amount }
|
||||
) => {
|
||||
from: *from == t.sender.account_id,
|
||||
to: *to == AssetHubKusama::sovereign_account_id_of(
|
||||
t.args.dest
|
||||
),
|
||||
amount: *amount == t.args.amount,
|
||||
},
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
fn system_para_to_para_assets_assertions(t: SystemParaToParaTest) {
|
||||
type RuntimeEvent = <AssetHubKusama as Chain>::RuntimeEvent;
|
||||
|
||||
AssetHubKusama::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts(
|
||||
676_119_000,
|
||||
6196,
|
||||
)));
|
||||
|
||||
assert_expected_events!(
|
||||
AssetHubKusama,
|
||||
vec![
|
||||
// Amount to reserve transfer is transferred to Parachain's Sovereing account
|
||||
RuntimeEvent::Assets(
|
||||
pallet_assets::Event::Transferred { asset_id, from, to, amount }
|
||||
) => {
|
||||
asset_id: *asset_id == ASSET_ID,
|
||||
from: *from == t.sender.account_id,
|
||||
to: *to == AssetHubKusama::sovereign_account_id_of(
|
||||
t.args.dest
|
||||
),
|
||||
amount: *amount == t.args.amount,
|
||||
},
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
fn relay_limited_reserve_transfer_assets(t: RelayToSystemParaTest) -> DispatchResult {
|
||||
<Kusama as KusamaPallet>::XcmPallet::limited_reserve_transfer_assets(
|
||||
t.signed_origin,
|
||||
bx!(t.args.dest.into()),
|
||||
bx!(t.args.beneficiary.into()),
|
||||
bx!(t.args.assets.into()),
|
||||
t.args.fee_asset_item,
|
||||
t.args.weight_limit,
|
||||
)
|
||||
}
|
||||
|
||||
fn relay_reserve_transfer_assets(t: RelayToSystemParaTest) -> DispatchResult {
|
||||
<Kusama as KusamaPallet>::XcmPallet::reserve_transfer_assets(
|
||||
t.signed_origin,
|
||||
bx!(t.args.dest.into()),
|
||||
bx!(t.args.beneficiary.into()),
|
||||
bx!(t.args.assets.into()),
|
||||
t.args.fee_asset_item,
|
||||
)
|
||||
}
|
||||
|
||||
fn system_para_limited_reserve_transfer_assets(t: SystemParaToRelayTest) -> DispatchResult {
|
||||
<AssetHubKusama as AssetHubKusamaPallet>::PolkadotXcm::limited_reserve_transfer_assets(
|
||||
t.signed_origin,
|
||||
bx!(t.args.dest.into()),
|
||||
bx!(t.args.beneficiary.into()),
|
||||
bx!(t.args.assets.into()),
|
||||
t.args.fee_asset_item,
|
||||
t.args.weight_limit,
|
||||
)
|
||||
}
|
||||
|
||||
fn system_para_reserve_transfer_assets(t: SystemParaToRelayTest) -> DispatchResult {
|
||||
<AssetHubKusama as AssetHubKusamaPallet>::PolkadotXcm::reserve_transfer_assets(
|
||||
t.signed_origin,
|
||||
bx!(t.args.dest.into()),
|
||||
bx!(t.args.beneficiary.into()),
|
||||
bx!(t.args.assets.into()),
|
||||
t.args.fee_asset_item,
|
||||
)
|
||||
}
|
||||
|
||||
fn system_para_to_para_limited_reserve_transfer_assets(t: SystemParaToParaTest) -> DispatchResult {
|
||||
<AssetHubKusama as AssetHubKusamaPallet>::PolkadotXcm::limited_reserve_transfer_assets(
|
||||
t.signed_origin,
|
||||
bx!(t.args.dest.into()),
|
||||
bx!(t.args.beneficiary.into()),
|
||||
bx!(t.args.assets.into()),
|
||||
t.args.fee_asset_item,
|
||||
t.args.weight_limit,
|
||||
)
|
||||
}
|
||||
|
||||
fn system_para_to_para_reserve_transfer_assets(t: SystemParaToParaTest) -> DispatchResult {
|
||||
<AssetHubKusama as AssetHubKusamaPallet>::PolkadotXcm::reserve_transfer_assets(
|
||||
t.signed_origin,
|
||||
bx!(t.args.dest.into()),
|
||||
bx!(t.args.beneficiary.into()),
|
||||
bx!(t.args.assets.into()),
|
||||
t.args.fee_asset_item,
|
||||
)
|
||||
}
|
||||
|
||||
/// Limited Reserve Transfers of native asset from Relay Chain to the System Parachain shouldn't
|
||||
/// work
|
||||
#[test]
|
||||
fn limited_reserve_transfer_native_asset_from_relay_to_system_para_fails() {
|
||||
// Init values for Relay Chain
|
||||
let amount_to_send: Balance = KUSAMA_ED * 1000;
|
||||
let test_args = TestContext {
|
||||
sender: KusamaSender::get(),
|
||||
receiver: AssetHubKusamaReceiver::get(),
|
||||
args: relay_test_args(amount_to_send),
|
||||
};
|
||||
|
||||
let mut test = RelayToSystemParaTest::new(test_args);
|
||||
|
||||
let sender_balance_before = test.sender.balance;
|
||||
let receiver_balance_before = test.receiver.balance;
|
||||
|
||||
test.set_assertion::<Kusama>(relay_origin_assertions);
|
||||
test.set_assertion::<AssetHubKusama>(system_para_dest_assertions_incomplete);
|
||||
test.set_dispatchable::<Kusama>(relay_limited_reserve_transfer_assets);
|
||||
test.assert();
|
||||
|
||||
let sender_balance_after = test.sender.balance;
|
||||
let receiver_balance_after = test.receiver.balance;
|
||||
|
||||
assert_eq!(sender_balance_before - amount_to_send, sender_balance_after);
|
||||
assert_eq!(receiver_balance_before, receiver_balance_after);
|
||||
}
|
||||
|
||||
/// Limited Reserve Transfers of native asset from System Parachain to Relay Chain shoudln't work
|
||||
#[test]
|
||||
fn limited_reserve_transfer_native_asset_from_system_para_to_relay_fails() {
|
||||
// Init values for System Parachain
|
||||
let destination = AssetHubKusama::parent_location();
|
||||
let beneficiary_id = KusamaReceiver::get();
|
||||
let amount_to_send: Balance = ASSET_HUB_KUSAMA_ED * 1000;
|
||||
let assets = (Parent, amount_to_send).into();
|
||||
|
||||
let test_args = TestContext {
|
||||
sender: AssetHubKusamaSender::get(),
|
||||
receiver: KusamaReceiver::get(),
|
||||
args: system_para_test_args(destination, beneficiary_id, amount_to_send, assets, None),
|
||||
};
|
||||
|
||||
let mut test = SystemParaToRelayTest::new(test_args);
|
||||
|
||||
let sender_balance_before = test.sender.balance;
|
||||
let receiver_balance_before = test.receiver.balance;
|
||||
|
||||
test.set_assertion::<AssetHubKusama>(system_para_to_relay_assertions);
|
||||
test.set_dispatchable::<AssetHubKusama>(system_para_limited_reserve_transfer_assets);
|
||||
test.assert();
|
||||
|
||||
let sender_balance_after = test.sender.balance;
|
||||
let receiver_balance_after = test.receiver.balance;
|
||||
|
||||
assert_eq!(sender_balance_before, sender_balance_after);
|
||||
assert_eq!(receiver_balance_before, receiver_balance_after);
|
||||
}
|
||||
|
||||
/// Reserve Transfers of native asset from Relay Chain to the System Parachain shouldn't work
|
||||
#[test]
|
||||
fn reserve_transfer_native_asset_from_relay_to_system_para_fails() {
|
||||
// Init values for Relay Chain
|
||||
let amount_to_send: Balance = KUSAMA_ED * 1000;
|
||||
let test_args = TestContext {
|
||||
sender: KusamaSender::get(),
|
||||
receiver: AssetHubKusamaReceiver::get(),
|
||||
args: relay_test_args(amount_to_send),
|
||||
};
|
||||
|
||||
let mut test = RelayToSystemParaTest::new(test_args);
|
||||
|
||||
let sender_balance_before = test.sender.balance;
|
||||
let receiver_balance_before = test.receiver.balance;
|
||||
|
||||
test.set_assertion::<Kusama>(relay_origin_assertions);
|
||||
test.set_assertion::<AssetHubKusama>(system_para_dest_assertions_incomplete);
|
||||
test.set_dispatchable::<Kusama>(relay_reserve_transfer_assets);
|
||||
test.assert();
|
||||
|
||||
let sender_balance_after = test.sender.balance;
|
||||
let receiver_balance_after = test.receiver.balance;
|
||||
|
||||
assert_eq!(sender_balance_before - amount_to_send, sender_balance_after);
|
||||
assert_eq!(receiver_balance_before, receiver_balance_after);
|
||||
}
|
||||
|
||||
/// Reserve Transfers of native asset from System Parachain to Relay Chain shouldn't work
|
||||
#[test]
|
||||
fn reserve_transfer_native_asset_from_system_para_to_relay_fails() {
|
||||
// Init values for System Parachain
|
||||
let destination = AssetHubKusama::parent_location();
|
||||
let beneficiary_id = KusamaReceiver::get();
|
||||
let amount_to_send: Balance = ASSET_HUB_KUSAMA_ED * 1000;
|
||||
let assets = (Parent, amount_to_send).into();
|
||||
|
||||
let test_args = TestContext {
|
||||
sender: AssetHubKusamaSender::get(),
|
||||
receiver: KusamaReceiver::get(),
|
||||
args: system_para_test_args(destination, beneficiary_id, amount_to_send, assets, None),
|
||||
};
|
||||
|
||||
let mut test = SystemParaToRelayTest::new(test_args);
|
||||
|
||||
let sender_balance_before = test.sender.balance;
|
||||
let receiver_balance_before = test.receiver.balance;
|
||||
|
||||
test.set_assertion::<AssetHubKusama>(system_para_to_relay_assertions);
|
||||
test.set_dispatchable::<AssetHubKusama>(system_para_reserve_transfer_assets);
|
||||
test.assert();
|
||||
|
||||
let sender_balance_after = test.sender.balance;
|
||||
let receiver_balance_after = test.receiver.balance;
|
||||
|
||||
assert_eq!(sender_balance_before, sender_balance_after);
|
||||
assert_eq!(receiver_balance_before, receiver_balance_after);
|
||||
}
|
||||
|
||||
/// Limited Reserve Transfers of native asset from System Parachain to Parachain should work
|
||||
#[test]
|
||||
fn limited_reserve_transfer_native_asset_from_system_para_to_para() {
|
||||
// Init values for System Parachain
|
||||
let destination = AssetHubKusama::sibling_location_of(PenpalKusamaA::para_id());
|
||||
let beneficiary_id = PenpalKusamaAReceiver::get();
|
||||
let amount_to_send: Balance = ASSET_HUB_KUSAMA_ED * 1000;
|
||||
let assets = (Parent, amount_to_send).into();
|
||||
|
||||
let test_args = TestContext {
|
||||
sender: AssetHubKusamaSender::get(),
|
||||
receiver: PenpalKusamaAReceiver::get(),
|
||||
args: system_para_test_args(destination, beneficiary_id, amount_to_send, assets, None),
|
||||
};
|
||||
|
||||
let mut test = SystemParaToParaTest::new(test_args);
|
||||
|
||||
let sender_balance_before = test.sender.balance;
|
||||
|
||||
test.set_assertion::<AssetHubKusama>(system_para_to_para_assertions);
|
||||
// TODO: Add assertion for Penpal runtime. Right now message is failing with
|
||||
// `UntrustedReserveLocation`
|
||||
test.set_dispatchable::<AssetHubKusama>(system_para_to_para_limited_reserve_transfer_assets);
|
||||
test.assert();
|
||||
|
||||
let sender_balance_after = test.sender.balance;
|
||||
|
||||
assert_eq!(sender_balance_before - amount_to_send, sender_balance_after);
|
||||
// TODO: Check receiver balance when Penpal runtime is improved to propery handle reserve
|
||||
// transfers
|
||||
}
|
||||
|
||||
/// Reserve Transfers of native asset from System Parachain to Parachain should work
|
||||
#[test]
|
||||
fn reserve_transfer_native_asset_from_system_para_to_para() {
|
||||
// Init values for System Parachain
|
||||
let destination = AssetHubKusama::sibling_location_of(PenpalKusamaA::para_id());
|
||||
let beneficiary_id = PenpalKusamaAReceiver::get();
|
||||
let amount_to_send: Balance = ASSET_HUB_KUSAMA_ED * 1000;
|
||||
let assets = (Parent, amount_to_send).into();
|
||||
|
||||
let test_args = TestContext {
|
||||
sender: AssetHubKusamaSender::get(),
|
||||
receiver: PenpalKusamaAReceiver::get(),
|
||||
args: system_para_test_args(destination, beneficiary_id, amount_to_send, assets, None),
|
||||
};
|
||||
|
||||
let mut test = SystemParaToParaTest::new(test_args);
|
||||
|
||||
let sender_balance_before = test.sender.balance;
|
||||
|
||||
test.set_assertion::<AssetHubKusama>(system_para_to_para_assertions);
|
||||
// TODO: Add assertion for Penpal runtime. Right now message is failing with
|
||||
// `UntrustedReserveLocation`
|
||||
test.set_dispatchable::<AssetHubKusama>(system_para_to_para_reserve_transfer_assets);
|
||||
test.assert();
|
||||
|
||||
let sender_balance_after = test.sender.balance;
|
||||
|
||||
assert_eq!(sender_balance_before - amount_to_send, sender_balance_after);
|
||||
// TODO: Check receiver balance when Penpal runtime is improved to propery handle reserve
|
||||
// transfers
|
||||
}
|
||||
|
||||
/// Limited Reserve Transfers of a local asset from System Parachain to Parachain should work
|
||||
#[test]
|
||||
fn limited_reserve_transfer_asset_from_system_para_to_para() {
|
||||
// Force create asset from Relay Chain and mint assets for System Parachain's sender account
|
||||
AssetHubKusama::force_create_and_mint_asset(
|
||||
ASSET_ID,
|
||||
ASSET_MIN_BALANCE,
|
||||
true,
|
||||
AssetHubKusamaSender::get(),
|
||||
ASSET_MIN_BALANCE * 1000000,
|
||||
);
|
||||
|
||||
// Init values for System Parachain
|
||||
let destination = AssetHubKusama::sibling_location_of(PenpalKusamaA::para_id());
|
||||
let beneficiary_id = PenpalKusamaAReceiver::get();
|
||||
let amount_to_send = ASSET_MIN_BALANCE * 1000;
|
||||
let assets =
|
||||
(X2(PalletInstance(ASSETS_PALLET_ID), GeneralIndex(ASSET_ID.into())), amount_to_send)
|
||||
.into();
|
||||
|
||||
let system_para_test_args = TestContext {
|
||||
sender: AssetHubKusamaSender::get(),
|
||||
receiver: PenpalKusamaAReceiver::get(),
|
||||
args: system_para_test_args(destination, beneficiary_id, amount_to_send, assets, None),
|
||||
};
|
||||
|
||||
let mut system_para_test = SystemParaToParaTest::new(system_para_test_args);
|
||||
|
||||
system_para_test.set_assertion::<AssetHubKusama>(system_para_to_para_assets_assertions);
|
||||
// TODO: Add assertions when Penpal is able to manage assets
|
||||
system_para_test
|
||||
.set_dispatchable::<AssetHubKusama>(system_para_to_para_limited_reserve_transfer_assets);
|
||||
system_para_test.assert();
|
||||
}
|
||||
|
||||
/// Reserve Transfers of a local asset from System Parachain to Parachain should work
|
||||
#[test]
|
||||
fn reserve_transfer_asset_from_system_para_to_para() {
|
||||
// Force create asset from Relay Chain and mint assets for System Parachain's sender account
|
||||
AssetHubKusama::force_create_and_mint_asset(
|
||||
ASSET_ID,
|
||||
ASSET_MIN_BALANCE,
|
||||
true,
|
||||
AssetHubKusamaSender::get(),
|
||||
ASSET_MIN_BALANCE * 1000000,
|
||||
);
|
||||
|
||||
// Init values for System Parachain
|
||||
let destination = AssetHubKusama::sibling_location_of(PenpalKusamaA::para_id());
|
||||
let beneficiary_id = PenpalKusamaAReceiver::get();
|
||||
let amount_to_send = ASSET_MIN_BALANCE * 1000;
|
||||
let assets =
|
||||
(X2(PalletInstance(ASSETS_PALLET_ID), GeneralIndex(ASSET_ID.into())), amount_to_send)
|
||||
.into();
|
||||
|
||||
let system_para_test_args = TestContext {
|
||||
sender: AssetHubKusamaSender::get(),
|
||||
receiver: PenpalKusamaAReceiver::get(),
|
||||
args: system_para_test_args(destination, beneficiary_id, amount_to_send, assets, None),
|
||||
};
|
||||
|
||||
let mut system_para_test = SystemParaToParaTest::new(system_para_test_args);
|
||||
|
||||
system_para_test.set_assertion::<AssetHubKusama>(system_para_to_para_assets_assertions);
|
||||
// TODO: Add assertions when Penpal is able to manage assets
|
||||
system_para_test
|
||||
.set_dispatchable::<AssetHubKusama>(system_para_to_para_reserve_transfer_assets);
|
||||
system_para_test.assert();
|
||||
}
|
||||
-195
@@ -1,195 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
use crate::*;
|
||||
|
||||
/// Relay Chain should be able to execute `Transact` instructions in System Parachain
|
||||
/// when `OriginKind::Superuser` and signer is `sudo`
|
||||
#[test]
|
||||
fn send_transact_sudo_from_relay_to_system_para_works() {
|
||||
// Init tests variables
|
||||
let root_origin = <Kusama as Chain>::RuntimeOrigin::root();
|
||||
let system_para_destination = Kusama::child_location_of(AssetHubKusama::para_id()).into();
|
||||
let asset_owner: AccountId = AssetHubKusamaSender::get().into();
|
||||
let xcm = AssetHubKusama::force_create_asset_xcm(
|
||||
OriginKind::Superuser,
|
||||
ASSET_ID,
|
||||
asset_owner.clone(),
|
||||
true,
|
||||
1000,
|
||||
);
|
||||
// Send XCM message from Relay Chain
|
||||
Kusama::execute_with(|| {
|
||||
assert_ok!(<Kusama as KusamaPallet>::XcmPallet::send(
|
||||
root_origin,
|
||||
bx!(system_para_destination),
|
||||
bx!(xcm),
|
||||
));
|
||||
|
||||
Kusama::assert_xcm_pallet_sent();
|
||||
});
|
||||
|
||||
// Receive XCM message in Assets Parachain
|
||||
AssetHubKusama::execute_with(|| {
|
||||
type RuntimeEvent = <AssetHubKusama as Chain>::RuntimeEvent;
|
||||
|
||||
AssetHubKusama::assert_dmp_queue_complete(Some(Weight::from_parts(1_019_445_000, 200_000)));
|
||||
|
||||
assert_expected_events!(
|
||||
AssetHubKusama,
|
||||
vec![
|
||||
RuntimeEvent::Assets(pallet_assets::Event::ForceCreated { asset_id, owner }) => {
|
||||
asset_id: *asset_id == ASSET_ID,
|
||||
owner: *owner == asset_owner,
|
||||
},
|
||||
]
|
||||
);
|
||||
|
||||
assert!(<AssetHubKusama as AssetHubKusamaPallet>::Assets::asset_exists(ASSET_ID));
|
||||
});
|
||||
}
|
||||
|
||||
/// Relay Chain shouldn't be able to execute `Transact` instructions in System Parachain
|
||||
/// when `OriginKind::Native`
|
||||
#[test]
|
||||
fn send_transact_native_from_relay_to_system_para_fails() {
|
||||
// Init tests variables
|
||||
let signed_origin = <Kusama as Chain>::RuntimeOrigin::signed(KusamaSender::get().into());
|
||||
let system_para_destination = Kusama::child_location_of(AssetHubKusama::para_id()).into();
|
||||
let asset_owner = AssetHubKusamaSender::get().into();
|
||||
let xcm = AssetHubKusama::force_create_asset_xcm(
|
||||
OriginKind::Native,
|
||||
ASSET_ID,
|
||||
asset_owner,
|
||||
true,
|
||||
1000,
|
||||
);
|
||||
|
||||
// Send XCM message from Relay Chain
|
||||
Kusama::execute_with(|| {
|
||||
assert_err!(
|
||||
<Kusama as KusamaPallet>::XcmPallet::send(
|
||||
signed_origin,
|
||||
bx!(system_para_destination),
|
||||
bx!(xcm)
|
||||
),
|
||||
DispatchError::BadOrigin
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
/// System Parachain shouldn't be able to execute `Transact` instructions in Relay Chain
|
||||
/// when `OriginKind::Native`
|
||||
#[test]
|
||||
fn send_transact_native_from_system_para_to_relay_fails() {
|
||||
// Init tests variables
|
||||
let signed_origin =
|
||||
<AssetHubKusama as Chain>::RuntimeOrigin::signed(AssetHubKusamaSender::get().into());
|
||||
let relay_destination = AssetHubKusama::parent_location().into();
|
||||
let call = <Kusama as Chain>::RuntimeCall::System(frame_system::Call::<
|
||||
<Kusama as Chain>::Runtime,
|
||||
>::remark_with_event {
|
||||
remark: vec![0, 1, 2, 3],
|
||||
})
|
||||
.encode()
|
||||
.into();
|
||||
let origin_kind = OriginKind::Native;
|
||||
|
||||
let xcm = xcm_transact_unpaid_execution(call, origin_kind);
|
||||
|
||||
// Send XCM message from Relay Chain
|
||||
AssetHubKusama::execute_with(|| {
|
||||
assert_err!(
|
||||
<AssetHubKusama as AssetHubKusamaPallet>::PolkadotXcm::send(
|
||||
signed_origin,
|
||||
bx!(relay_destination),
|
||||
bx!(xcm)
|
||||
),
|
||||
DispatchError::BadOrigin
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
/// Parachain should be able to send XCM paying its fee with sufficient asset
|
||||
/// in the System Parachain
|
||||
#[test]
|
||||
fn send_xcm_from_para_to_system_para_paying_fee_with_assets_works() {
|
||||
let para_sovereign_account = AssetHubKusama::sovereign_account_id_of(
|
||||
AssetHubKusama::sibling_location_of(PenpalKusamaA::para_id()),
|
||||
);
|
||||
|
||||
// Force create and mint assets for Parachain's sovereign account
|
||||
AssetHubKusama::force_create_and_mint_asset(
|
||||
ASSET_ID,
|
||||
ASSET_MIN_BALANCE,
|
||||
true,
|
||||
para_sovereign_account.clone(),
|
||||
ASSET_MIN_BALANCE * 1000000000,
|
||||
);
|
||||
|
||||
// We just need a call that can pass the `SafeCallFilter`
|
||||
// Call values are not relevant
|
||||
let call = AssetHubKusama::force_create_asset_call(
|
||||
ASSET_ID,
|
||||
para_sovereign_account.clone(),
|
||||
true,
|
||||
ASSET_MIN_BALANCE,
|
||||
);
|
||||
|
||||
let origin_kind = OriginKind::SovereignAccount;
|
||||
let fee_amount = ASSET_MIN_BALANCE * 1000000;
|
||||
let native_asset =
|
||||
(X2(PalletInstance(ASSETS_PALLET_ID), GeneralIndex(ASSET_ID.into())), fee_amount).into();
|
||||
|
||||
let root_origin = <PenpalKusamaA as Chain>::RuntimeOrigin::root();
|
||||
let system_para_destination =
|
||||
PenpalKusamaA::sibling_location_of(AssetHubKusama::para_id()).into();
|
||||
let xcm = xcm_transact_paid_execution(
|
||||
call,
|
||||
origin_kind,
|
||||
native_asset,
|
||||
para_sovereign_account.clone(),
|
||||
);
|
||||
|
||||
PenpalKusamaA::execute_with(|| {
|
||||
assert_ok!(<PenpalKusamaA as PenpalKusamaAPallet>::PolkadotXcm::send(
|
||||
root_origin,
|
||||
bx!(system_para_destination),
|
||||
bx!(xcm),
|
||||
));
|
||||
|
||||
PenpalKusamaA::assert_xcm_pallet_sent();
|
||||
});
|
||||
|
||||
AssetHubKusama::execute_with(|| {
|
||||
type RuntimeEvent = <AssetHubKusama as Chain>::RuntimeEvent;
|
||||
|
||||
AssetHubKusama::assert_xcmp_queue_success(Some(Weight::from_parts(2_176_414_000, 203_593)));
|
||||
|
||||
assert_expected_events!(
|
||||
AssetHubKusama,
|
||||
vec![
|
||||
RuntimeEvent::Assets(pallet_assets::Event::Burned { asset_id, owner, balance }) => {
|
||||
asset_id: *asset_id == ASSET_ID,
|
||||
owner: *owner == para_sovereign_account,
|
||||
balance: *balance == fee_amount,
|
||||
},
|
||||
RuntimeEvent::Assets(pallet_assets::Event::Issued { asset_id, .. }) => {
|
||||
asset_id: *asset_id == ASSET_ID,
|
||||
},
|
||||
]
|
||||
);
|
||||
});
|
||||
}
|
||||
-93
@@ -1,93 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
use crate::*;
|
||||
|
||||
#[test]
|
||||
fn relay_sets_system_para_xcm_supported_version() {
|
||||
// Init tests variables
|
||||
let sudo_origin = <Kusama as Chain>::RuntimeOrigin::root();
|
||||
let system_para_destination: MultiLocation =
|
||||
Kusama::child_location_of(AssetHubKusama::para_id());
|
||||
|
||||
// Relay Chain sets supported version for Asset Parachain
|
||||
Kusama::execute_with(|| {
|
||||
assert_ok!(<Kusama as KusamaPallet>::XcmPallet::force_xcm_version(
|
||||
sudo_origin,
|
||||
bx!(system_para_destination),
|
||||
XCM_V3
|
||||
));
|
||||
|
||||
type RuntimeEvent = <Kusama as Chain>::RuntimeEvent;
|
||||
|
||||
assert_expected_events!(
|
||||
Kusama,
|
||||
vec![
|
||||
RuntimeEvent::XcmPallet(pallet_xcm::Event::SupportedVersionChanged {
|
||||
location,
|
||||
version: XCM_V3
|
||||
}) => { location: *location == system_para_destination, },
|
||||
]
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn system_para_sets_relay_xcm_supported_version() {
|
||||
// Init test variables
|
||||
let sudo_origin = <Kusama as Chain>::RuntimeOrigin::root();
|
||||
let parent_location = AssetHubKusama::parent_location();
|
||||
let system_para_destination: VersionedMultiLocation =
|
||||
Kusama::child_location_of(AssetHubKusama::para_id()).into();
|
||||
let call = <AssetHubKusama as Chain>::RuntimeCall::PolkadotXcm(pallet_xcm::Call::<
|
||||
<AssetHubKusama as Chain>::Runtime,
|
||||
>::force_xcm_version {
|
||||
location: bx!(parent_location),
|
||||
version: XCM_V3,
|
||||
})
|
||||
.encode()
|
||||
.into();
|
||||
let origin_kind = OriginKind::Superuser;
|
||||
|
||||
let xcm = xcm_transact_unpaid_execution(call, origin_kind);
|
||||
|
||||
// System Parachain sets supported version for Relay Chain throught it
|
||||
Kusama::execute_with(|| {
|
||||
assert_ok!(<Kusama as KusamaPallet>::XcmPallet::send(
|
||||
sudo_origin,
|
||||
bx!(system_para_destination),
|
||||
bx!(xcm),
|
||||
));
|
||||
|
||||
Kusama::assert_xcm_pallet_sent();
|
||||
});
|
||||
|
||||
// System Parachain receive the XCM message
|
||||
AssetHubKusama::execute_with(|| {
|
||||
type RuntimeEvent = <AssetHubKusama as Chain>::RuntimeEvent;
|
||||
|
||||
AssetHubKusama::assert_dmp_queue_complete(Some(Weight::from_parts(1_019_210_000, 200_000)));
|
||||
|
||||
assert_expected_events!(
|
||||
AssetHubKusama,
|
||||
vec![
|
||||
RuntimeEvent::PolkadotXcm(pallet_xcm::Event::SupportedVersionChanged {
|
||||
location,
|
||||
version: XCM_V3
|
||||
}) => { location: *location == parent_location, },
|
||||
]
|
||||
);
|
||||
});
|
||||
}
|
||||
-364
@@ -1,364 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
use crate::*;
|
||||
use frame_support::{instances::Instance2, BoundedVec};
|
||||
use parachains_common::kusama::currency::EXISTENTIAL_DEPOSIT;
|
||||
use sp_runtime::{DispatchError, ModuleError};
|
||||
|
||||
#[test]
|
||||
fn swap_locally_on_chain_using_local_assets() {
|
||||
let asset_native = Box::new(asset_hub_kusama_runtime::xcm_config::KsmLocation::get());
|
||||
let asset_one = Box::new(MultiLocation {
|
||||
parents: 0,
|
||||
interior: X2(PalletInstance(ASSETS_PALLET_ID), GeneralIndex(ASSET_ID.into())),
|
||||
});
|
||||
|
||||
AssetHubKusama::execute_with(|| {
|
||||
type RuntimeEvent = <AssetHubKusama as Chain>::RuntimeEvent;
|
||||
|
||||
assert_ok!(<AssetHubKusama as AssetHubKusamaPallet>::Assets::create(
|
||||
<AssetHubKusama as Chain>::RuntimeOrigin::signed(AssetHubKusamaSender::get()),
|
||||
ASSET_ID.into(),
|
||||
AssetHubKusamaSender::get().into(),
|
||||
1000,
|
||||
));
|
||||
assert!(<AssetHubKusama as AssetHubKusamaPallet>::Assets::asset_exists(ASSET_ID));
|
||||
|
||||
assert_ok!(<AssetHubKusama as AssetHubKusamaPallet>::Assets::mint(
|
||||
<AssetHubKusama as Chain>::RuntimeOrigin::signed(AssetHubKusamaSender::get()),
|
||||
ASSET_ID.into(),
|
||||
AssetHubKusamaSender::get().into(),
|
||||
100_000_000_000_000,
|
||||
));
|
||||
|
||||
assert_ok!(<AssetHubKusama as AssetHubKusamaPallet>::Balances::force_set_balance(
|
||||
<AssetHubKusama as Chain>::RuntimeOrigin::root(),
|
||||
AssetHubKusamaSender::get().into(),
|
||||
100_000_000_000_000,
|
||||
));
|
||||
|
||||
assert_ok!(<AssetHubKusama as AssetHubKusamaPallet>::AssetConversion::create_pool(
|
||||
<AssetHubKusama as Chain>::RuntimeOrigin::signed(AssetHubKusamaSender::get()),
|
||||
asset_native.clone(),
|
||||
asset_one.clone(),
|
||||
));
|
||||
|
||||
assert_expected_events!(
|
||||
AssetHubKusama,
|
||||
vec![
|
||||
RuntimeEvent::AssetConversion(pallet_asset_conversion::Event::PoolCreated { .. }) => {},
|
||||
]
|
||||
);
|
||||
|
||||
assert_ok!(<AssetHubKusama as AssetHubKusamaPallet>::AssetConversion::add_liquidity(
|
||||
<AssetHubKusama as Chain>::RuntimeOrigin::signed(AssetHubKusamaSender::get()),
|
||||
asset_native.clone(),
|
||||
asset_one.clone(),
|
||||
1_000_000_000_000,
|
||||
2_000_000_000_000,
|
||||
0,
|
||||
0,
|
||||
AssetHubKusamaSender::get().into()
|
||||
));
|
||||
|
||||
assert_expected_events!(
|
||||
AssetHubKusama,
|
||||
vec![
|
||||
RuntimeEvent::AssetConversion(pallet_asset_conversion::Event::LiquidityAdded {lp_token_minted, .. }) => { lp_token_minted: *lp_token_minted == 1414213562273, },
|
||||
]
|
||||
);
|
||||
|
||||
let path = BoundedVec::<_, _>::truncate_from(vec![asset_native.clone(), asset_one.clone()]);
|
||||
|
||||
assert_ok!(
|
||||
<AssetHubKusama as AssetHubKusamaPallet>::AssetConversion::swap_exact_tokens_for_tokens(
|
||||
<AssetHubKusama as Chain>::RuntimeOrigin::signed(AssetHubKusamaSender::get()),
|
||||
path,
|
||||
100,
|
||||
1,
|
||||
AssetHubKusamaSender::get().into(),
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
assert_expected_events!(
|
||||
AssetHubKusama,
|
||||
vec![
|
||||
RuntimeEvent::AssetConversion(pallet_asset_conversion::Event::SwapExecuted { amount_in, amount_out, .. }) => {
|
||||
amount_in: *amount_in == 100,
|
||||
amount_out: *amount_out == 199,
|
||||
},
|
||||
]
|
||||
);
|
||||
|
||||
assert_ok!(<AssetHubKusama as AssetHubKusamaPallet>::AssetConversion::remove_liquidity(
|
||||
<AssetHubKusama as Chain>::RuntimeOrigin::signed(AssetHubKusamaSender::get()),
|
||||
asset_native,
|
||||
asset_one,
|
||||
1414213562273 - EXISTENTIAL_DEPOSIT * 2, // all but the 2 EDs can't be retrieved.
|
||||
0,
|
||||
0,
|
||||
AssetHubKusamaSender::get().into(),
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn swap_locally_on_chain_using_foreign_assets() {
|
||||
use frame_support::weights::WeightToFee;
|
||||
|
||||
let asset_native = Box::new(asset_hub_kusama_runtime::xcm_config::KsmLocation::get());
|
||||
|
||||
let foreign_asset1_at_asset_hub_kusama = Box::new(MultiLocation {
|
||||
parents: 1,
|
||||
interior: X3(
|
||||
Parachain(PenpalKusamaA::para_id().into()),
|
||||
PalletInstance(ASSETS_PALLET_ID),
|
||||
GeneralIndex(ASSET_ID.into()),
|
||||
),
|
||||
});
|
||||
|
||||
let assets_para_destination: VersionedMultiLocation =
|
||||
MultiLocation { parents: 1, interior: X1(Parachain(AssetHubKusama::para_id().into())) }
|
||||
.into();
|
||||
|
||||
let penpal_location =
|
||||
MultiLocation { parents: 1, interior: X1(Parachain(PenpalKusamaA::para_id().into())) };
|
||||
|
||||
// 1. Create asset on penpal:
|
||||
PenpalKusamaA::execute_with(|| {
|
||||
assert_ok!(<PenpalKusamaA as PenpalKusamaAPallet>::Assets::create(
|
||||
<PenpalKusamaA as Chain>::RuntimeOrigin::signed(PenpalKusamaASender::get()),
|
||||
ASSET_ID.into(),
|
||||
PenpalKusamaASender::get().into(),
|
||||
1000,
|
||||
));
|
||||
|
||||
assert!(<PenpalKusamaA as PenpalKusamaAPallet>::Assets::asset_exists(ASSET_ID));
|
||||
});
|
||||
|
||||
// 2. Create foreign asset on asset_hub_kusama:
|
||||
|
||||
let require_weight_at_most = Weight::from_parts(1_100_000_000_000, 30_000);
|
||||
let origin_kind = OriginKind::Xcm;
|
||||
let sov_penpal_on_asset_hub_kusama = AssetHubKusama::sovereign_account_id_of(penpal_location);
|
||||
|
||||
AssetHubKusama::fund_accounts(vec![
|
||||
(AssetHubKusamaSender::get().into(), 5_000_000 * KUSAMA_ED), /* An account to swap dot
|
||||
* for something else. */
|
||||
(sov_penpal_on_asset_hub_kusama.clone().into(), 1000_000_000_000_000_000 * KUSAMA_ED),
|
||||
]);
|
||||
|
||||
let sov_penpal_on_asset_hub_kusama_as_location: MultiLocation = MultiLocation {
|
||||
parents: 0,
|
||||
interior: X1(AccountId32Junction {
|
||||
network: None,
|
||||
id: sov_penpal_on_asset_hub_kusama.clone().into(),
|
||||
}),
|
||||
};
|
||||
|
||||
let call_foreign_assets_create =
|
||||
<AssetHubKusama as Chain>::RuntimeCall::ForeignAssets(pallet_assets::Call::<
|
||||
<AssetHubKusama as Chain>::Runtime,
|
||||
Instance2,
|
||||
>::create {
|
||||
id: *foreign_asset1_at_asset_hub_kusama,
|
||||
min_balance: 1000,
|
||||
admin: sov_penpal_on_asset_hub_kusama.clone().into(),
|
||||
})
|
||||
.encode()
|
||||
.into();
|
||||
|
||||
let buy_execution_fee_amount = parachains_common::kusama::fee::WeightToFee::weight_to_fee(
|
||||
&Weight::from_parts(10_100_000_000_000, 300_000),
|
||||
);
|
||||
let buy_execution_fee = MultiAsset {
|
||||
id: Concrete(MultiLocation { parents: 1, interior: Here }),
|
||||
fun: Fungible(buy_execution_fee_amount),
|
||||
};
|
||||
|
||||
let xcm = VersionedXcm::from(Xcm(vec![
|
||||
WithdrawAsset { 0: vec![buy_execution_fee.clone()].into() },
|
||||
BuyExecution { fees: buy_execution_fee.clone(), weight_limit: Unlimited },
|
||||
Transact { require_weight_at_most, origin_kind, call: call_foreign_assets_create },
|
||||
RefundSurplus,
|
||||
DepositAsset {
|
||||
assets: All.into(),
|
||||
beneficiary: sov_penpal_on_asset_hub_kusama_as_location,
|
||||
},
|
||||
]));
|
||||
|
||||
// Send XCM message from penpal => asset_hub_kusama
|
||||
let sudo_penpal_origin = <PenpalKusamaA as Chain>::RuntimeOrigin::root();
|
||||
PenpalKusamaA::execute_with(|| {
|
||||
assert_ok!(<PenpalKusamaA as PenpalKusamaAPallet>::PolkadotXcm::send(
|
||||
sudo_penpal_origin.clone(),
|
||||
bx!(assets_para_destination.clone()),
|
||||
bx!(xcm),
|
||||
));
|
||||
|
||||
type RuntimeEvent = <PenpalKusamaA as Chain>::RuntimeEvent;
|
||||
|
||||
assert_expected_events!(
|
||||
PenpalKusamaA,
|
||||
vec![
|
||||
RuntimeEvent::PolkadotXcm(pallet_xcm::Event::Sent { .. }) => {},
|
||||
]
|
||||
);
|
||||
});
|
||||
|
||||
// Receive XCM message in Assets Parachain
|
||||
AssetHubKusama::execute_with(|| {
|
||||
assert!(<AssetHubKusama as AssetHubKusamaPallet>::ForeignAssets::asset_exists(
|
||||
*foreign_asset1_at_asset_hub_kusama
|
||||
));
|
||||
|
||||
// 3: Mint foreign asset on asset_hub_kusama:
|
||||
//
|
||||
// (While it might be nice to use batch,
|
||||
// currently that's disabled due to safe call filters.)
|
||||
|
||||
type RuntimeEvent = <AssetHubKusama as Chain>::RuntimeEvent;
|
||||
// 3. Mint foreign asset (in reality this should be a teleport or some such)
|
||||
assert_ok!(<AssetHubKusama as AssetHubKusamaPallet>::ForeignAssets::mint(
|
||||
<AssetHubKusama as Chain>::RuntimeOrigin::signed(
|
||||
sov_penpal_on_asset_hub_kusama.clone().into()
|
||||
),
|
||||
*foreign_asset1_at_asset_hub_kusama,
|
||||
sov_penpal_on_asset_hub_kusama.clone().into(),
|
||||
3_000_000_000_000,
|
||||
));
|
||||
|
||||
assert_expected_events!(
|
||||
AssetHubKusama,
|
||||
vec![
|
||||
RuntimeEvent::ForeignAssets(pallet_assets::Event::Issued { .. }) => {},
|
||||
]
|
||||
);
|
||||
|
||||
// 4. Create pool:
|
||||
assert_ok!(<AssetHubKusama as AssetHubKusamaPallet>::AssetConversion::create_pool(
|
||||
<AssetHubKusama as Chain>::RuntimeOrigin::signed(AssetHubKusamaSender::get()),
|
||||
asset_native.clone(),
|
||||
foreign_asset1_at_asset_hub_kusama.clone(),
|
||||
));
|
||||
|
||||
assert_expected_events!(
|
||||
AssetHubKusama,
|
||||
vec![
|
||||
RuntimeEvent::AssetConversion(pallet_asset_conversion::Event::PoolCreated { .. }) => {},
|
||||
]
|
||||
);
|
||||
|
||||
// 5. Add liquidity:
|
||||
assert_ok!(<AssetHubKusama as AssetHubKusamaPallet>::AssetConversion::add_liquidity(
|
||||
<AssetHubKusama as Chain>::RuntimeOrigin::signed(
|
||||
sov_penpal_on_asset_hub_kusama.clone()
|
||||
),
|
||||
asset_native.clone(),
|
||||
foreign_asset1_at_asset_hub_kusama.clone(),
|
||||
1_000_000_000_000,
|
||||
2_000_000_000_000,
|
||||
0,
|
||||
0,
|
||||
sov_penpal_on_asset_hub_kusama.clone().into()
|
||||
));
|
||||
|
||||
assert_expected_events!(
|
||||
AssetHubKusama,
|
||||
vec![
|
||||
RuntimeEvent::AssetConversion(pallet_asset_conversion::Event::LiquidityAdded {lp_token_minted, .. }) => {
|
||||
lp_token_minted: *lp_token_minted == 1414213562273,
|
||||
},
|
||||
]
|
||||
);
|
||||
|
||||
// 6. Swap!
|
||||
let path = BoundedVec::<_, _>::truncate_from(vec![
|
||||
asset_native.clone(),
|
||||
foreign_asset1_at_asset_hub_kusama.clone(),
|
||||
]);
|
||||
|
||||
assert_ok!(
|
||||
<AssetHubKusama as AssetHubKusamaPallet>::AssetConversion::swap_exact_tokens_for_tokens(
|
||||
<AssetHubKusama as Chain>::RuntimeOrigin::signed(AssetHubKusamaSender::get()),
|
||||
path,
|
||||
100000,
|
||||
1000,
|
||||
AssetHubKusamaSender::get().into(),
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
assert_expected_events!(
|
||||
AssetHubKusama,
|
||||
vec![
|
||||
RuntimeEvent::AssetConversion(pallet_asset_conversion::Event::SwapExecuted { amount_in, amount_out, .. },) => {
|
||||
amount_in: *amount_in == 100000,
|
||||
amount_out: *amount_out == 199399,
|
||||
},
|
||||
]
|
||||
);
|
||||
|
||||
// 7. Remove liquidity
|
||||
assert_ok!(<AssetHubKusama as AssetHubKusamaPallet>::AssetConversion::remove_liquidity(
|
||||
<AssetHubKusama as Chain>::RuntimeOrigin::signed(
|
||||
sov_penpal_on_asset_hub_kusama.clone()
|
||||
),
|
||||
asset_native,
|
||||
foreign_asset1_at_asset_hub_kusama,
|
||||
1414213562273 - 2_000_000_000, // all but the 2 EDs can't be retrieved.
|
||||
0,
|
||||
0,
|
||||
sov_penpal_on_asset_hub_kusama.clone().into(),
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn cannot_create_pool_from_pool_assets() {
|
||||
let asset_native = Box::new(asset_hub_kusama_runtime::xcm_config::KsmLocation::get());
|
||||
let mut asset_one = asset_hub_kusama_runtime::xcm_config::PoolAssetsPalletLocation::get();
|
||||
asset_one.append_with(GeneralIndex(ASSET_ID.into())).expect("pool assets");
|
||||
|
||||
AssetHubKusama::execute_with(|| {
|
||||
let pool_owner_account_id = asset_hub_kusama_runtime::AssetConversionOrigin::get();
|
||||
|
||||
assert_ok!(<AssetHubKusama as AssetHubKusamaPallet>::PoolAssets::create(
|
||||
<AssetHubKusama as Chain>::RuntimeOrigin::signed(pool_owner_account_id.clone()),
|
||||
ASSET_ID.into(),
|
||||
pool_owner_account_id.clone().into(),
|
||||
1000,
|
||||
));
|
||||
assert!(<AssetHubKusama as AssetHubKusamaPallet>::PoolAssets::asset_exists(ASSET_ID));
|
||||
|
||||
assert_ok!(<AssetHubKusama as AssetHubKusamaPallet>::PoolAssets::mint(
|
||||
<AssetHubKusama as Chain>::RuntimeOrigin::signed(pool_owner_account_id),
|
||||
ASSET_ID.into(),
|
||||
AssetHubKusamaSender::get().into(),
|
||||
3_000_000_000_000,
|
||||
));
|
||||
|
||||
assert_matches::assert_matches!(
|
||||
<AssetHubKusama as AssetHubKusamaPallet>::AssetConversion::create_pool(
|
||||
<AssetHubKusama as Chain>::RuntimeOrigin::signed(AssetHubKusamaSender::get()),
|
||||
asset_native.clone(),
|
||||
Box::new(asset_one),
|
||||
),
|
||||
Err(DispatchError::Module(ModuleError{index: _, error: _, message})) => assert_eq!(message, Some("UnsupportedAsset"))
|
||||
);
|
||||
});
|
||||
}
|
||||
-363
@@ -1,363 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#![allow(dead_code)] // <https://github.com/paritytech/cumulus/issues/3027>
|
||||
|
||||
use crate::*;
|
||||
|
||||
fn relay_origin_assertions(t: RelayToSystemParaTest) {
|
||||
type RuntimeEvent = <Kusama as Chain>::RuntimeEvent;
|
||||
|
||||
Kusama::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts(631_531_000, 7_186)));
|
||||
|
||||
assert_expected_events!(
|
||||
Kusama,
|
||||
vec![
|
||||
// Amount to teleport is withdrawn from Sender
|
||||
RuntimeEvent::Balances(pallet_balances::Event::Withdraw { who, amount }) => {
|
||||
who: *who == t.sender.account_id,
|
||||
amount: *amount == t.args.amount,
|
||||
},
|
||||
// Amount to teleport is deposited in Relay's `CheckAccount`
|
||||
RuntimeEvent::Balances(pallet_balances::Event::Deposit { who, amount }) => {
|
||||
who: *who == <Kusama as KusamaPallet>::XcmPallet::check_account(),
|
||||
amount: *amount == t.args.amount,
|
||||
},
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
fn relay_dest_assertions(t: SystemParaToRelayTest) {
|
||||
type RuntimeEvent = <Kusama as Chain>::RuntimeEvent;
|
||||
|
||||
Kusama::assert_ump_queue_processed(
|
||||
true,
|
||||
Some(AssetHubKusama::para_id()),
|
||||
Some(Weight::from_parts(307_225_000, 7_186)),
|
||||
);
|
||||
|
||||
assert_expected_events!(
|
||||
Kusama,
|
||||
vec![
|
||||
// Amount is witdrawn from Relay Chain's `CheckAccount`
|
||||
RuntimeEvent::Balances(pallet_balances::Event::Withdraw { who, amount }) => {
|
||||
who: *who == <Kusama as KusamaPallet>::XcmPallet::check_account(),
|
||||
amount: *amount == t.args.amount,
|
||||
},
|
||||
// Amount minus fees are deposited in Receiver's account
|
||||
RuntimeEvent::Balances(pallet_balances::Event::Deposit { who, .. }) => {
|
||||
who: *who == t.receiver.account_id,
|
||||
},
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
fn relay_dest_assertions_fail(_t: SystemParaToRelayTest) {
|
||||
Kusama::assert_ump_queue_processed(
|
||||
false,
|
||||
Some(AssetHubKusama::para_id()),
|
||||
Some(Weight::from_parts(148_433_000, 3_593)),
|
||||
);
|
||||
}
|
||||
|
||||
fn para_origin_assertions(t: SystemParaToRelayTest) {
|
||||
type RuntimeEvent = <AssetHubKusama as Chain>::RuntimeEvent;
|
||||
|
||||
AssetHubKusama::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts(
|
||||
534_872_000,
|
||||
7_133,
|
||||
)));
|
||||
|
||||
AssetHubKusama::assert_parachain_system_ump_sent();
|
||||
|
||||
assert_expected_events!(
|
||||
AssetHubKusama,
|
||||
vec![
|
||||
// Amount is withdrawn from Sender's account
|
||||
RuntimeEvent::Balances(pallet_balances::Event::Withdraw { who, amount }) => {
|
||||
who: *who == t.sender.account_id,
|
||||
amount: *amount == t.args.amount,
|
||||
},
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
fn para_dest_assertions(t: RelayToSystemParaTest) {
|
||||
type RuntimeEvent = <AssetHubKusama as Chain>::RuntimeEvent;
|
||||
|
||||
AssetHubKusama::assert_dmp_queue_complete(Some(Weight::from_parts(165_592_000, 0)));
|
||||
|
||||
assert_expected_events!(
|
||||
AssetHubKusama,
|
||||
vec![
|
||||
// Amount minus fees are deposited in Receiver's account
|
||||
RuntimeEvent::Balances(pallet_balances::Event::Deposit { who, .. }) => {
|
||||
who: *who == t.receiver.account_id,
|
||||
},
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
fn relay_limited_teleport_assets(t: RelayToSystemParaTest) -> DispatchResult {
|
||||
<Kusama as KusamaPallet>::XcmPallet::limited_teleport_assets(
|
||||
t.signed_origin,
|
||||
bx!(t.args.dest.into()),
|
||||
bx!(t.args.beneficiary.into()),
|
||||
bx!(t.args.assets.into()),
|
||||
t.args.fee_asset_item,
|
||||
t.args.weight_limit,
|
||||
)
|
||||
}
|
||||
|
||||
fn relay_teleport_assets(t: RelayToSystemParaTest) -> DispatchResult {
|
||||
<Kusama as KusamaPallet>::XcmPallet::teleport_assets(
|
||||
t.signed_origin,
|
||||
bx!(t.args.dest.into()),
|
||||
bx!(t.args.beneficiary.into()),
|
||||
bx!(t.args.assets.into()),
|
||||
t.args.fee_asset_item,
|
||||
)
|
||||
}
|
||||
|
||||
fn system_para_limited_teleport_assets(t: SystemParaToRelayTest) -> DispatchResult {
|
||||
<AssetHubKusama as AssetHubKusamaPallet>::PolkadotXcm::limited_teleport_assets(
|
||||
t.signed_origin,
|
||||
bx!(t.args.dest.into()),
|
||||
bx!(t.args.beneficiary.into()),
|
||||
bx!(t.args.assets.into()),
|
||||
t.args.fee_asset_item,
|
||||
t.args.weight_limit,
|
||||
)
|
||||
}
|
||||
|
||||
// TODO: Uncomment when https://github.com/paritytech/polkadot/pull/7424 is merged
|
||||
// fn system_para_teleport_assets(t: SystemParaToRelayTest) -> DispatchResult {
|
||||
// <AssetHubKusama as AssetHubKusamaPallet>::PolkadotXcm::teleport_assets(
|
||||
// t.signed_origin,
|
||||
// bx!(t.args.dest),
|
||||
// bx!(t.args.beneficiary),
|
||||
// bx!(t.args.assets),
|
||||
// t.args.fee_asset_item,
|
||||
// )
|
||||
// }
|
||||
|
||||
/// Limited Teleport of native asset from Relay Chain to the System Parachain should work
|
||||
#[test]
|
||||
fn limited_teleport_native_assets_from_relay_to_system_para_works() {
|
||||
// Init values for Relay Chain
|
||||
let amount_to_send: Balance = KUSAMA_ED * 1000;
|
||||
let test_args = TestContext {
|
||||
sender: KusamaSender::get(),
|
||||
receiver: AssetHubKusamaReceiver::get(),
|
||||
args: relay_test_args(amount_to_send),
|
||||
};
|
||||
|
||||
let mut test = RelayToSystemParaTest::new(test_args);
|
||||
|
||||
let sender_balance_before = test.sender.balance;
|
||||
let receiver_balance_before = test.receiver.balance;
|
||||
|
||||
test.set_assertion::<Kusama>(relay_origin_assertions);
|
||||
test.set_assertion::<AssetHubKusama>(para_dest_assertions);
|
||||
test.set_dispatchable::<Kusama>(relay_limited_teleport_assets);
|
||||
test.assert();
|
||||
|
||||
let sender_balance_after = test.sender.balance;
|
||||
let receiver_balance_after = test.receiver.balance;
|
||||
|
||||
// Sender's balance is reduced
|
||||
assert_eq!(sender_balance_before - amount_to_send, sender_balance_after);
|
||||
// Receiver's balance is increased
|
||||
assert!(receiver_balance_after > receiver_balance_before);
|
||||
}
|
||||
|
||||
/// Limited Teleport of native asset from System Parachain to Relay Chain
|
||||
/// should work when there is enough balance in Relay Chain's `CheckAccount`
|
||||
#[test]
|
||||
fn limited_teleport_native_assets_back_from_system_para_to_relay_works() {
|
||||
// Dependency - Relay Chain's `CheckAccount` should have enough balance
|
||||
limited_teleport_native_assets_from_relay_to_system_para_works();
|
||||
|
||||
// Init values for Relay Chain
|
||||
let amount_to_send: Balance = ASSET_HUB_KUSAMA_ED * 1000;
|
||||
let destination = AssetHubKusama::parent_location();
|
||||
let beneficiary_id = KusamaReceiver::get();
|
||||
let assets = (Parent, amount_to_send).into();
|
||||
|
||||
let test_args = TestContext {
|
||||
sender: AssetHubKusamaSender::get(),
|
||||
receiver: KusamaReceiver::get(),
|
||||
args: system_para_test_args(destination, beneficiary_id, amount_to_send, assets, None),
|
||||
};
|
||||
|
||||
let mut test = SystemParaToRelayTest::new(test_args);
|
||||
|
||||
let sender_balance_before = test.sender.balance;
|
||||
let receiver_balance_before = test.receiver.balance;
|
||||
|
||||
test.set_assertion::<AssetHubKusama>(para_origin_assertions);
|
||||
test.set_assertion::<Kusama>(relay_dest_assertions);
|
||||
test.set_dispatchable::<AssetHubKusama>(system_para_limited_teleport_assets);
|
||||
test.assert();
|
||||
|
||||
let sender_balance_after = test.sender.balance;
|
||||
let receiver_balance_after = test.receiver.balance;
|
||||
|
||||
// Sender's balance is reduced
|
||||
assert_eq!(sender_balance_before - amount_to_send, sender_balance_after);
|
||||
// Receiver's balance is increased
|
||||
assert!(receiver_balance_after > receiver_balance_before);
|
||||
}
|
||||
|
||||
/// Limited Teleport of native asset from System Parachain to Relay Chain
|
||||
/// should't work when there is not enough balance in Relay Chain's `CheckAccount`
|
||||
#[test]
|
||||
fn limited_teleport_native_assets_from_system_para_to_relay_fails() {
|
||||
// Init values for Relay Chain
|
||||
let amount_to_send: Balance = ASSET_HUB_KUSAMA_ED * 1000;
|
||||
let destination = AssetHubKusama::parent_location().into();
|
||||
let beneficiary_id = KusamaReceiver::get().into();
|
||||
let assets = (Parent, amount_to_send).into();
|
||||
|
||||
let test_args = TestContext {
|
||||
sender: AssetHubKusamaSender::get(),
|
||||
receiver: KusamaReceiver::get(),
|
||||
args: system_para_test_args(destination, beneficiary_id, amount_to_send, assets, None),
|
||||
};
|
||||
|
||||
let mut test = SystemParaToRelayTest::new(test_args);
|
||||
|
||||
let sender_balance_before = test.sender.balance;
|
||||
let receiver_balance_before = test.receiver.balance;
|
||||
|
||||
test.set_assertion::<AssetHubKusama>(para_origin_assertions);
|
||||
test.set_assertion::<Kusama>(relay_dest_assertions_fail);
|
||||
test.set_dispatchable::<AssetHubKusama>(system_para_limited_teleport_assets);
|
||||
test.assert();
|
||||
|
||||
let sender_balance_after = test.sender.balance;
|
||||
let receiver_balance_after = test.receiver.balance;
|
||||
|
||||
// Sender's balance is reduced
|
||||
assert_eq!(sender_balance_before - amount_to_send, sender_balance_after);
|
||||
// Receiver's balance does not change
|
||||
assert_eq!(receiver_balance_after, receiver_balance_before);
|
||||
}
|
||||
|
||||
/// Teleport of native asset from Relay Chain to the System Parachain should work
|
||||
#[test]
|
||||
fn teleport_native_assets_from_relay_to_system_para_works() {
|
||||
// Init values for Relay Chain
|
||||
let amount_to_send: Balance = KUSAMA_ED * 1000;
|
||||
let test_args = TestContext {
|
||||
sender: KusamaSender::get(),
|
||||
receiver: AssetHubKusamaReceiver::get(),
|
||||
args: relay_test_args(amount_to_send),
|
||||
};
|
||||
|
||||
let mut test = RelayToSystemParaTest::new(test_args);
|
||||
|
||||
let sender_balance_before = test.sender.balance;
|
||||
let receiver_balance_before = test.receiver.balance;
|
||||
|
||||
test.set_assertion::<Kusama>(relay_origin_assertions);
|
||||
test.set_assertion::<AssetHubKusama>(para_dest_assertions);
|
||||
test.set_dispatchable::<Kusama>(relay_teleport_assets);
|
||||
test.assert();
|
||||
|
||||
let sender_balance_after = test.sender.balance;
|
||||
let receiver_balance_after = test.receiver.balance;
|
||||
|
||||
// Sender's balance is reduced
|
||||
assert_eq!(sender_balance_before - amount_to_send, sender_balance_after);
|
||||
// Receiver's balance is increased
|
||||
assert!(receiver_balance_after > receiver_balance_before);
|
||||
}
|
||||
|
||||
// TODO: Uncomment when https://github.com/paritytech/polkadot/pull/7424 is merged
|
||||
|
||||
// Right now it is failing in the Relay Chain with a
|
||||
// `messageQueue.ProcessingFailed` event `error: Unsupported`.
|
||||
// The reason is the `Weigher` in `pallet_xcm` is not properly calculating the `remote_weight`
|
||||
// and it cause an `Overweight` error in `AllowTopLevelPaidExecutionFrom` barrier
|
||||
|
||||
// /// Teleport of native asset from System Parachains to the Relay Chain
|
||||
// /// should work when there is enough balance in Relay Chain's `CheckAccount`
|
||||
// #[test]
|
||||
// fn teleport_native_assets_back_from_system_para_to_relay_works() {
|
||||
// // Dependency - Relay Chain's `CheckAccount` should have enough balance
|
||||
// teleport_native_assets_from_relay_to_system_para_works();
|
||||
|
||||
// // Init values for Relay Chain
|
||||
// let amount_to_send: Balance = ASSET_HUB_KUSAMA_ED * 1000;
|
||||
// let test_args = TestContext {
|
||||
// sender: AssetHubKusamaSender::get(),
|
||||
// receiver: KusamaReceiver::get(),
|
||||
// args: get_para_dispatch_args(amount_to_send),
|
||||
// };
|
||||
|
||||
// let mut test = SystemParaToRelayTest::new(test_args);
|
||||
|
||||
// let sender_balance_before = test.sender.balance;
|
||||
// let receiver_balance_before = test.receiver.balance;
|
||||
|
||||
// test.set_assertion::<AssetHubKusama>(para_origin_assertions);
|
||||
// test.set_assertion::<Kusama>(relay_dest_assertions);
|
||||
// test.set_dispatchable::<AssetHubKusama>(system_para_teleport_assets);
|
||||
// test.assert();
|
||||
|
||||
// let sender_balance_after = test.sender.balance;
|
||||
// let receiver_balance_after = test.receiver.balance;
|
||||
|
||||
// // Sender's balance is reduced
|
||||
// assert_eq!(sender_balance_before - amount_to_send, sender_balance_after);
|
||||
// // Receiver's balance is increased
|
||||
// assert!(receiver_balance_after > receiver_balance_before);
|
||||
// }
|
||||
|
||||
// /// Teleport of native asset from System Parachain to Relay Chain
|
||||
// /// shouldn't work when there is not enough balance in Relay Chain's `CheckAccount`
|
||||
// #[test]
|
||||
// fn teleport_native_assets_from_system_para_to_relay_fails() {
|
||||
// // Init values for Relay Chain
|
||||
// let amount_to_send: Balance = ASSET_HUB_KUSAMA_ED * 1000;
|
||||
// let assets = (Parent, amount_to_send).into();
|
||||
//
|
||||
// let test_args = TestContext {
|
||||
// sender: AssetHubKusamaSender::get(),
|
||||
// receiver: KusamaReceiver::get(),
|
||||
// args: system_para_test_args(amount_to_send),
|
||||
// assets,
|
||||
// None
|
||||
// };
|
||||
|
||||
// let mut test = SystemParaToRelayTest::new(test_args);
|
||||
|
||||
// let sender_balance_before = test.sender.balance;
|
||||
// let receiver_balance_before = test.receiver.balance;
|
||||
|
||||
// test.set_assertion::<AssetHubKusama>(para_origin_assertions);
|
||||
// test.set_assertion::<Kusama>(relay_dest_assertions);
|
||||
// test.set_dispatchable::<AssetHubKusama>(system_para_teleport_assets);
|
||||
// test.assert();
|
||||
|
||||
// let sender_balance_after = test.sender.balance;
|
||||
// let receiver_balance_after = test.receiver.balance;
|
||||
|
||||
// // Sender's balance is reduced
|
||||
// assert_eq!(sender_balance_before - amount_to_send, sender_balance_after);
|
||||
// // Receiver's balance does not change
|
||||
// assert_eq!(receiver_balance_after, receiver_balance_before);
|
||||
// }
|
||||
@@ -1,52 +0,0 @@
|
||||
[package]
|
||||
name = "asset-hub-polkadot-integration-tests"
|
||||
version = "1.0.0"
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
||||
license = "Apache-2.0"
|
||||
description = "Asset Hub Polkadot runtime integration tests with xcm-emulator"
|
||||
publish = false
|
||||
|
||||
[dependencies]
|
||||
codec = { package = "parity-scale-codec", version = "3.4.0", default-features = false }
|
||||
|
||||
# Substrate
|
||||
sp-runtime = { path = "../../../../../../substrate/primitives/runtime", default-features = false}
|
||||
frame-support = { path = "../../../../../../substrate/frame/support", default-features = false}
|
||||
frame-system = { path = "../../../../../../substrate/frame/system", default-features = false}
|
||||
pallet-balances = { path = "../../../../../../substrate/frame/balances", default-features = false}
|
||||
pallet-assets = { path = "../../../../../../substrate/frame/assets", default-features = false}
|
||||
pallet-asset-conversion = { path = "../../../../../../substrate/frame/asset-conversion", default-features = false}
|
||||
|
||||
# Polkadot
|
||||
polkadot-core-primitives = { path = "../../../../../../polkadot/core-primitives", default-features = false}
|
||||
polkadot-parachain-primitives = { path = "../../../../../../polkadot/parachain", default-features = false}
|
||||
polkadot-runtime-parachains = { path = "../../../../../../polkadot/runtime/parachains" }
|
||||
polkadot-runtime = { path = "../../../../../../polkadot/runtime/polkadot" }
|
||||
xcm = { package = "staging-xcm", path = "../../../../../../polkadot/xcm", default-features = false}
|
||||
pallet-xcm = { path = "../../../../../../polkadot/xcm/pallet-xcm", default-features = false}
|
||||
|
||||
# Cumulus
|
||||
parachains-common = { path = "../../../../common" }
|
||||
asset-hub-kusama-runtime = { path = "../../../../runtimes/assets/asset-hub-kusama" }
|
||||
|
||||
# Local
|
||||
xcm-emulator = { path = "../../../../../xcm/xcm-emulator", default-features = false}
|
||||
integration-tests-common = { path = "../../common", default-features = false}
|
||||
|
||||
[features]
|
||||
runtime-benchmarks = [
|
||||
"asset-hub-kusama-runtime/runtime-benchmarks",
|
||||
"frame-support/runtime-benchmarks",
|
||||
"frame-system/runtime-benchmarks",
|
||||
"integration-tests-common/runtime-benchmarks",
|
||||
"pallet-asset-conversion/runtime-benchmarks",
|
||||
"pallet-assets/runtime-benchmarks",
|
||||
"pallet-balances/runtime-benchmarks",
|
||||
"pallet-xcm/runtime-benchmarks",
|
||||
"parachains-common/runtime-benchmarks",
|
||||
"polkadot-parachain-primitives/runtime-benchmarks",
|
||||
"polkadot-runtime-parachains/runtime-benchmarks",
|
||||
"polkadot-runtime/runtime-benchmarks",
|
||||
"sp-runtime/runtime-benchmarks",
|
||||
]
|
||||
@@ -1,90 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
pub use codec::Encode;
|
||||
pub use frame_support::{
|
||||
assert_err, assert_ok,
|
||||
pallet_prelude::Weight,
|
||||
sp_runtime::{AccountId32, DispatchError, DispatchResult},
|
||||
traits::fungibles::Inspect,
|
||||
};
|
||||
pub use integration_tests_common::{
|
||||
constants::{
|
||||
asset_hub_polkadot::ED as ASSET_HUB_POLKADOT_ED, polkadot::ED as POLKADOT_ED,
|
||||
PROOF_SIZE_THRESHOLD, REF_TIME_THRESHOLD, XCM_V3,
|
||||
},
|
||||
xcm_helpers::{xcm_transact_paid_execution, xcm_transact_unpaid_execution},
|
||||
AssetHubPolkadot, AssetHubPolkadotPallet, AssetHubPolkadotReceiver, AssetHubPolkadotSender,
|
||||
PenpalPolkadotA, PenpalPolkadotAPallet, PenpalPolkadotAReceiver, PenpalPolkadotB,
|
||||
PenpalPolkadotBPallet, Polkadot, PolkadotPallet, PolkadotReceiver, PolkadotSender,
|
||||
};
|
||||
pub use parachains_common::{AccountId, Balance};
|
||||
pub use xcm::{
|
||||
prelude::{AccountId32 as AccountId32Junction, *},
|
||||
v3::{Error, NetworkId::Polkadot as PolkadotId},
|
||||
};
|
||||
pub use xcm_emulator::{
|
||||
assert_expected_events, bx, helpers::weight_within_threshold, Chain, Parachain as Para,
|
||||
RelayChain as Relay, Test, TestArgs, TestContext, TestExt,
|
||||
};
|
||||
|
||||
pub const ASSET_ID: u32 = 1;
|
||||
pub const ASSET_MIN_BALANCE: u128 = 1000;
|
||||
// `Assets` pallet index
|
||||
pub const ASSETS_PALLET_ID: u8 = 50;
|
||||
|
||||
pub type RelayToSystemParaTest = Test<Polkadot, AssetHubPolkadot>;
|
||||
pub type SystemParaToRelayTest = Test<AssetHubPolkadot, Polkadot>;
|
||||
pub type SystemParaToParaTest = Test<AssetHubPolkadot, PenpalPolkadotA>;
|
||||
|
||||
/// Returns a `TestArgs` instance to de used for the Relay Chain accross integraton tests
|
||||
pub fn relay_test_args(amount: Balance) -> TestArgs {
|
||||
TestArgs {
|
||||
dest: Polkadot::child_location_of(AssetHubPolkadot::para_id()),
|
||||
beneficiary: AccountId32Junction {
|
||||
network: None,
|
||||
id: AssetHubPolkadotReceiver::get().into(),
|
||||
}
|
||||
.into(),
|
||||
amount,
|
||||
assets: (Here, amount).into(),
|
||||
asset_id: None,
|
||||
fee_asset_item: 0,
|
||||
weight_limit: WeightLimit::Unlimited,
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns a `TestArgs` instance to de used for the System Parachain accross integraton tests
|
||||
pub fn system_para_test_args(
|
||||
dest: MultiLocation,
|
||||
beneficiary_id: AccountId32,
|
||||
amount: Balance,
|
||||
assets: MultiAssets,
|
||||
asset_id: Option<u32>,
|
||||
) -> TestArgs {
|
||||
TestArgs {
|
||||
dest,
|
||||
beneficiary: AccountId32Junction { network: None, id: beneficiary_id.into() }.into(),
|
||||
amount,
|
||||
assets,
|
||||
asset_id,
|
||||
fee_asset_item: 0,
|
||||
weight_limit: WeightLimit::Unlimited,
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[cfg(not(feature = "runtime-benchmarks"))]
|
||||
mod tests;
|
||||
-192
@@ -1,192 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
use crate::*;
|
||||
|
||||
const MAX_CAPACITY: u32 = 8;
|
||||
const MAX_MESSAGE_SIZE: u32 = 8192;
|
||||
|
||||
/// Opening HRMP channels between Parachains should work
|
||||
#[test]
|
||||
fn open_hrmp_channel_between_paras_works() {
|
||||
// Parchain A init values
|
||||
let para_a_id = PenpalPolkadotA::para_id();
|
||||
let para_a_root_origin = <PenpalPolkadotA as Chain>::RuntimeOrigin::root();
|
||||
|
||||
// Parachain B init values
|
||||
let para_b_id = PenpalPolkadotB::para_id();
|
||||
let para_b_root_origin = <PenpalPolkadotB as Chain>::RuntimeOrigin::root();
|
||||
|
||||
let fee_amount = POLKADOT_ED * 1000;
|
||||
let fund_amount = POLKADOT_ED * 1000_000_000;
|
||||
|
||||
// Fund Parachain's Sovereign accounts to be able to reserve the deposit
|
||||
let para_a_sovereign_account = Polkadot::fund_para_sovereign(fund_amount, para_a_id);
|
||||
let para_b_sovereign_account = Polkadot::fund_para_sovereign(fund_amount, para_b_id);
|
||||
|
||||
let relay_destination: VersionedMultiLocation = PenpalPolkadotA::parent_location().into();
|
||||
|
||||
// ---- Init Open channel from Parachain to System Parachain
|
||||
let mut call = Polkadot::init_open_channel_call(para_b_id, MAX_CAPACITY, MAX_MESSAGE_SIZE);
|
||||
let origin_kind = OriginKind::Native;
|
||||
let native_asset: MultiAsset = (Here, fee_amount).into();
|
||||
let beneficiary = Polkadot::sovereign_account_id_of_child_para(para_a_id);
|
||||
|
||||
let mut xcm = xcm_transact_paid_execution(call, origin_kind, native_asset.clone(), beneficiary);
|
||||
|
||||
PenpalPolkadotA::execute_with(|| {
|
||||
assert_ok!(<PenpalPolkadotA as PenpalPolkadotAPallet>::PolkadotXcm::send(
|
||||
para_a_root_origin,
|
||||
bx!(relay_destination.clone()),
|
||||
bx!(xcm),
|
||||
));
|
||||
|
||||
PenpalPolkadotA::assert_xcm_pallet_sent();
|
||||
});
|
||||
|
||||
Polkadot::execute_with(|| {
|
||||
type RuntimeEvent = <Polkadot as Chain>::RuntimeEvent;
|
||||
|
||||
Polkadot::assert_ump_queue_processed(
|
||||
true,
|
||||
Some(para_a_id),
|
||||
Some(Weight::from_parts(1_282_426_000, 207_186)),
|
||||
);
|
||||
|
||||
assert_expected_events!(
|
||||
Polkadot,
|
||||
vec![
|
||||
// Parachain's Sovereign account balance is withdrawn to pay XCM fees
|
||||
RuntimeEvent::Balances(pallet_balances::Event::Withdraw { who, amount }) => {
|
||||
who: *who == para_a_sovereign_account.clone(),
|
||||
amount: *amount == fee_amount,
|
||||
},
|
||||
// Sender deposit is reserved for Parachain's Sovereign account
|
||||
RuntimeEvent::Balances(pallet_balances::Event::Reserved { who, .. }) =>{
|
||||
who: *who == para_a_sovereign_account,
|
||||
},
|
||||
// Open channel requested from Para A to Para B
|
||||
RuntimeEvent::Hrmp(
|
||||
polkadot_runtime_parachains::hrmp::Event::OpenChannelRequested {
|
||||
sender, recipient, proposed_max_capacity: max_capacity, proposed_max_message_size: max_message_size
|
||||
}
|
||||
) => {
|
||||
sender: *sender == para_a_id.into(),
|
||||
recipient: *recipient == para_b_id.into(),
|
||||
max_capacity: *max_capacity == MAX_CAPACITY,
|
||||
max_message_size: *max_message_size == MAX_MESSAGE_SIZE,
|
||||
},
|
||||
]
|
||||
);
|
||||
});
|
||||
|
||||
// ---- Accept Open channel from Parachain to System Parachain
|
||||
call = Polkadot::accept_open_channel_call(para_a_id);
|
||||
let beneficiary = Polkadot::sovereign_account_id_of_child_para(para_b_id);
|
||||
|
||||
xcm = xcm_transact_paid_execution(call, origin_kind, native_asset, beneficiary);
|
||||
|
||||
PenpalPolkadotB::execute_with(|| {
|
||||
assert_ok!(<PenpalPolkadotB as PenpalPolkadotBPallet>::PolkadotXcm::send(
|
||||
para_b_root_origin,
|
||||
bx!(relay_destination),
|
||||
bx!(xcm),
|
||||
));
|
||||
|
||||
PenpalPolkadotB::assert_xcm_pallet_sent();
|
||||
});
|
||||
|
||||
PenpalPolkadotB::execute_with(|| {});
|
||||
|
||||
Polkadot::execute_with(|| {
|
||||
type RuntimeEvent = <Polkadot as Chain>::RuntimeEvent;
|
||||
|
||||
Polkadot::assert_ump_queue_processed(
|
||||
true,
|
||||
Some(para_b_id),
|
||||
Some(Weight::from_parts(1_282_426_000, 207_186)),
|
||||
);
|
||||
|
||||
assert_expected_events!(
|
||||
Polkadot,
|
||||
vec![
|
||||
// Parachain's Sovereign account balance is withdrawn to pay XCM fees
|
||||
RuntimeEvent::Balances(pallet_balances::Event::Withdraw { who, amount }) => {
|
||||
who: *who == para_b_sovereign_account.clone(),
|
||||
amount: *amount == fee_amount,
|
||||
},
|
||||
// Sender deposit is reserved for Parachain's Sovereign account
|
||||
RuntimeEvent::Balances(pallet_balances::Event::Reserved { who, .. }) =>{
|
||||
who: *who == para_b_sovereign_account,
|
||||
},
|
||||
// Open channel accepted for Para A to Para B
|
||||
RuntimeEvent::Hrmp(
|
||||
polkadot_runtime_parachains::hrmp::Event::OpenChannelAccepted {
|
||||
sender, recipient
|
||||
}
|
||||
) => {
|
||||
sender: *sender == para_a_id.into(),
|
||||
recipient: *recipient == para_b_id.into(),
|
||||
},
|
||||
]
|
||||
);
|
||||
});
|
||||
|
||||
Polkadot::force_process_hrmp_open(para_a_id, para_b_id);
|
||||
}
|
||||
|
||||
/// Opening HRMP channels between System Parachains and Parachains should work
|
||||
#[test]
|
||||
fn force_open_hrmp_channel_for_system_para_works() {
|
||||
// Relay Chain init values
|
||||
let relay_root_origin = <Polkadot as Chain>::RuntimeOrigin::root();
|
||||
|
||||
// System Para init values
|
||||
let system_para_id = AssetHubPolkadot::para_id();
|
||||
|
||||
// Parachain A init values
|
||||
let para_a_id = PenpalPolkadotA::para_id();
|
||||
|
||||
Polkadot::execute_with(|| {
|
||||
assert_ok!(<Polkadot as PolkadotPallet>::Hrmp::force_open_hrmp_channel(
|
||||
relay_root_origin,
|
||||
system_para_id,
|
||||
para_a_id,
|
||||
MAX_CAPACITY,
|
||||
MAX_MESSAGE_SIZE
|
||||
));
|
||||
|
||||
type RuntimeEvent = <Polkadot as Chain>::RuntimeEvent;
|
||||
|
||||
assert_expected_events!(
|
||||
Polkadot,
|
||||
vec![
|
||||
// HRMP channel forced opened
|
||||
RuntimeEvent::Hrmp(
|
||||
polkadot_runtime_parachains::hrmp::Event::HrmpChannelForceOpened{
|
||||
sender, recipient, proposed_max_capacity: max_capacity, proposed_max_message_size: max_message_size
|
||||
}
|
||||
) => {
|
||||
sender: *sender == system_para_id.into(),
|
||||
recipient: *recipient == para_a_id.into(),
|
||||
max_capacity: *max_capacity == MAX_CAPACITY,
|
||||
max_message_size: *max_message_size == MAX_MESSAGE_SIZE,
|
||||
},
|
||||
]
|
||||
);
|
||||
});
|
||||
|
||||
Polkadot::force_process_hrmp_open(system_para_id, para_a_id);
|
||||
}
|
||||
-20
@@ -1,20 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
mod hrmp_channels;
|
||||
mod reserve_transfer;
|
||||
mod send;
|
||||
mod set_xcm_versions;
|
||||
mod teleport;
|
||||
-414
@@ -1,414 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
use crate::*;
|
||||
|
||||
fn relay_origin_assertions(t: RelayToSystemParaTest) {
|
||||
type RuntimeEvent = <Polkadot as Chain>::RuntimeEvent;
|
||||
|
||||
Polkadot::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts(629_384_000, 6_196)));
|
||||
|
||||
assert_expected_events!(
|
||||
Polkadot,
|
||||
vec![
|
||||
// Amount to reserve transfer is transferred to System Parachain's Sovereign account
|
||||
RuntimeEvent::Balances(pallet_balances::Event::Transfer { from, to, amount }) => {
|
||||
from: *from == t.sender.account_id,
|
||||
to: *to == Polkadot::sovereign_account_id_of(
|
||||
t.args.dest
|
||||
),
|
||||
amount: *amount == t.args.amount,
|
||||
},
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
fn system_para_dest_assertions_incomplete(_t: RelayToSystemParaTest) {
|
||||
AssetHubPolkadot::assert_dmp_queue_incomplete(
|
||||
Some(Weight::from_parts(1_000_000_000, 0)),
|
||||
Some(Error::UntrustedReserveLocation),
|
||||
);
|
||||
}
|
||||
|
||||
fn system_para_to_relay_assertions(_t: SystemParaToRelayTest) {
|
||||
AssetHubPolkadot::assert_xcm_pallet_attempted_error(Some(XcmError::Barrier))
|
||||
}
|
||||
|
||||
fn system_para_to_para_assertions(t: SystemParaToParaTest) {
|
||||
type RuntimeEvent = <AssetHubPolkadot as Chain>::RuntimeEvent;
|
||||
|
||||
AssetHubPolkadot::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts(
|
||||
676_119_000,
|
||||
6196,
|
||||
)));
|
||||
|
||||
assert_expected_events!(
|
||||
AssetHubPolkadot,
|
||||
vec![
|
||||
// Amount to reserve transfer is transferred to Parachain's Sovereing account
|
||||
RuntimeEvent::Balances(
|
||||
pallet_balances::Event::Transfer { from, to, amount }
|
||||
) => {
|
||||
from: *from == t.sender.account_id,
|
||||
to: *to == AssetHubPolkadot::sovereign_account_id_of(
|
||||
t.args.dest
|
||||
),
|
||||
amount: *amount == t.args.amount,
|
||||
},
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
fn system_para_to_para_assets_assertions(t: SystemParaToParaTest) {
|
||||
type RuntimeEvent = <AssetHubPolkadot as Chain>::RuntimeEvent;
|
||||
|
||||
AssetHubPolkadot::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts(
|
||||
676_119_000,
|
||||
6196,
|
||||
)));
|
||||
|
||||
assert_expected_events!(
|
||||
AssetHubPolkadot,
|
||||
vec![
|
||||
// Amount to reserve transfer is transferred to Parachain's Sovereing account
|
||||
RuntimeEvent::Assets(
|
||||
pallet_assets::Event::Transferred { asset_id, from, to, amount }
|
||||
) => {
|
||||
asset_id: *asset_id == ASSET_ID,
|
||||
from: *from == t.sender.account_id,
|
||||
to: *to == AssetHubPolkadot::sovereign_account_id_of(
|
||||
t.args.dest
|
||||
),
|
||||
amount: *amount == t.args.amount,
|
||||
},
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
fn relay_limited_reserve_transfer_assets(t: RelayToSystemParaTest) -> DispatchResult {
|
||||
<Polkadot as PolkadotPallet>::XcmPallet::limited_reserve_transfer_assets(
|
||||
t.signed_origin,
|
||||
bx!(t.args.dest.into()),
|
||||
bx!(t.args.beneficiary.into()),
|
||||
bx!(t.args.assets.into()),
|
||||
t.args.fee_asset_item,
|
||||
t.args.weight_limit,
|
||||
)
|
||||
}
|
||||
|
||||
fn relay_reserve_transfer_assets(t: RelayToSystemParaTest) -> DispatchResult {
|
||||
<Polkadot as PolkadotPallet>::XcmPallet::reserve_transfer_assets(
|
||||
t.signed_origin,
|
||||
bx!(t.args.dest.into()),
|
||||
bx!(t.args.beneficiary.into()),
|
||||
bx!(t.args.assets.into()),
|
||||
t.args.fee_asset_item,
|
||||
)
|
||||
}
|
||||
|
||||
fn system_para_limited_reserve_transfer_assets(t: SystemParaToRelayTest) -> DispatchResult {
|
||||
<AssetHubPolkadot as AssetHubPolkadotPallet>::PolkadotXcm::limited_reserve_transfer_assets(
|
||||
t.signed_origin,
|
||||
bx!(t.args.dest.into()),
|
||||
bx!(t.args.beneficiary.into()),
|
||||
bx!(t.args.assets.into()),
|
||||
t.args.fee_asset_item,
|
||||
t.args.weight_limit,
|
||||
)
|
||||
}
|
||||
|
||||
fn system_para_reserve_transfer_assets(t: SystemParaToRelayTest) -> DispatchResult {
|
||||
<AssetHubPolkadot as AssetHubPolkadotPallet>::PolkadotXcm::reserve_transfer_assets(
|
||||
t.signed_origin,
|
||||
bx!(t.args.dest.into()),
|
||||
bx!(t.args.beneficiary.into()),
|
||||
bx!(t.args.assets.into()),
|
||||
t.args.fee_asset_item,
|
||||
)
|
||||
}
|
||||
|
||||
fn system_para_to_para_limited_reserve_transfer_assets(t: SystemParaToParaTest) -> DispatchResult {
|
||||
<AssetHubPolkadot as AssetHubPolkadotPallet>::PolkadotXcm::limited_reserve_transfer_assets(
|
||||
t.signed_origin,
|
||||
bx!(t.args.dest.into()),
|
||||
bx!(t.args.beneficiary.into()),
|
||||
bx!(t.args.assets.into()),
|
||||
t.args.fee_asset_item,
|
||||
t.args.weight_limit,
|
||||
)
|
||||
}
|
||||
|
||||
fn system_para_to_para_reserve_transfer_assets(t: SystemParaToParaTest) -> DispatchResult {
|
||||
<AssetHubPolkadot as AssetHubPolkadotPallet>::PolkadotXcm::reserve_transfer_assets(
|
||||
t.signed_origin,
|
||||
bx!(t.args.dest.into()),
|
||||
bx!(t.args.beneficiary.into()),
|
||||
bx!(t.args.assets.into()),
|
||||
t.args.fee_asset_item,
|
||||
)
|
||||
}
|
||||
|
||||
/// Limited Reserve Transfers of native asset from Relay Chain to the System Parachain shouldn't
|
||||
/// work
|
||||
#[test]
|
||||
fn limited_reserve_transfer_native_asset_from_relay_to_system_para_fails() {
|
||||
// Init values for Relay Chain
|
||||
let amount_to_send: Balance = POLKADOT_ED * 1000;
|
||||
let test_args = TestContext {
|
||||
sender: PolkadotSender::get(),
|
||||
receiver: AssetHubPolkadotReceiver::get(),
|
||||
args: relay_test_args(amount_to_send),
|
||||
};
|
||||
|
||||
let mut test = RelayToSystemParaTest::new(test_args);
|
||||
|
||||
let sender_balance_before = test.sender.balance;
|
||||
let receiver_balance_before = test.receiver.balance;
|
||||
|
||||
test.set_assertion::<Polkadot>(relay_origin_assertions);
|
||||
test.set_assertion::<AssetHubPolkadot>(system_para_dest_assertions_incomplete);
|
||||
test.set_dispatchable::<Polkadot>(relay_limited_reserve_transfer_assets);
|
||||
test.assert();
|
||||
|
||||
let sender_balance_after = test.sender.balance;
|
||||
let receiver_balance_after = test.receiver.balance;
|
||||
|
||||
assert_eq!(sender_balance_before - amount_to_send, sender_balance_after);
|
||||
assert_eq!(receiver_balance_before, receiver_balance_after);
|
||||
}
|
||||
|
||||
/// Limited Reserve Transfers of native asset from System Parachain to Relay Chain shoudln't work
|
||||
#[test]
|
||||
fn limited_reserve_transfer_native_asset_from_system_para_to_relay_fails() {
|
||||
// Init values for System Parachain
|
||||
let destination = AssetHubPolkadot::parent_location();
|
||||
let beneficiary_id = PolkadotReceiver::get();
|
||||
let amount_to_send: Balance = ASSET_HUB_POLKADOT_ED * 1000;
|
||||
let assets = (Parent, amount_to_send).into();
|
||||
|
||||
let test_args = TestContext {
|
||||
sender: AssetHubPolkadotSender::get(),
|
||||
receiver: PolkadotReceiver::get(),
|
||||
args: system_para_test_args(destination, beneficiary_id, amount_to_send, assets, None),
|
||||
};
|
||||
|
||||
let mut test = SystemParaToRelayTest::new(test_args);
|
||||
|
||||
let sender_balance_before = test.sender.balance;
|
||||
let receiver_balance_before = test.receiver.balance;
|
||||
|
||||
test.set_assertion::<AssetHubPolkadot>(system_para_to_relay_assertions);
|
||||
test.set_dispatchable::<AssetHubPolkadot>(system_para_limited_reserve_transfer_assets);
|
||||
test.assert();
|
||||
|
||||
let sender_balance_after = test.sender.balance;
|
||||
let receiver_balance_after = test.receiver.balance;
|
||||
|
||||
assert_eq!(sender_balance_before, sender_balance_after);
|
||||
assert_eq!(receiver_balance_before, receiver_balance_after);
|
||||
}
|
||||
|
||||
/// Reserve Transfers of native asset from Relay Chain to the System Parachain shouldn't work
|
||||
#[test]
|
||||
fn reserve_transfer_native_asset_from_relay_to_system_para_fails() {
|
||||
// Init values for Relay Chain
|
||||
let amount_to_send: Balance = POLKADOT_ED * 1000;
|
||||
let test_args = TestContext {
|
||||
sender: PolkadotSender::get(),
|
||||
receiver: AssetHubPolkadotReceiver::get(),
|
||||
args: relay_test_args(amount_to_send),
|
||||
};
|
||||
|
||||
let mut test = RelayToSystemParaTest::new(test_args);
|
||||
|
||||
let sender_balance_before = test.sender.balance;
|
||||
let receiver_balance_before = test.receiver.balance;
|
||||
|
||||
test.set_assertion::<Polkadot>(relay_origin_assertions);
|
||||
test.set_assertion::<AssetHubPolkadot>(system_para_dest_assertions_incomplete);
|
||||
test.set_dispatchable::<Polkadot>(relay_reserve_transfer_assets);
|
||||
test.assert();
|
||||
|
||||
let sender_balance_after = test.sender.balance;
|
||||
let receiver_balance_after = test.receiver.balance;
|
||||
|
||||
assert_eq!(sender_balance_before - amount_to_send, sender_balance_after);
|
||||
assert_eq!(receiver_balance_before, receiver_balance_after);
|
||||
}
|
||||
|
||||
/// Reserve Transfers of native asset from System Parachain to Relay Chain shouldn't work
|
||||
#[test]
|
||||
fn reserve_transfer_native_asset_from_system_para_to_relay_fails() {
|
||||
// Init values for System Parachain
|
||||
let destination = AssetHubPolkadot::parent_location();
|
||||
let beneficiary_id = PolkadotReceiver::get();
|
||||
let amount_to_send: Balance = ASSET_HUB_POLKADOT_ED * 1000;
|
||||
let assets = (Parent, amount_to_send).into();
|
||||
|
||||
let test_args = TestContext {
|
||||
sender: AssetHubPolkadotSender::get(),
|
||||
receiver: PolkadotReceiver::get(),
|
||||
args: system_para_test_args(destination, beneficiary_id, amount_to_send, assets, None),
|
||||
};
|
||||
|
||||
let mut test = SystemParaToRelayTest::new(test_args);
|
||||
|
||||
let sender_balance_before = test.sender.balance;
|
||||
let receiver_balance_before = test.receiver.balance;
|
||||
|
||||
test.set_assertion::<AssetHubPolkadot>(system_para_to_relay_assertions);
|
||||
test.set_dispatchable::<AssetHubPolkadot>(system_para_reserve_transfer_assets);
|
||||
test.assert();
|
||||
|
||||
let sender_balance_after = test.sender.balance;
|
||||
let receiver_balance_after = test.receiver.balance;
|
||||
|
||||
assert_eq!(sender_balance_before, sender_balance_after);
|
||||
assert_eq!(receiver_balance_before, receiver_balance_after);
|
||||
}
|
||||
|
||||
/// Limited Reserve Transfers of native asset from System Parachain to Parachain should work
|
||||
#[test]
|
||||
fn limited_reserve_transfer_native_asset_from_system_para_to_para() {
|
||||
// Init values for System Parachain
|
||||
let destination = AssetHubPolkadot::sibling_location_of(PenpalPolkadotA::para_id());
|
||||
let beneficiary_id = PenpalPolkadotAReceiver::get();
|
||||
let amount_to_send: Balance = ASSET_HUB_POLKADOT_ED * 1000;
|
||||
let assets = (Parent, amount_to_send).into();
|
||||
|
||||
let test_args = TestContext {
|
||||
sender: AssetHubPolkadotSender::get(),
|
||||
receiver: PenpalPolkadotAReceiver::get(),
|
||||
args: system_para_test_args(destination, beneficiary_id, amount_to_send, assets, None),
|
||||
};
|
||||
|
||||
let mut test = SystemParaToParaTest::new(test_args);
|
||||
|
||||
let sender_balance_before = test.sender.balance;
|
||||
|
||||
test.set_assertion::<AssetHubPolkadot>(system_para_to_para_assertions);
|
||||
// TODO: Add assertion for Penpal runtime. Right now message is failing with
|
||||
// `UntrustedReserveLocation`
|
||||
test.set_dispatchable::<AssetHubPolkadot>(system_para_to_para_limited_reserve_transfer_assets);
|
||||
test.assert();
|
||||
|
||||
let sender_balance_after = test.sender.balance;
|
||||
|
||||
assert_eq!(sender_balance_before - amount_to_send, sender_balance_after);
|
||||
// TODO: Check receiver balance when Penpal runtime is improved to propery handle reserve
|
||||
// transfers
|
||||
}
|
||||
|
||||
/// Reserve Transfers of native asset from System Parachain to Parachain should work
|
||||
#[test]
|
||||
fn reserve_transfer_native_asset_from_system_para_to_para() {
|
||||
// Init values for System Parachain
|
||||
let destination = AssetHubPolkadot::sibling_location_of(PenpalPolkadotA::para_id());
|
||||
let beneficiary_id = PenpalPolkadotAReceiver::get();
|
||||
let amount_to_send: Balance = ASSET_HUB_POLKADOT_ED * 1000;
|
||||
let assets = (Parent, amount_to_send).into();
|
||||
|
||||
let test_args = TestContext {
|
||||
sender: AssetHubPolkadotSender::get(),
|
||||
receiver: PenpalPolkadotAReceiver::get(),
|
||||
args: system_para_test_args(destination, beneficiary_id, amount_to_send, assets, None),
|
||||
};
|
||||
|
||||
let mut test = SystemParaToParaTest::new(test_args);
|
||||
|
||||
let sender_balance_before = test.sender.balance;
|
||||
|
||||
test.set_assertion::<AssetHubPolkadot>(system_para_to_para_assertions);
|
||||
// TODO: Add assertion for Penpal runtime. Right now message is failing with
|
||||
// `UntrustedReserveLocation`
|
||||
test.set_dispatchable::<AssetHubPolkadot>(system_para_to_para_reserve_transfer_assets);
|
||||
test.assert();
|
||||
|
||||
let sender_balance_after = test.sender.balance;
|
||||
|
||||
assert_eq!(sender_balance_before - amount_to_send, sender_balance_after);
|
||||
// TODO: Check receiver balance when Penpal runtime is improved to propery handle reserve
|
||||
// transfers
|
||||
}
|
||||
|
||||
/// Limited Reserve Transfers of a local asset from System Parachain to Parachain should work
|
||||
#[test]
|
||||
fn limited_reserve_transfer_asset_from_system_para_to_para() {
|
||||
// Force create asset from Relay Chain and mint assets for System Parachain's sender account
|
||||
AssetHubPolkadot::force_create_and_mint_asset(
|
||||
ASSET_ID,
|
||||
ASSET_MIN_BALANCE,
|
||||
true,
|
||||
AssetHubPolkadotSender::get(),
|
||||
ASSET_MIN_BALANCE * 1000000,
|
||||
);
|
||||
|
||||
// Init values for System Parachain
|
||||
let destination = AssetHubPolkadot::sibling_location_of(PenpalPolkadotA::para_id());
|
||||
let beneficiary_id = PenpalPolkadotAReceiver::get();
|
||||
let amount_to_send = ASSET_MIN_BALANCE * 1000;
|
||||
let assets =
|
||||
(X2(PalletInstance(ASSETS_PALLET_ID), GeneralIndex(ASSET_ID.into())), amount_to_send)
|
||||
.into();
|
||||
|
||||
let system_para_test_args = TestContext {
|
||||
sender: AssetHubPolkadotSender::get(),
|
||||
receiver: PenpalPolkadotAReceiver::get(),
|
||||
args: system_para_test_args(destination, beneficiary_id, amount_to_send, assets, None),
|
||||
};
|
||||
|
||||
let mut system_para_test = SystemParaToParaTest::new(system_para_test_args);
|
||||
|
||||
system_para_test.set_assertion::<AssetHubPolkadot>(system_para_to_para_assets_assertions);
|
||||
// TODO: Add assertions when Penpal is able to manage assets
|
||||
system_para_test
|
||||
.set_dispatchable::<AssetHubPolkadot>(system_para_to_para_limited_reserve_transfer_assets);
|
||||
system_para_test.assert();
|
||||
}
|
||||
|
||||
/// Reserve Transfers of a local asset from System Parachain to Parachain should work
|
||||
#[test]
|
||||
fn reserve_transfer_asset_from_system_para_to_para() {
|
||||
// Force create asset from Relay Chain and mint assets for System Parachain's sender account
|
||||
AssetHubPolkadot::force_create_and_mint_asset(
|
||||
ASSET_ID,
|
||||
ASSET_MIN_BALANCE,
|
||||
true,
|
||||
AssetHubPolkadotSender::get(),
|
||||
ASSET_MIN_BALANCE * 1000000,
|
||||
);
|
||||
|
||||
// Init values for System Parachain
|
||||
let destination = AssetHubPolkadot::sibling_location_of(PenpalPolkadotA::para_id());
|
||||
let beneficiary_id = PenpalPolkadotAReceiver::get();
|
||||
let amount_to_send = ASSET_MIN_BALANCE * 1000;
|
||||
let assets =
|
||||
(X2(PalletInstance(ASSETS_PALLET_ID), GeneralIndex(ASSET_ID.into())), amount_to_send)
|
||||
.into();
|
||||
|
||||
let system_para_test_args = TestContext {
|
||||
sender: AssetHubPolkadotSender::get(),
|
||||
receiver: PenpalPolkadotAReceiver::get(),
|
||||
args: system_para_test_args(destination, beneficiary_id, amount_to_send, assets, None),
|
||||
};
|
||||
|
||||
let mut system_para_test = SystemParaToParaTest::new(system_para_test_args);
|
||||
|
||||
system_para_test.set_assertion::<AssetHubPolkadot>(system_para_to_para_assets_assertions);
|
||||
// TODO: Add assertions when Penpal is able to manage assets
|
||||
system_para_test
|
||||
.set_dispatchable::<AssetHubPolkadot>(system_para_to_para_reserve_transfer_assets);
|
||||
system_para_test.assert();
|
||||
}
|
||||
-201
@@ -1,201 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
use crate::*;
|
||||
|
||||
/// Relay Chain should be able to execute `Transact` instructions in System Parachain
|
||||
/// when `OriginKind::Superuser` and signer is `sudo`
|
||||
#[test]
|
||||
fn send_transact_sudo_from_relay_to_system_para_works() {
|
||||
// Init tests variables
|
||||
let root_origin = <Polkadot as Chain>::RuntimeOrigin::root();
|
||||
let system_para_destination = Polkadot::child_location_of(AssetHubPolkadot::para_id()).into();
|
||||
let asset_owner: AccountId = AssetHubPolkadotSender::get().into();
|
||||
let xcm = AssetHubPolkadot::force_create_asset_xcm(
|
||||
OriginKind::Superuser,
|
||||
ASSET_ID,
|
||||
asset_owner.clone(),
|
||||
true,
|
||||
1000,
|
||||
);
|
||||
// Send XCM message from Relay Chain
|
||||
Polkadot::execute_with(|| {
|
||||
assert_ok!(<Polkadot as PolkadotPallet>::XcmPallet::send(
|
||||
root_origin,
|
||||
bx!(system_para_destination),
|
||||
bx!(xcm),
|
||||
));
|
||||
|
||||
Polkadot::assert_xcm_pallet_sent();
|
||||
});
|
||||
|
||||
// Receive XCM message in Assets Parachain
|
||||
AssetHubPolkadot::execute_with(|| {
|
||||
type RuntimeEvent = <AssetHubPolkadot as Chain>::RuntimeEvent;
|
||||
|
||||
AssetHubPolkadot::assert_dmp_queue_complete(Some(Weight::from_parts(
|
||||
1_019_445_000,
|
||||
200_000,
|
||||
)));
|
||||
|
||||
assert_expected_events!(
|
||||
AssetHubPolkadot,
|
||||
vec![
|
||||
RuntimeEvent::Assets(pallet_assets::Event::ForceCreated { asset_id, owner }) => {
|
||||
asset_id: *asset_id == ASSET_ID,
|
||||
owner: *owner == asset_owner,
|
||||
},
|
||||
]
|
||||
);
|
||||
|
||||
assert!(<AssetHubPolkadot as AssetHubPolkadotPallet>::Assets::asset_exists(ASSET_ID));
|
||||
});
|
||||
}
|
||||
|
||||
/// Relay Chain shouldn't be able to execute `Transact` instructions in System Parachain
|
||||
/// when `OriginKind::Native`
|
||||
#[test]
|
||||
fn send_transact_native_from_relay_to_system_para_fails() {
|
||||
// Init tests variables
|
||||
let signed_origin = <Polkadot as Chain>::RuntimeOrigin::signed(PolkadotSender::get().into());
|
||||
let system_para_destination = Polkadot::child_location_of(AssetHubPolkadot::para_id()).into();
|
||||
let asset_owner = AssetHubPolkadotSender::get().into();
|
||||
let xcm = AssetHubPolkadot::force_create_asset_xcm(
|
||||
OriginKind::Native,
|
||||
ASSET_ID,
|
||||
asset_owner,
|
||||
true,
|
||||
1000,
|
||||
);
|
||||
|
||||
// Send XCM message from Relay Chain
|
||||
Polkadot::execute_with(|| {
|
||||
assert_err!(
|
||||
<Polkadot as PolkadotPallet>::XcmPallet::send(
|
||||
signed_origin,
|
||||
bx!(system_para_destination),
|
||||
bx!(xcm)
|
||||
),
|
||||
DispatchError::BadOrigin
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
/// System Parachain shouldn't be able to execute `Transact` instructions in Relay Chain
|
||||
/// when `OriginKind::Native`
|
||||
#[test]
|
||||
fn send_transact_native_from_system_para_to_relay_fails() {
|
||||
// Init tests variables
|
||||
let signed_origin =
|
||||
<AssetHubPolkadot as Chain>::RuntimeOrigin::signed(AssetHubPolkadotSender::get().into());
|
||||
let relay_destination = AssetHubPolkadot::parent_location().into();
|
||||
let call = <Polkadot as Chain>::RuntimeCall::System(frame_system::Call::<
|
||||
<Polkadot as Chain>::Runtime,
|
||||
>::remark_with_event {
|
||||
remark: vec![0, 1, 2, 3],
|
||||
})
|
||||
.encode()
|
||||
.into();
|
||||
let origin_kind = OriginKind::Native;
|
||||
|
||||
let xcm = xcm_transact_unpaid_execution(call, origin_kind);
|
||||
|
||||
// Send XCM message from Relay Chain
|
||||
AssetHubPolkadot::execute_with(|| {
|
||||
assert_err!(
|
||||
<AssetHubPolkadot as AssetHubPolkadotPallet>::PolkadotXcm::send(
|
||||
signed_origin,
|
||||
bx!(relay_destination),
|
||||
bx!(xcm)
|
||||
),
|
||||
DispatchError::BadOrigin
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
/// Parachain should be able to send XCM paying its fee with sufficient asset
|
||||
/// in the System Parachain
|
||||
#[test]
|
||||
fn send_xcm_from_para_to_system_para_paying_fee_with_assets_works() {
|
||||
let para_sovereign_account = AssetHubPolkadot::sovereign_account_id_of(
|
||||
AssetHubPolkadot::sibling_location_of(PenpalPolkadotA::para_id()),
|
||||
);
|
||||
|
||||
// Force create and mint assets for Parachain's sovereign account
|
||||
AssetHubPolkadot::force_create_and_mint_asset(
|
||||
ASSET_ID,
|
||||
ASSET_MIN_BALANCE,
|
||||
true,
|
||||
para_sovereign_account.clone(),
|
||||
ASSET_MIN_BALANCE * 1000000000,
|
||||
);
|
||||
|
||||
// We just need a call that can pass the `SafeCallFilter`
|
||||
// Call values are not relevant
|
||||
let call = AssetHubPolkadot::force_create_asset_call(
|
||||
ASSET_ID,
|
||||
para_sovereign_account.clone(),
|
||||
true,
|
||||
ASSET_MIN_BALANCE,
|
||||
);
|
||||
|
||||
let origin_kind = OriginKind::SovereignAccount;
|
||||
let fee_amount = ASSET_MIN_BALANCE * 1000000;
|
||||
let native_asset =
|
||||
(X2(PalletInstance(ASSETS_PALLET_ID), GeneralIndex(ASSET_ID.into())), fee_amount).into();
|
||||
|
||||
let root_origin = <PenpalPolkadotA as Chain>::RuntimeOrigin::root();
|
||||
let system_para_destination =
|
||||
PenpalPolkadotA::sibling_location_of(AssetHubPolkadot::para_id()).into();
|
||||
let xcm = xcm_transact_paid_execution(
|
||||
call,
|
||||
origin_kind,
|
||||
native_asset,
|
||||
para_sovereign_account.clone(),
|
||||
);
|
||||
|
||||
PenpalPolkadotA::execute_with(|| {
|
||||
assert_ok!(<PenpalPolkadotA as PenpalPolkadotAPallet>::PolkadotXcm::send(
|
||||
root_origin,
|
||||
bx!(system_para_destination),
|
||||
bx!(xcm),
|
||||
));
|
||||
|
||||
PenpalPolkadotA::assert_xcm_pallet_sent();
|
||||
});
|
||||
|
||||
AssetHubPolkadot::execute_with(|| {
|
||||
type RuntimeEvent = <AssetHubPolkadot as Chain>::RuntimeEvent;
|
||||
|
||||
AssetHubPolkadot::assert_xcmp_queue_success(Some(Weight::from_parts(
|
||||
2_176_414_000,
|
||||
203_593,
|
||||
)));
|
||||
|
||||
assert_expected_events!(
|
||||
AssetHubPolkadot,
|
||||
vec![
|
||||
RuntimeEvent::Assets(pallet_assets::Event::Burned { asset_id, owner, balance }) => {
|
||||
asset_id: *asset_id == ASSET_ID,
|
||||
owner: *owner == para_sovereign_account,
|
||||
balance: *balance == fee_amount,
|
||||
},
|
||||
RuntimeEvent::Assets(pallet_assets::Event::Issued { asset_id, .. }) => {
|
||||
asset_id: *asset_id == ASSET_ID,
|
||||
},
|
||||
]
|
||||
);
|
||||
});
|
||||
}
|
||||
-96
@@ -1,96 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
use crate::*;
|
||||
|
||||
#[test]
|
||||
fn relay_sets_system_para_xcm_supported_version() {
|
||||
// Init tests variables
|
||||
let sudo_origin = <Polkadot as Chain>::RuntimeOrigin::root();
|
||||
let system_para_destination: MultiLocation =
|
||||
Polkadot::child_location_of(AssetHubPolkadot::para_id());
|
||||
|
||||
// Relay Chain sets supported version for Asset Parachain
|
||||
Polkadot::execute_with(|| {
|
||||
assert_ok!(<Polkadot as PolkadotPallet>::XcmPallet::force_xcm_version(
|
||||
sudo_origin,
|
||||
bx!(system_para_destination),
|
||||
XCM_V3
|
||||
));
|
||||
|
||||
type RuntimeEvent = <Polkadot as Chain>::RuntimeEvent;
|
||||
|
||||
assert_expected_events!(
|
||||
Polkadot,
|
||||
vec![
|
||||
RuntimeEvent::XcmPallet(pallet_xcm::Event::SupportedVersionChanged {
|
||||
location,
|
||||
version: XCM_V3
|
||||
}) => { location: *location == system_para_destination, },
|
||||
]
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn system_para_sets_relay_xcm_supported_version() {
|
||||
// Init test variables
|
||||
let sudo_origin = <Polkadot as Chain>::RuntimeOrigin::root();
|
||||
let parent_location = AssetHubPolkadot::parent_location();
|
||||
let system_para_destination: VersionedMultiLocation =
|
||||
Polkadot::child_location_of(AssetHubPolkadot::para_id()).into();
|
||||
let call = <AssetHubPolkadot as Chain>::RuntimeCall::PolkadotXcm(pallet_xcm::Call::<
|
||||
<AssetHubPolkadot as Chain>::Runtime,
|
||||
>::force_xcm_version {
|
||||
location: bx!(parent_location),
|
||||
version: XCM_V3,
|
||||
})
|
||||
.encode()
|
||||
.into();
|
||||
let origin_kind = OriginKind::Superuser;
|
||||
|
||||
let xcm = xcm_transact_unpaid_execution(call, origin_kind);
|
||||
|
||||
// System Parachain sets supported version for Relay Chain throught it
|
||||
Polkadot::execute_with(|| {
|
||||
assert_ok!(<Polkadot as PolkadotPallet>::XcmPallet::send(
|
||||
sudo_origin,
|
||||
bx!(system_para_destination),
|
||||
bx!(xcm),
|
||||
));
|
||||
|
||||
Polkadot::assert_xcm_pallet_sent();
|
||||
});
|
||||
|
||||
// System Parachain receive the XCM message
|
||||
AssetHubPolkadot::execute_with(|| {
|
||||
type RuntimeEvent = <AssetHubPolkadot as Chain>::RuntimeEvent;
|
||||
|
||||
AssetHubPolkadot::assert_dmp_queue_complete(Some(Weight::from_parts(
|
||||
1_019_210_000,
|
||||
200_000,
|
||||
)));
|
||||
|
||||
assert_expected_events!(
|
||||
AssetHubPolkadot,
|
||||
vec![
|
||||
RuntimeEvent::PolkadotXcm(pallet_xcm::Event::SupportedVersionChanged {
|
||||
location,
|
||||
version: XCM_V3
|
||||
}) => { location: *location == parent_location, },
|
||||
]
|
||||
);
|
||||
});
|
||||
}
|
||||
-363
@@ -1,363 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#![allow(dead_code)] // <https://github.com/paritytech/cumulus/issues/3027>
|
||||
|
||||
use crate::*;
|
||||
|
||||
fn relay_origin_assertions(t: RelayToSystemParaTest) {
|
||||
type RuntimeEvent = <Polkadot as Chain>::RuntimeEvent;
|
||||
|
||||
Polkadot::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts(632_207_000, 7_186)));
|
||||
|
||||
assert_expected_events!(
|
||||
Polkadot,
|
||||
vec![
|
||||
// Amount to teleport is withdrawn from Sender
|
||||
RuntimeEvent::Balances(pallet_balances::Event::Withdraw { who, amount }) => {
|
||||
who: *who == t.sender.account_id,
|
||||
amount: *amount == t.args.amount,
|
||||
},
|
||||
// Amount to teleport is deposited in Relay's `CheckAccount`
|
||||
RuntimeEvent::Balances(pallet_balances::Event::Deposit { who, amount }) => {
|
||||
who: *who == <Polkadot as PolkadotPallet>::XcmPallet::check_account(),
|
||||
amount: *amount == t.args.amount,
|
||||
},
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
fn relay_dest_assertions(t: SystemParaToRelayTest) {
|
||||
type RuntimeEvent = <Polkadot as Chain>::RuntimeEvent;
|
||||
|
||||
Polkadot::assert_ump_queue_processed(
|
||||
true,
|
||||
Some(AssetHubPolkadot::para_id()),
|
||||
Some(Weight::from_parts(368_931_000, 7_186)),
|
||||
);
|
||||
|
||||
assert_expected_events!(
|
||||
Polkadot,
|
||||
vec![
|
||||
// Amount is witdrawn from Relay Chain's `CheckAccount`
|
||||
RuntimeEvent::Balances(pallet_balances::Event::Withdraw { who, amount }) => {
|
||||
who: *who == <Polkadot as PolkadotPallet>::XcmPallet::check_account(),
|
||||
amount: *amount == t.args.amount,
|
||||
},
|
||||
// Amount minus fees are deposited in Receiver's account
|
||||
RuntimeEvent::Balances(pallet_balances::Event::Deposit { who, .. }) => {
|
||||
who: *who == t.receiver.account_id,
|
||||
},
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
fn relay_dest_assertions_fail(_t: SystemParaToRelayTest) {
|
||||
Polkadot::assert_ump_queue_processed(
|
||||
false,
|
||||
Some(AssetHubPolkadot::para_id()),
|
||||
Some(Weight::from_parts(232_982_000, 3_593)),
|
||||
);
|
||||
}
|
||||
|
||||
fn para_origin_assertions(t: SystemParaToRelayTest) {
|
||||
type RuntimeEvent = <AssetHubPolkadot as Chain>::RuntimeEvent;
|
||||
|
||||
AssetHubPolkadot::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts(
|
||||
632_207_000,
|
||||
7_186,
|
||||
)));
|
||||
|
||||
AssetHubPolkadot::assert_parachain_system_ump_sent();
|
||||
|
||||
assert_expected_events!(
|
||||
AssetHubPolkadot,
|
||||
vec![
|
||||
// Amount is withdrawn from Sender's account
|
||||
RuntimeEvent::Balances(pallet_balances::Event::Withdraw { who, amount }) => {
|
||||
who: *who == t.sender.account_id,
|
||||
amount: *amount == t.args.amount,
|
||||
},
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
fn para_dest_assertions(t: RelayToSystemParaTest) {
|
||||
type RuntimeEvent = <AssetHubPolkadot as Chain>::RuntimeEvent;
|
||||
|
||||
AssetHubPolkadot::assert_dmp_queue_complete(Some(Weight::from_parts(161_196_000, 0)));
|
||||
|
||||
assert_expected_events!(
|
||||
AssetHubPolkadot,
|
||||
vec![
|
||||
// Amount minus fees are deposited in Receiver's account
|
||||
RuntimeEvent::Balances(pallet_balances::Event::Deposit { who, .. }) => {
|
||||
who: *who == t.receiver.account_id,
|
||||
},
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
fn relay_limited_teleport_assets(t: RelayToSystemParaTest) -> DispatchResult {
|
||||
<Polkadot as PolkadotPallet>::XcmPallet::limited_teleport_assets(
|
||||
t.signed_origin,
|
||||
bx!(t.args.dest.into()),
|
||||
bx!(t.args.beneficiary.into()),
|
||||
bx!(t.args.assets.into()),
|
||||
t.args.fee_asset_item,
|
||||
t.args.weight_limit,
|
||||
)
|
||||
}
|
||||
|
||||
fn relay_teleport_assets(t: RelayToSystemParaTest) -> DispatchResult {
|
||||
<Polkadot as PolkadotPallet>::XcmPallet::teleport_assets(
|
||||
t.signed_origin,
|
||||
bx!(t.args.dest.into()),
|
||||
bx!(t.args.beneficiary.into()),
|
||||
bx!(t.args.assets.into()),
|
||||
t.args.fee_asset_item,
|
||||
)
|
||||
}
|
||||
|
||||
fn system_para_limited_teleport_assets(t: SystemParaToRelayTest) -> DispatchResult {
|
||||
<AssetHubPolkadot as AssetHubPolkadotPallet>::PolkadotXcm::limited_teleport_assets(
|
||||
t.signed_origin,
|
||||
bx!(t.args.dest.into()),
|
||||
bx!(t.args.beneficiary.into()),
|
||||
bx!(t.args.assets.into()),
|
||||
t.args.fee_asset_item,
|
||||
t.args.weight_limit,
|
||||
)
|
||||
}
|
||||
|
||||
// TODO: Uncomment when https://github.com/paritytech/polkadot/pull/7424 is merged
|
||||
// fn system_para_teleport_assets(t: SystemParaToRelayTest) -> DispatchResult {
|
||||
// <AssetHubPolkadot as AssetHubPolkadotPallet>::PolkadotXcm::teleport_assets(
|
||||
// t.signed_origin,
|
||||
// bx!(t.args.dest),
|
||||
// bx!(t.args.beneficiary),
|
||||
// bx!(t.args.assets),
|
||||
// t.args.fee_asset_item,
|
||||
// )
|
||||
// }
|
||||
|
||||
/// Limited Teleport of native asset from Relay Chain to the System Parachain should work
|
||||
#[test]
|
||||
fn limited_teleport_native_assets_from_relay_to_system_para_works() {
|
||||
// Init values for Relay Chain
|
||||
let amount_to_send: Balance = POLKADOT_ED * 1000;
|
||||
let test_args = TestContext {
|
||||
sender: PolkadotSender::get(),
|
||||
receiver: AssetHubPolkadotReceiver::get(),
|
||||
args: relay_test_args(amount_to_send),
|
||||
};
|
||||
|
||||
let mut test = RelayToSystemParaTest::new(test_args);
|
||||
|
||||
let sender_balance_before = test.sender.balance;
|
||||
let receiver_balance_before = test.receiver.balance;
|
||||
|
||||
test.set_assertion::<Polkadot>(relay_origin_assertions);
|
||||
test.set_assertion::<AssetHubPolkadot>(para_dest_assertions);
|
||||
test.set_dispatchable::<Polkadot>(relay_limited_teleport_assets);
|
||||
test.assert();
|
||||
|
||||
let sender_balance_after = test.sender.balance;
|
||||
let receiver_balance_after = test.receiver.balance;
|
||||
|
||||
// Sender's balance is reduced
|
||||
assert_eq!(sender_balance_before - amount_to_send, sender_balance_after);
|
||||
// Receiver's balance is increased
|
||||
assert!(receiver_balance_after > receiver_balance_before);
|
||||
}
|
||||
|
||||
/// Limited Teleport of native asset from System Parachain to Relay Chain
|
||||
/// should work when there is enough balance in Relay Chain's `CheckAccount`
|
||||
#[test]
|
||||
fn limited_teleport_native_assets_back_from_system_para_to_relay_works() {
|
||||
// Dependency - Relay Chain's `CheckAccount` should have enough balance
|
||||
limited_teleport_native_assets_from_relay_to_system_para_works();
|
||||
|
||||
// Init values for Relay Chain
|
||||
let amount_to_send: Balance = ASSET_HUB_POLKADOT_ED * 1000;
|
||||
let destination = AssetHubPolkadot::parent_location();
|
||||
let beneficiary_id = PolkadotReceiver::get();
|
||||
let assets = (Parent, amount_to_send).into();
|
||||
|
||||
let test_args = TestContext {
|
||||
sender: AssetHubPolkadotSender::get(),
|
||||
receiver: PolkadotReceiver::get(),
|
||||
args: system_para_test_args(destination, beneficiary_id, amount_to_send, assets, None),
|
||||
};
|
||||
|
||||
let mut test = SystemParaToRelayTest::new(test_args);
|
||||
|
||||
let sender_balance_before = test.sender.balance;
|
||||
let receiver_balance_before = test.receiver.balance;
|
||||
|
||||
test.set_assertion::<AssetHubPolkadot>(para_origin_assertions);
|
||||
test.set_assertion::<Polkadot>(relay_dest_assertions);
|
||||
test.set_dispatchable::<AssetHubPolkadot>(system_para_limited_teleport_assets);
|
||||
test.assert();
|
||||
|
||||
let sender_balance_after = test.sender.balance;
|
||||
let receiver_balance_after = test.receiver.balance;
|
||||
|
||||
// Sender's balance is reduced
|
||||
assert_eq!(sender_balance_before - amount_to_send, sender_balance_after);
|
||||
// Receiver's balance is increased
|
||||
assert!(receiver_balance_after > receiver_balance_before);
|
||||
}
|
||||
|
||||
/// Limited Teleport of native asset from System Parachain to Relay Chain
|
||||
/// should't work when there is not enough balance in Relay Chain's `CheckAccount`
|
||||
#[test]
|
||||
fn limited_teleport_native_assets_from_system_para_to_relay_fails() {
|
||||
// Init values for Relay Chain
|
||||
let amount_to_send: Balance = ASSET_HUB_POLKADOT_ED * 1000;
|
||||
let destination = AssetHubPolkadot::parent_location().into();
|
||||
let beneficiary_id = PolkadotReceiver::get().into();
|
||||
let assets = (Parent, amount_to_send).into();
|
||||
|
||||
let test_args = TestContext {
|
||||
sender: AssetHubPolkadotSender::get(),
|
||||
receiver: PolkadotReceiver::get(),
|
||||
args: system_para_test_args(destination, beneficiary_id, amount_to_send, assets, None),
|
||||
};
|
||||
|
||||
let mut test = SystemParaToRelayTest::new(test_args);
|
||||
|
||||
let sender_balance_before = test.sender.balance;
|
||||
let receiver_balance_before = test.receiver.balance;
|
||||
|
||||
test.set_assertion::<AssetHubPolkadot>(para_origin_assertions);
|
||||
test.set_assertion::<Polkadot>(relay_dest_assertions_fail);
|
||||
test.set_dispatchable::<AssetHubPolkadot>(system_para_limited_teleport_assets);
|
||||
test.assert();
|
||||
|
||||
let sender_balance_after = test.sender.balance;
|
||||
let receiver_balance_after = test.receiver.balance;
|
||||
|
||||
// Sender's balance is reduced
|
||||
assert_eq!(sender_balance_before - amount_to_send, sender_balance_after);
|
||||
// Receiver's balance does not change
|
||||
assert_eq!(receiver_balance_after, receiver_balance_before);
|
||||
}
|
||||
|
||||
/// Teleport of native asset from Relay Chain to the System Parachain should work
|
||||
#[test]
|
||||
fn teleport_native_assets_from_relay_to_system_para_works() {
|
||||
// Init values for Relay Chain
|
||||
let amount_to_send: Balance = POLKADOT_ED * 1000;
|
||||
let test_args = TestContext {
|
||||
sender: PolkadotSender::get(),
|
||||
receiver: AssetHubPolkadotReceiver::get(),
|
||||
args: relay_test_args(amount_to_send),
|
||||
};
|
||||
|
||||
let mut test = RelayToSystemParaTest::new(test_args);
|
||||
|
||||
let sender_balance_before = test.sender.balance;
|
||||
let receiver_balance_before = test.receiver.balance;
|
||||
|
||||
test.set_assertion::<Polkadot>(relay_origin_assertions);
|
||||
test.set_assertion::<AssetHubPolkadot>(para_dest_assertions);
|
||||
test.set_dispatchable::<Polkadot>(relay_teleport_assets);
|
||||
test.assert();
|
||||
|
||||
let sender_balance_after = test.sender.balance;
|
||||
let receiver_balance_after = test.receiver.balance;
|
||||
|
||||
// Sender's balance is reduced
|
||||
assert_eq!(sender_balance_before - amount_to_send, sender_balance_after);
|
||||
// Receiver's balance is increased
|
||||
assert!(receiver_balance_after > receiver_balance_before);
|
||||
}
|
||||
|
||||
// TODO: Uncomment when https://github.com/paritytech/polkadot/pull/7424 is merged
|
||||
|
||||
// Right now it is failing in the Relay Chain with a
|
||||
// `messageQueue.ProcessingFailed` event `error: Unsupported`.
|
||||
// The reason is the `Weigher` in `pallet_xcm` is not properly calculating the `remote_weight`
|
||||
// and it cause an `Overweight` error in `AllowTopLevelPaidExecutionFrom` barrier
|
||||
|
||||
// /// Teleport of native asset from System Parachains to the Relay Chain
|
||||
// /// should work when there is enough balance in Relay Chain's `CheckAccount`
|
||||
// #[test]
|
||||
// fn teleport_native_assets_back_from_system_para_to_relay_works() {
|
||||
// // Dependency - Relay Chain's `CheckAccount` should have enough balance
|
||||
// teleport_native_assets_from_relay_to_system_para_works();
|
||||
|
||||
// // Init values for Relay Chain
|
||||
// let amount_to_send: Balance = ASSET_HUB_POLKADOT_ED * 1000;
|
||||
// let test_args = TestContext {
|
||||
// sender: AssetHubPolkadotSender::get(),
|
||||
// receiver: PolkadotReceiver::get(),
|
||||
// args: get_para_dispatch_args(amount_to_send),
|
||||
// };
|
||||
|
||||
// let mut test = SystemParaToRelayTest::new(test_args);
|
||||
|
||||
// let sender_balance_before = test.sender.balance;
|
||||
// let receiver_balance_before = test.receiver.balance;
|
||||
|
||||
// test.set_assertion::<AssetHubPolkadot>(para_origin_assertions);
|
||||
// test.set_assertion::<Polkadot>(relay_dest_assertions);
|
||||
// test.set_dispatchable::<AssetHubPolkadot>(system_para_teleport_assets);
|
||||
// test.assert();
|
||||
|
||||
// let sender_balance_after = test.sender.balance;
|
||||
// let receiver_balance_after = test.receiver.balance;
|
||||
|
||||
// // Sender's balance is reduced
|
||||
// assert_eq!(sender_balance_before - amount_to_send, sender_balance_after);
|
||||
// // Receiver's balance is increased
|
||||
// assert!(receiver_balance_after > receiver_balance_before);
|
||||
// }
|
||||
|
||||
// /// Teleport of native asset from System Parachain to Relay Chain
|
||||
// /// shouldn't work when there is not enough balance in Relay Chain's `CheckAccount`
|
||||
// #[test]
|
||||
// fn teleport_native_assets_from_system_para_to_relay_fails() {
|
||||
// // Init values for Relay Chain
|
||||
// let amount_to_send: Balance = ASSET_HUB_POLKADOT_ED * 1000;
|
||||
// let assets = (Parent, amount_to_send).into();
|
||||
//
|
||||
// let test_args = TestContext {
|
||||
// sender: AssetHubPolkadotSender::get(),
|
||||
// receiver: PolkadotReceiver::get(),
|
||||
// args: system_para_test_args(amount_to_send),
|
||||
// assets,
|
||||
// None
|
||||
// };
|
||||
|
||||
// let mut test = SystemParaToRelayTest::new(test_args);
|
||||
|
||||
// let sender_balance_before = test.sender.balance;
|
||||
// let receiver_balance_before = test.receiver.balance;
|
||||
|
||||
// test.set_assertion::<AssetHubPolkadot>(para_origin_assertions);
|
||||
// test.set_assertion::<Polkadot>(relay_dest_assertions);
|
||||
// test.set_dispatchable::<AssetHubPolkadot>(system_para_teleport_assets);
|
||||
// test.assert();
|
||||
|
||||
// let sender_balance_after = test.sender.balance;
|
||||
// let receiver_balance_after = test.receiver.balance;
|
||||
|
||||
// // Sender's balance is reduced
|
||||
// assert_eq!(sender_balance_before - amount_to_send, sender_balance_after);
|
||||
// // Receiver's balance does not change
|
||||
// assert_eq!(receiver_balance_after, receiver_balance_before);
|
||||
// }
|
||||
@@ -23,7 +23,6 @@ pallet-asset-conversion = { path = "../../../../../../substrate/frame/asset-conv
|
||||
polkadot-core-primitives = { path = "../../../../../../polkadot/core-primitives", default-features = false}
|
||||
polkadot-parachain-primitives = { path = "../../../../../../polkadot/parachain", default-features = false}
|
||||
polkadot-runtime-parachains = { path = "../../../../../../polkadot/runtime/parachains" }
|
||||
polkadot-runtime = { path = "../../../../../../polkadot/runtime/polkadot" }
|
||||
xcm = { package = "staging-xcm", path = "../../../../../../polkadot/xcm", default-features = false}
|
||||
pallet-xcm = { path = "../../../../../../polkadot/xcm/pallet-xcm", default-features = false}
|
||||
|
||||
@@ -48,6 +47,5 @@ runtime-benchmarks = [
|
||||
"parachains-common/runtime-benchmarks",
|
||||
"polkadot-parachain-primitives/runtime-benchmarks",
|
||||
"polkadot-runtime-parachains/runtime-benchmarks",
|
||||
"polkadot-runtime/runtime-benchmarks",
|
||||
"sp-runtime/runtime-benchmarks",
|
||||
]
|
||||
|
||||
@@ -17,7 +17,6 @@ frame-support = { path = "../../../../../../substrate/frame/support", default-fe
|
||||
polkadot-core-primitives = { path = "../../../../../../polkadot/core-primitives", default-features = false}
|
||||
polkadot-parachain-primitives = { path = "../../../../../../polkadot/parachain", default-features = false}
|
||||
polkadot-runtime-parachains = { path = "../../../../../../polkadot/runtime/parachains" }
|
||||
polkadot-runtime = { path = "../../../../../../polkadot/runtime/polkadot" }
|
||||
xcm = { package = "staging-xcm", path = "../../../../../../polkadot/xcm", default-features = false}
|
||||
pallet-xcm = { path = "../../../../../../polkadot/xcm/pallet-xcm", default-features = false}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ pub use bp_messages::LaneId;
|
||||
pub use frame_support::assert_ok;
|
||||
pub use integration_tests_common::{
|
||||
constants::{
|
||||
asset_hub_kusama::ED as ASSET_HUB_ROCOCO_ED, kusama::ED as ROCOCO_ED, PROOF_SIZE_THRESHOLD,
|
||||
asset_hub_rococo::ED as ASSET_HUB_ROCOCO_ED, rococo::ED as ROCOCO_ED, PROOF_SIZE_THRESHOLD,
|
||||
REF_TIME_THRESHOLD, XCM_V3,
|
||||
},
|
||||
xcm_helpers::{xcm_transact_paid_execution, xcm_transact_unpaid_execution},
|
||||
|
||||
-38
@@ -1,38 +0,0 @@
|
||||
[package]
|
||||
name = "collectives-polkadot-integration-tests"
|
||||
version = "0.1.0"
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
||||
license = "Apache-2.0"
|
||||
description = "Polkadot Collectives parachain runtime integration tests based on xcm-emulator"
|
||||
publish = false
|
||||
|
||||
[dependencies]
|
||||
codec = { package = "parity-scale-codec", version = "3.4.0", default-features = false }
|
||||
|
||||
# Substrate
|
||||
sp-runtime = { path = "../../../../../../substrate/primitives/runtime", default-features = false}
|
||||
frame-support = { path = "../../../../../../substrate/frame/support", default-features = false}
|
||||
sp-core = { path = "../../../../../../substrate/primitives/core", default-features = false}
|
||||
pallet-assets = { path = "../../../../../../substrate/frame/assets", default-features = false}
|
||||
pallet-balances = { path = "../../../../../../substrate/frame/balances", default-features = false}
|
||||
pallet-core-fellowship = { path = "../../../../../../substrate/frame/core-fellowship", default-features = false}
|
||||
pallet-salary = { path = "../../../../../../substrate/frame/salary", default-features = false}
|
||||
|
||||
# Polkadot
|
||||
polkadot-core-primitives = { path = "../../../../../../polkadot/core-primitives", default-features = false}
|
||||
polkadot-parachain-primitives = { path = "../../../../../../polkadot/parachain", default-features = false}
|
||||
polkadot-runtime-parachains = { path = "../../../../../../polkadot/runtime/parachains" }
|
||||
polkadot-runtime = { path = "../../../../../../polkadot/runtime/polkadot" }
|
||||
xcm = { package = "staging-xcm", path = "../../../../../../polkadot/xcm", default-features = false}
|
||||
pallet-xcm = { path = "../../../../../../polkadot/xcm/pallet-xcm", default-features = false}
|
||||
|
||||
# Cumulus
|
||||
parachains-common = { path = "../../../../common" }
|
||||
cumulus-pallet-xcmp-queue = { path = "../../../../../pallets/xcmp-queue", default-features = false}
|
||||
cumulus-pallet-parachain-system = { path = "../../../../../pallets/parachain-system" }
|
||||
collectives-polkadot-runtime = { path = "../../../../runtimes/collectives/collectives-polkadot" }
|
||||
|
||||
# Local
|
||||
xcm-emulator = { path = "../../../../../xcm/xcm-emulator", default-features = false}
|
||||
integration-tests-common = { path = "../../common", default-features = false}
|
||||
-83
@@ -1,83 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
pub use codec::Encode;
|
||||
pub use frame_support::{assert_ok, sp_runtime::AccountId32};
|
||||
pub use integration_tests_common::{
|
||||
constants::{
|
||||
accounts::ALICE, asset_hub_polkadot::ED as ASSET_HUB_POLKADOT_ED,
|
||||
polkadot::ED as POLKADOT_ED, PROOF_SIZE_THRESHOLD, REF_TIME_THRESHOLD, XCM_V3,
|
||||
},
|
||||
xcm_helpers::{xcm_transact_paid_execution, xcm_transact_unpaid_execution},
|
||||
AssetHubPolkadot, AssetHubPolkadotPallet, AssetHubPolkadotReceiver, Collectives,
|
||||
PenpalPolkadotA, Polkadot,
|
||||
};
|
||||
pub use parachains_common::{AccountId, Balance};
|
||||
pub use xcm::{
|
||||
prelude::{AccountId32 as AccountId32Junction, *},
|
||||
v3::{Error, NetworkId::Polkadot as PolkadotId},
|
||||
};
|
||||
pub use xcm_emulator::{
|
||||
assert_expected_events, bx, helpers::weight_within_threshold, Chain, ParaId, Parachain as Para,
|
||||
RelayChain as Relay, Test, TestArgs, TestContext, TestExt, TestExternalities,
|
||||
};
|
||||
|
||||
pub const ASSET_ID: u32 = 1;
|
||||
pub const ASSET_MIN_BALANCE: u128 = 1000;
|
||||
pub const ASSETS_PALLET_ID: u8 = 50;
|
||||
|
||||
pub type RelayToSystemParaTest = Test<Polkadot, AssetHubPolkadot>;
|
||||
pub type SystemParaToRelayTest = Test<AssetHubPolkadot, Polkadot>;
|
||||
pub type SystemParaToParaTest = Test<AssetHubPolkadot, PenpalPolkadotA>;
|
||||
|
||||
/// Returns a `TestArgs` instance to de used for the Relay Chain accross integraton tests
|
||||
pub fn relay_test_args(amount: Balance) -> TestArgs {
|
||||
TestArgs {
|
||||
dest: Polkadot::child_location_of(AssetHubPolkadot::para_id()),
|
||||
beneficiary: AccountId32Junction {
|
||||
network: None,
|
||||
id: AssetHubPolkadotReceiver::get().into(),
|
||||
}
|
||||
.into(),
|
||||
amount,
|
||||
assets: (Here, amount).into(),
|
||||
asset_id: None,
|
||||
fee_asset_item: 0,
|
||||
weight_limit: WeightLimit::Unlimited,
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns a `TestArgs` instance to de used for the System Parachain accross integraton tests
|
||||
pub fn system_para_test_args(
|
||||
dest: MultiLocation,
|
||||
beneficiary_id: AccountId32,
|
||||
amount: Balance,
|
||||
assets: MultiAssets,
|
||||
asset_id: Option<u32>,
|
||||
) -> TestArgs {
|
||||
TestArgs {
|
||||
dest,
|
||||
beneficiary: AccountId32Junction { network: None, id: beneficiary_id.into() }.into(),
|
||||
amount,
|
||||
assets,
|
||||
asset_id,
|
||||
fee_asset_item: 0,
|
||||
weight_limit: WeightLimit::Unlimited,
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[cfg(not(feature = "runtime-benchmarks"))]
|
||||
mod tests;
|
||||
-65
@@ -1,65 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
//! Integration tests concerning the Ambassador Program.
|
||||
|
||||
use crate::*;
|
||||
use collectives_polkadot_runtime::ambassador::AmbassadorSalaryPaymaster;
|
||||
use frame_support::traits::{fungible::Mutate, tokens::Pay};
|
||||
use sp_core::crypto::Ss58Codec;
|
||||
use xcm_emulator::TestExt;
|
||||
|
||||
#[test]
|
||||
fn pay_salary() {
|
||||
let pay_from: AccountId =
|
||||
<AccountId as Ss58Codec>::from_string("5DS1Gaf6R9eFAV8QyeZP9P89kTkJMurxv3y3J3TTMu8p8VCX")
|
||||
.unwrap();
|
||||
let pay_to = Polkadot::account_id_of(ALICE);
|
||||
let pay_amount = 90000000000;
|
||||
|
||||
AssetHubPolkadot::execute_with(|| {
|
||||
type AssetHubBalances = <AssetHubPolkadot as AssetHubPolkadotPallet>::Balances;
|
||||
|
||||
assert_ok!(<AssetHubBalances as Mutate<_>>::mint_into(&pay_from, pay_amount * 2));
|
||||
});
|
||||
|
||||
Collectives::execute_with(|| {
|
||||
type RuntimeEvent = <Collectives as Chain>::RuntimeEvent;
|
||||
|
||||
assert_ok!(AmbassadorSalaryPaymaster::pay(&pay_to, (), pay_amount));
|
||||
assert_expected_events!(
|
||||
Collectives,
|
||||
vec![
|
||||
RuntimeEvent::XcmpQueue(cumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {},
|
||||
]
|
||||
);
|
||||
});
|
||||
|
||||
AssetHubPolkadot::execute_with(|| {
|
||||
type RuntimeEvent = <AssetHubPolkadot as Chain>::RuntimeEvent;
|
||||
|
||||
assert_expected_events!(
|
||||
AssetHubPolkadot,
|
||||
vec![
|
||||
RuntimeEvent::Balances(pallet_balances::Event::Transfer { from, to, amount }) => {
|
||||
from: from == &pay_from,
|
||||
to: to == &pay_to,
|
||||
amount: amount == &pay_amount,
|
||||
},
|
||||
RuntimeEvent::XcmpQueue(cumulus_pallet_xcmp_queue::Event::Success { .. }) => {},
|
||||
]
|
||||
);
|
||||
});
|
||||
}
|
||||
-75
@@ -1,75 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
//! Integration tests concerning the Fellowship.
|
||||
|
||||
use crate::*;
|
||||
use collectives_polkadot_runtime::fellowship::FellowshipSalaryPaymaster;
|
||||
use frame_support::traits::{
|
||||
fungibles::{Create, Mutate},
|
||||
tokens::Pay,
|
||||
};
|
||||
use sp_core::crypto::Ss58Codec;
|
||||
use xcm_emulator::TestExt;
|
||||
|
||||
#[test]
|
||||
fn pay_salary() {
|
||||
let asset_id: u32 = 1984;
|
||||
let pay_from: AccountId =
|
||||
<AccountId as Ss58Codec>::from_string("13w7NdvSR1Af8xsQTArDtZmVvjE8XhWNdL4yed3iFHrUNCnS")
|
||||
.unwrap();
|
||||
let pay_to = Polkadot::account_id_of(ALICE);
|
||||
let pay_amount = 9000;
|
||||
|
||||
AssetHubPolkadot::execute_with(|| {
|
||||
type AssetHubAssets = <AssetHubPolkadot as AssetHubPolkadotPallet>::Assets;
|
||||
|
||||
assert_ok!(<AssetHubAssets as Create<_>>::create(
|
||||
asset_id,
|
||||
pay_to.clone(),
|
||||
true,
|
||||
pay_amount / 2
|
||||
));
|
||||
assert_ok!(<AssetHubAssets as Mutate<_>>::mint_into(asset_id, &pay_from, pay_amount * 2));
|
||||
});
|
||||
|
||||
Collectives::execute_with(|| {
|
||||
type RuntimeEvent = <Collectives as Chain>::RuntimeEvent;
|
||||
|
||||
assert_ok!(FellowshipSalaryPaymaster::pay(&pay_to, (), pay_amount));
|
||||
assert_expected_events!(
|
||||
Collectives,
|
||||
vec![
|
||||
RuntimeEvent::XcmpQueue(cumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {},
|
||||
]
|
||||
);
|
||||
});
|
||||
|
||||
AssetHubPolkadot::execute_with(|| {
|
||||
type RuntimeEvent = <AssetHubPolkadot as Chain>::RuntimeEvent;
|
||||
assert_expected_events!(
|
||||
AssetHubPolkadot,
|
||||
vec![
|
||||
RuntimeEvent::Assets(pallet_assets::Event::Transferred { asset_id: id, from, to, amount }) =>
|
||||
{ asset_id: id == &asset_id,
|
||||
from: from == &pay_from,
|
||||
to: to == &pay_to,
|
||||
amount: amount == &pay_amount,
|
||||
},
|
||||
RuntimeEvent::XcmpQueue(cumulus_pallet_xcmp_queue::Event::Success { .. }) => {},
|
||||
]
|
||||
);
|
||||
});
|
||||
}
|
||||
-17
@@ -1,17 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
mod ambassador;
|
||||
mod fellowship;
|
||||
@@ -30,10 +30,6 @@ polkadot-parachain-primitives = { path = "../../../../../polkadot/parachain", de
|
||||
polkadot-service = { path = "../../../../../polkadot/node/service", default-features = false, features = ["full-node"] }
|
||||
polkadot-primitives = { path = "../../../../../polkadot/primitives", default-features = false}
|
||||
polkadot-runtime-parachains = { path = "../../../../../polkadot/runtime/parachains" }
|
||||
polkadot-runtime = { path = "../../../../../polkadot/runtime/polkadot" }
|
||||
polkadot-runtime-constants = { path = "../../../../../polkadot/runtime/polkadot/constants" }
|
||||
kusama-runtime = { package = "staging-kusama-runtime", path = "../../../../../polkadot/runtime/kusama" }
|
||||
kusama-runtime-constants = { path = "../../../../../polkadot/runtime/kusama/constants" }
|
||||
rococo-runtime = { path = "../../../../../polkadot/runtime/rococo" }
|
||||
rococo-runtime-constants = { path = "../../../../../polkadot/runtime/rococo/constants" }
|
||||
westend-runtime = { path = "../../../../../polkadot/runtime/westend" }
|
||||
@@ -73,7 +69,6 @@ runtime-benchmarks = [
|
||||
"cumulus-pallet-parachain-system/runtime-benchmarks",
|
||||
"cumulus-pallet-xcmp-queue/runtime-benchmarks",
|
||||
"frame-support/runtime-benchmarks",
|
||||
"kusama-runtime/runtime-benchmarks",
|
||||
"pallet-assets/runtime-benchmarks",
|
||||
"pallet-bridge-messages/runtime-benchmarks",
|
||||
"pallet-im-online/runtime-benchmarks",
|
||||
@@ -85,7 +80,6 @@ runtime-benchmarks = [
|
||||
"polkadot-parachain-primitives/runtime-benchmarks",
|
||||
"polkadot-primitives/runtime-benchmarks",
|
||||
"polkadot-runtime-parachains/runtime-benchmarks",
|
||||
"polkadot-runtime/runtime-benchmarks",
|
||||
"polkadot-service/runtime-benchmarks",
|
||||
"rococo-runtime/runtime-benchmarks",
|
||||
"sp-runtime/runtime-benchmarks",
|
||||
|
||||
@@ -27,12 +27,8 @@ use sp_runtime::{
|
||||
|
||||
// Cumulus
|
||||
use parachains_common::{AccountId, AssetHubPolkadotAuraId, AuraId, Balance, BlockNumber};
|
||||
use polkadot_parachain_primitives::primitives::{HeadData, ValidationCode};
|
||||
use polkadot_primitives::{AssignmentId, ValidatorId};
|
||||
use polkadot_runtime_parachains::{
|
||||
configuration::HostConfiguration,
|
||||
paras::{ParaGenesisArgs, ParaKind},
|
||||
};
|
||||
use polkadot_runtime_parachains::configuration::HostConfiguration;
|
||||
use polkadot_service::chain_spec::get_authority_keys_from_seed_no_beefy;
|
||||
use xcm;
|
||||
|
||||
@@ -138,144 +134,6 @@ pub mod validators {
|
||||
|
||||
/// The default XCM version to set in genesis config.
|
||||
const SAFE_XCM_VERSION: u32 = xcm::prelude::XCM_VERSION;
|
||||
// Polkadot
|
||||
pub mod polkadot {
|
||||
use super::*;
|
||||
pub const ED: Balance = polkadot_runtime_constants::currency::EXISTENTIAL_DEPOSIT;
|
||||
const STASH: u128 = 100 * polkadot_runtime_constants::currency::UNITS;
|
||||
|
||||
pub fn get_host_config() -> HostConfiguration<BlockNumber> {
|
||||
HostConfiguration {
|
||||
max_upward_queue_count: 10,
|
||||
max_upward_queue_size: 51200,
|
||||
max_upward_message_size: 51200,
|
||||
max_upward_message_num_per_candidate: 10,
|
||||
max_downward_message_size: 51200,
|
||||
hrmp_sender_deposit: 100_000_000_000,
|
||||
hrmp_recipient_deposit: 100_000_000_000,
|
||||
hrmp_channel_max_capacity: 1000,
|
||||
hrmp_channel_max_message_size: 102400,
|
||||
hrmp_channel_max_total_size: 102400,
|
||||
hrmp_max_parachain_outbound_channels: 30,
|
||||
hrmp_max_parachain_inbound_channels: 30,
|
||||
..Default::default()
|
||||
}
|
||||
}
|
||||
|
||||
fn session_keys(
|
||||
babe: BabeId,
|
||||
grandpa: GrandpaId,
|
||||
im_online: ImOnlineId,
|
||||
para_validator: ValidatorId,
|
||||
para_assignment: AssignmentId,
|
||||
authority_discovery: AuthorityDiscoveryId,
|
||||
) -> polkadot_runtime::SessionKeys {
|
||||
polkadot_runtime::SessionKeys {
|
||||
babe,
|
||||
grandpa,
|
||||
im_online,
|
||||
para_validator,
|
||||
para_assignment,
|
||||
authority_discovery,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn genesis() -> Storage {
|
||||
let genesis_config = polkadot_runtime::RuntimeGenesisConfig {
|
||||
system: polkadot_runtime::SystemConfig {
|
||||
code: polkadot_runtime::WASM_BINARY.unwrap().to_vec(),
|
||||
..Default::default()
|
||||
},
|
||||
balances: polkadot_runtime::BalancesConfig {
|
||||
balances: accounts::init_balances()
|
||||
.iter()
|
||||
.cloned()
|
||||
.map(|k| (k, ED * 4096))
|
||||
.collect(),
|
||||
},
|
||||
session: polkadot_runtime::SessionConfig {
|
||||
keys: validators::initial_authorities()
|
||||
.iter()
|
||||
.map(|x| {
|
||||
(
|
||||
x.0.clone(),
|
||||
x.0.clone(),
|
||||
polkadot::session_keys(
|
||||
x.2.clone(),
|
||||
x.3.clone(),
|
||||
x.4.clone(),
|
||||
x.5.clone(),
|
||||
x.6.clone(),
|
||||
x.7.clone(),
|
||||
),
|
||||
)
|
||||
})
|
||||
.collect::<Vec<_>>(),
|
||||
},
|
||||
staking: polkadot_runtime::StakingConfig {
|
||||
validator_count: validators::initial_authorities().len() as u32,
|
||||
minimum_validator_count: 1,
|
||||
stakers: validators::initial_authorities()
|
||||
.iter()
|
||||
.map(|x| {
|
||||
(x.0.clone(), x.1.clone(), STASH, polkadot_runtime::StakerStatus::Validator)
|
||||
})
|
||||
.collect(),
|
||||
invulnerables: validators::initial_authorities()
|
||||
.iter()
|
||||
.map(|x| x.0.clone())
|
||||
.collect(),
|
||||
force_era: pallet_staking::Forcing::ForceNone,
|
||||
slash_reward_fraction: Perbill::from_percent(10),
|
||||
..Default::default()
|
||||
},
|
||||
babe: polkadot_runtime::BabeConfig {
|
||||
authorities: Default::default(),
|
||||
epoch_config: Some(polkadot_runtime::BABE_GENESIS_EPOCH_CONFIG),
|
||||
..Default::default()
|
||||
},
|
||||
configuration: polkadot_runtime::ConfigurationConfig { config: get_host_config() },
|
||||
paras: polkadot_runtime::ParasConfig {
|
||||
paras: vec![
|
||||
(
|
||||
asset_hub_polkadot::PARA_ID.into(),
|
||||
ParaGenesisArgs {
|
||||
genesis_head: HeadData::default(),
|
||||
validation_code: ValidationCode(
|
||||
asset_hub_polkadot_runtime::WASM_BINARY.unwrap().to_vec(),
|
||||
),
|
||||
para_kind: ParaKind::Parachain,
|
||||
},
|
||||
),
|
||||
(
|
||||
penpal::PARA_ID_A.into(),
|
||||
ParaGenesisArgs {
|
||||
genesis_head: HeadData::default(),
|
||||
validation_code: ValidationCode(
|
||||
penpal_runtime::WASM_BINARY.unwrap().to_vec(),
|
||||
),
|
||||
para_kind: ParaKind::Parachain,
|
||||
},
|
||||
),
|
||||
(
|
||||
penpal::PARA_ID_B.into(),
|
||||
ParaGenesisArgs {
|
||||
genesis_head: HeadData::default(),
|
||||
validation_code: ValidationCode(
|
||||
penpal_runtime::WASM_BINARY.unwrap().to_vec(),
|
||||
),
|
||||
para_kind: ParaKind::Parachain,
|
||||
},
|
||||
),
|
||||
],
|
||||
..Default::default()
|
||||
},
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
genesis_config.build_storage().unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
// Westend
|
||||
pub mod westend {
|
||||
@@ -386,149 +244,6 @@ pub mod westend {
|
||||
}
|
||||
}
|
||||
|
||||
// Kusama
|
||||
pub mod kusama {
|
||||
use super::*;
|
||||
pub const ED: Balance = kusama_runtime_constants::currency::EXISTENTIAL_DEPOSIT;
|
||||
use kusama_runtime_constants::currency::UNITS as KSM;
|
||||
const ENDOWMENT: u128 = 1_000_000 * KSM;
|
||||
const STASH: u128 = 100 * KSM;
|
||||
|
||||
pub fn get_host_config() -> HostConfiguration<BlockNumber> {
|
||||
HostConfiguration {
|
||||
max_upward_queue_count: 10,
|
||||
max_upward_queue_size: 51200,
|
||||
max_upward_message_size: 51200,
|
||||
max_upward_message_num_per_candidate: 10,
|
||||
max_downward_message_size: 51200,
|
||||
hrmp_sender_deposit: 5_000_000_000_000,
|
||||
hrmp_recipient_deposit: 5_000_000_000_000,
|
||||
hrmp_channel_max_capacity: 1000,
|
||||
hrmp_channel_max_message_size: 102400,
|
||||
hrmp_channel_max_total_size: 102400,
|
||||
hrmp_max_parachain_outbound_channels: 30,
|
||||
hrmp_max_parachain_inbound_channels: 30,
|
||||
..Default::default()
|
||||
}
|
||||
}
|
||||
|
||||
fn session_keys(
|
||||
babe: BabeId,
|
||||
grandpa: GrandpaId,
|
||||
im_online: ImOnlineId,
|
||||
para_validator: ValidatorId,
|
||||
para_assignment: AssignmentId,
|
||||
authority_discovery: AuthorityDiscoveryId,
|
||||
beefy: BeefyId,
|
||||
) -> kusama_runtime::SessionKeys {
|
||||
kusama_runtime::SessionKeys {
|
||||
babe,
|
||||
grandpa,
|
||||
im_online,
|
||||
para_validator,
|
||||
para_assignment,
|
||||
authority_discovery,
|
||||
beefy,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn genesis() -> Storage {
|
||||
let genesis_config = kusama_runtime::RuntimeGenesisConfig {
|
||||
system: kusama_runtime::SystemConfig {
|
||||
code: kusama_runtime::WASM_BINARY.unwrap().to_vec(),
|
||||
..Default::default()
|
||||
},
|
||||
balances: kusama_runtime::BalancesConfig {
|
||||
balances: accounts::init_balances()
|
||||
.iter()
|
||||
.map(|k: &AccountId| (k.clone(), ENDOWMENT))
|
||||
.collect(),
|
||||
},
|
||||
session: kusama_runtime::SessionConfig {
|
||||
keys: validators::initial_authorities()
|
||||
.iter()
|
||||
.map(|x| {
|
||||
(
|
||||
x.0.clone(),
|
||||
x.0.clone(),
|
||||
kusama::session_keys(
|
||||
x.2.clone(),
|
||||
x.3.clone(),
|
||||
x.4.clone(),
|
||||
x.5.clone(),
|
||||
x.6.clone(),
|
||||
x.7.clone(),
|
||||
get_from_seed::<BeefyId>("Alice"),
|
||||
),
|
||||
)
|
||||
})
|
||||
.collect::<Vec<_>>(),
|
||||
},
|
||||
staking: kusama_runtime::StakingConfig {
|
||||
validator_count: validators::initial_authorities().len() as u32,
|
||||
minimum_validator_count: 1,
|
||||
stakers: validators::initial_authorities()
|
||||
.iter()
|
||||
.map(|x| {
|
||||
(x.0.clone(), x.1.clone(), STASH, kusama_runtime::StakerStatus::Validator)
|
||||
})
|
||||
.collect(),
|
||||
invulnerables: validators::initial_authorities()
|
||||
.iter()
|
||||
.map(|x| x.0.clone())
|
||||
.collect(),
|
||||
force_era: pallet_staking::Forcing::NotForcing,
|
||||
slash_reward_fraction: Perbill::from_percent(10),
|
||||
..Default::default()
|
||||
},
|
||||
babe: kusama_runtime::BabeConfig {
|
||||
authorities: Default::default(),
|
||||
epoch_config: Some(kusama_runtime::BABE_GENESIS_EPOCH_CONFIG),
|
||||
..Default::default()
|
||||
},
|
||||
configuration: kusama_runtime::ConfigurationConfig { config: get_host_config() },
|
||||
paras: kusama_runtime::ParasConfig {
|
||||
paras: vec![
|
||||
(
|
||||
asset_hub_kusama::PARA_ID.into(),
|
||||
ParaGenesisArgs {
|
||||
genesis_head: HeadData::default(),
|
||||
validation_code: ValidationCode(
|
||||
asset_hub_kusama_runtime::WASM_BINARY.unwrap().to_vec(),
|
||||
),
|
||||
para_kind: ParaKind::Parachain,
|
||||
},
|
||||
),
|
||||
(
|
||||
penpal::PARA_ID_A.into(),
|
||||
ParaGenesisArgs {
|
||||
genesis_head: HeadData::default(),
|
||||
validation_code: ValidationCode(
|
||||
penpal_runtime::WASM_BINARY.unwrap().to_vec(),
|
||||
),
|
||||
para_kind: ParaKind::Parachain,
|
||||
},
|
||||
),
|
||||
(
|
||||
penpal::PARA_ID_B.into(),
|
||||
ParaGenesisArgs {
|
||||
genesis_head: HeadData::default(),
|
||||
validation_code: ValidationCode(
|
||||
penpal_runtime::WASM_BINARY.unwrap().to_vec(),
|
||||
),
|
||||
para_kind: ParaKind::Parachain,
|
||||
},
|
||||
),
|
||||
],
|
||||
..Default::default()
|
||||
},
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
genesis_config.build_storage().unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
// Rococo
|
||||
pub mod rococo {
|
||||
use super::*;
|
||||
@@ -627,63 +342,6 @@ pub mod rococo {
|
||||
}
|
||||
}
|
||||
|
||||
// Asset Hub Polkadot
|
||||
pub mod asset_hub_polkadot {
|
||||
use super::*;
|
||||
pub const PARA_ID: u32 = 1000;
|
||||
pub const ED: Balance = parachains_common::polkadot::currency::EXISTENTIAL_DEPOSIT;
|
||||
|
||||
pub fn genesis() -> Storage {
|
||||
let genesis_config = asset_hub_polkadot_runtime::RuntimeGenesisConfig {
|
||||
system: asset_hub_polkadot_runtime::SystemConfig {
|
||||
code: asset_hub_polkadot_runtime::WASM_BINARY
|
||||
.expect("WASM binary was not build, please build it!")
|
||||
.to_vec(),
|
||||
..Default::default()
|
||||
},
|
||||
balances: asset_hub_polkadot_runtime::BalancesConfig {
|
||||
balances: accounts::init_balances()
|
||||
.iter()
|
||||
.cloned()
|
||||
.map(|k| (k, ED * 4096))
|
||||
.collect(),
|
||||
},
|
||||
parachain_info: asset_hub_polkadot_runtime::ParachainInfoConfig {
|
||||
parachain_id: PARA_ID.into(),
|
||||
..Default::default()
|
||||
},
|
||||
collator_selection: asset_hub_polkadot_runtime::CollatorSelectionConfig {
|
||||
invulnerables: collators::invulnerables_asset_hub_polkadot()
|
||||
.iter()
|
||||
.cloned()
|
||||
.map(|(acc, _)| acc)
|
||||
.collect(),
|
||||
candidacy_bond: ED * 16,
|
||||
..Default::default()
|
||||
},
|
||||
session: asset_hub_polkadot_runtime::SessionConfig {
|
||||
keys: collators::invulnerables_asset_hub_polkadot()
|
||||
.into_iter()
|
||||
.map(|(acc, aura)| {
|
||||
(
|
||||
acc.clone(), // account id
|
||||
acc, // validator id
|
||||
asset_hub_polkadot_runtime::SessionKeys { aura }, // session keys
|
||||
)
|
||||
})
|
||||
.collect(),
|
||||
},
|
||||
polkadot_xcm: asset_hub_polkadot_runtime::PolkadotXcmConfig {
|
||||
safe_xcm_version: Some(SAFE_XCM_VERSION),
|
||||
..Default::default()
|
||||
},
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
genesis_config.build_storage().unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
// Asset Hub Westend
|
||||
pub mod asset_hub_westend {
|
||||
use super::*;
|
||||
@@ -742,31 +400,31 @@ pub mod asset_hub_westend {
|
||||
}
|
||||
|
||||
// Asset Hub Kusama
|
||||
pub mod asset_hub_kusama {
|
||||
pub mod asset_hub_rococo {
|
||||
use super::*;
|
||||
pub const PARA_ID: u32 = 1000;
|
||||
pub const ED: Balance = parachains_common::kusama::currency::EXISTENTIAL_DEPOSIT;
|
||||
pub const ED: Balance = parachains_common::rococo::currency::EXISTENTIAL_DEPOSIT;
|
||||
|
||||
pub fn genesis() -> Storage {
|
||||
let genesis_config = asset_hub_kusama_runtime::RuntimeGenesisConfig {
|
||||
system: asset_hub_kusama_runtime::SystemConfig {
|
||||
code: asset_hub_kusama_runtime::WASM_BINARY
|
||||
let genesis_config = asset_hub_westend_runtime::RuntimeGenesisConfig {
|
||||
system: asset_hub_westend_runtime::SystemConfig {
|
||||
code: asset_hub_westend_runtime::WASM_BINARY
|
||||
.expect("WASM binary was not build, please build it!")
|
||||
.to_vec(),
|
||||
..Default::default()
|
||||
},
|
||||
balances: asset_hub_kusama_runtime::BalancesConfig {
|
||||
balances: asset_hub_westend_runtime::BalancesConfig {
|
||||
balances: accounts::init_balances()
|
||||
.iter()
|
||||
.cloned()
|
||||
.map(|k| (k, ED * 4096))
|
||||
.collect(),
|
||||
},
|
||||
parachain_info: asset_hub_kusama_runtime::ParachainInfoConfig {
|
||||
parachain_info: asset_hub_westend_runtime::ParachainInfoConfig {
|
||||
parachain_id: PARA_ID.into(),
|
||||
..Default::default()
|
||||
},
|
||||
collator_selection: asset_hub_kusama_runtime::CollatorSelectionConfig {
|
||||
collator_selection: asset_hub_westend_runtime::CollatorSelectionConfig {
|
||||
invulnerables: collators::invulnerables()
|
||||
.iter()
|
||||
.cloned()
|
||||
@@ -775,19 +433,19 @@ pub mod asset_hub_kusama {
|
||||
candidacy_bond: ED * 16,
|
||||
..Default::default()
|
||||
},
|
||||
session: asset_hub_kusama_runtime::SessionConfig {
|
||||
session: asset_hub_westend_runtime::SessionConfig {
|
||||
keys: collators::invulnerables()
|
||||
.into_iter()
|
||||
.map(|(acc, aura)| {
|
||||
(
|
||||
acc.clone(), // account id
|
||||
acc, // validator id
|
||||
asset_hub_kusama_runtime::SessionKeys { aura }, // session keys
|
||||
acc.clone(), // account id
|
||||
acc, // validator id
|
||||
asset_hub_westend_runtime::SessionKeys { aura }, // session keys
|
||||
)
|
||||
})
|
||||
.collect(),
|
||||
},
|
||||
polkadot_xcm: asset_hub_kusama_runtime::PolkadotXcmConfig {
|
||||
polkadot_xcm: asset_hub_westend_runtime::PolkadotXcmConfig {
|
||||
safe_xcm_version: Some(SAFE_XCM_VERSION),
|
||||
..Default::default()
|
||||
},
|
||||
@@ -859,177 +517,6 @@ pub mod penpal {
|
||||
}
|
||||
}
|
||||
|
||||
// Collectives
|
||||
pub mod collectives {
|
||||
use super::*;
|
||||
pub const PARA_ID: u32 = 1001;
|
||||
pub const ED: Balance = parachains_common::polkadot::currency::EXISTENTIAL_DEPOSIT;
|
||||
|
||||
pub fn genesis() -> Storage {
|
||||
let genesis_config = collectives_polkadot_runtime::RuntimeGenesisConfig {
|
||||
system: collectives_polkadot_runtime::SystemConfig {
|
||||
code: collectives_polkadot_runtime::WASM_BINARY
|
||||
.expect("WASM binary was not build, please build it!")
|
||||
.to_vec(),
|
||||
..Default::default()
|
||||
},
|
||||
balances: collectives_polkadot_runtime::BalancesConfig {
|
||||
balances: accounts::init_balances()
|
||||
.iter()
|
||||
.cloned()
|
||||
.map(|k| (k, ED * 4096))
|
||||
.collect(),
|
||||
},
|
||||
parachain_info: collectives_polkadot_runtime::ParachainInfoConfig {
|
||||
parachain_id: PARA_ID.into(),
|
||||
..Default::default()
|
||||
},
|
||||
collator_selection: collectives_polkadot_runtime::CollatorSelectionConfig {
|
||||
invulnerables: collators::invulnerables()
|
||||
.iter()
|
||||
.cloned()
|
||||
.map(|(acc, _)| acc)
|
||||
.collect(),
|
||||
candidacy_bond: ED * 16,
|
||||
..Default::default()
|
||||
},
|
||||
session: collectives_polkadot_runtime::SessionConfig {
|
||||
keys: collators::invulnerables()
|
||||
.into_iter()
|
||||
.map(|(acc, aura)| {
|
||||
(
|
||||
acc.clone(), // account id
|
||||
acc, // validator id
|
||||
collectives_polkadot_runtime::SessionKeys { aura }, // session keys
|
||||
)
|
||||
})
|
||||
.collect(),
|
||||
},
|
||||
polkadot_xcm: collectives_polkadot_runtime::PolkadotXcmConfig {
|
||||
safe_xcm_version: Some(SAFE_XCM_VERSION),
|
||||
..Default::default()
|
||||
},
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
genesis_config.build_storage().unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
// Bridge Hub Kusama
|
||||
pub mod bridge_hub_kusama {
|
||||
use super::*;
|
||||
pub const PARA_ID: u32 = 1002;
|
||||
pub const ED: Balance = parachains_common::kusama::currency::EXISTENTIAL_DEPOSIT;
|
||||
|
||||
pub fn genesis() -> Storage {
|
||||
let genesis_config = bridge_hub_kusama_runtime::RuntimeGenesisConfig {
|
||||
system: bridge_hub_kusama_runtime::SystemConfig {
|
||||
code: bridge_hub_kusama_runtime::WASM_BINARY
|
||||
.expect("WASM binary was not build, please build it!")
|
||||
.to_vec(),
|
||||
..Default::default()
|
||||
},
|
||||
balances: bridge_hub_kusama_runtime::BalancesConfig {
|
||||
balances: accounts::init_balances()
|
||||
.iter()
|
||||
.cloned()
|
||||
.map(|k| (k, ED * 4096))
|
||||
.collect(),
|
||||
},
|
||||
parachain_info: bridge_hub_kusama_runtime::ParachainInfoConfig {
|
||||
parachain_id: PARA_ID.into(),
|
||||
..Default::default()
|
||||
},
|
||||
collator_selection: bridge_hub_kusama_runtime::CollatorSelectionConfig {
|
||||
invulnerables: collators::invulnerables()
|
||||
.iter()
|
||||
.cloned()
|
||||
.map(|(acc, _)| acc)
|
||||
.collect(),
|
||||
candidacy_bond: ED * 16,
|
||||
..Default::default()
|
||||
},
|
||||
session: bridge_hub_kusama_runtime::SessionConfig {
|
||||
keys: collators::invulnerables()
|
||||
.into_iter()
|
||||
.map(|(acc, aura)| {
|
||||
(
|
||||
acc.clone(), // account id
|
||||
acc, // validator id
|
||||
bridge_hub_kusama_runtime::SessionKeys { aura }, // session keys
|
||||
)
|
||||
})
|
||||
.collect(),
|
||||
},
|
||||
polkadot_xcm: bridge_hub_kusama_runtime::PolkadotXcmConfig {
|
||||
safe_xcm_version: Some(SAFE_XCM_VERSION),
|
||||
..Default::default()
|
||||
},
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
genesis_config.build_storage().unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
// Bridge Hub Polkadot
|
||||
pub mod bridge_hub_polkadot {
|
||||
use super::*;
|
||||
pub const PARA_ID: u32 = 1002;
|
||||
pub const ED: Balance = parachains_common::polkadot::currency::EXISTENTIAL_DEPOSIT;
|
||||
|
||||
pub fn genesis() -> Storage {
|
||||
let genesis_config = bridge_hub_polkadot_runtime::RuntimeGenesisConfig {
|
||||
system: bridge_hub_polkadot_runtime::SystemConfig {
|
||||
code: bridge_hub_polkadot_runtime::WASM_BINARY
|
||||
.expect("WASM binary was not build, please build it!")
|
||||
.to_vec(),
|
||||
..Default::default()
|
||||
},
|
||||
balances: bridge_hub_polkadot_runtime::BalancesConfig {
|
||||
balances: accounts::init_balances()
|
||||
.iter()
|
||||
.cloned()
|
||||
.map(|k| (k, ED * 4096))
|
||||
.collect(),
|
||||
},
|
||||
parachain_info: bridge_hub_polkadot_runtime::ParachainInfoConfig {
|
||||
parachain_id: PARA_ID.into(),
|
||||
..Default::default()
|
||||
},
|
||||
collator_selection: bridge_hub_polkadot_runtime::CollatorSelectionConfig {
|
||||
invulnerables: collators::invulnerables()
|
||||
.iter()
|
||||
.cloned()
|
||||
.map(|(acc, _)| acc)
|
||||
.collect(),
|
||||
candidacy_bond: ED * 16,
|
||||
..Default::default()
|
||||
},
|
||||
session: bridge_hub_polkadot_runtime::SessionConfig {
|
||||
keys: collators::invulnerables()
|
||||
.into_iter()
|
||||
.map(|(acc, aura)| {
|
||||
(
|
||||
acc.clone(), // account id
|
||||
acc, // validator id
|
||||
bridge_hub_polkadot_runtime::SessionKeys { aura }, // session keys
|
||||
)
|
||||
})
|
||||
.collect(),
|
||||
},
|
||||
polkadot_xcm: bridge_hub_polkadot_runtime::PolkadotXcmConfig {
|
||||
safe_xcm_version: Some(SAFE_XCM_VERSION),
|
||||
..Default::default()
|
||||
},
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
genesis_config.build_storage().unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
// Bridge Hub Rococo & Bridge Hub Wococo
|
||||
pub mod bridge_hub_rococo {
|
||||
use super::*;
|
||||
|
||||
@@ -19,8 +19,7 @@ pub mod xcm_helpers;
|
||||
|
||||
use constants::{
|
||||
accounts::{ALICE, BOB},
|
||||
asset_hub_kusama, asset_hub_polkadot, asset_hub_westend, bridge_hub_kusama,
|
||||
bridge_hub_polkadot, bridge_hub_rococo, collectives, kusama, penpal, polkadot, rococo, westend,
|
||||
asset_hub_rococo, asset_hub_westend, bridge_hub_rococo, penpal, rococo, westend,
|
||||
};
|
||||
use impls::{RococoWococoMessageHandler, WococoRococoMessageHandler};
|
||||
|
||||
@@ -34,36 +33,6 @@ use xcm_emulator::{
|
||||
};
|
||||
|
||||
decl_test_relay_chains! {
|
||||
#[api_version(5)]
|
||||
pub struct Polkadot {
|
||||
genesis = polkadot::genesis(),
|
||||
on_init = (),
|
||||
runtime = polkadot_runtime,
|
||||
core = {
|
||||
MessageProcessor: DefaultMessageProcessor<Polkadot>,
|
||||
SovereignAccountOf: polkadot_runtime::xcm_config::SovereignAccountOf,
|
||||
},
|
||||
pallets = {
|
||||
XcmPallet: polkadot_runtime::XcmPallet,
|
||||
Balances: polkadot_runtime::Balances,
|
||||
Hrmp: polkadot_runtime::Hrmp,
|
||||
}
|
||||
},
|
||||
#[api_version(5)]
|
||||
pub struct Kusama {
|
||||
genesis = kusama::genesis(),
|
||||
on_init = (),
|
||||
runtime = kusama_runtime,
|
||||
core = {
|
||||
MessageProcessor: DefaultMessageProcessor<Kusama>,
|
||||
SovereignAccountOf: kusama_runtime::xcm_config::SovereignAccountOf,
|
||||
},
|
||||
pallets = {
|
||||
XcmPallet: kusama_runtime::XcmPallet,
|
||||
Balances: kusama_runtime::Balances,
|
||||
Hrmp: kusama_runtime::Hrmp,
|
||||
}
|
||||
},
|
||||
#[api_version(7)]
|
||||
pub struct Westend {
|
||||
genesis = westend::genesis(),
|
||||
@@ -112,164 +81,6 @@ decl_test_relay_chains! {
|
||||
}
|
||||
|
||||
decl_test_parachains! {
|
||||
// Polkadot Parachains
|
||||
pub struct AssetHubPolkadot {
|
||||
genesis = asset_hub_polkadot::genesis(),
|
||||
on_init = {
|
||||
asset_hub_polkadot_runtime::AuraExt::on_initialize(1);
|
||||
},
|
||||
runtime = asset_hub_polkadot_runtime,
|
||||
core = {
|
||||
XcmpMessageHandler: asset_hub_polkadot_runtime::XcmpQueue,
|
||||
DmpMessageHandler: asset_hub_polkadot_runtime::DmpQueue,
|
||||
LocationToAccountId: asset_hub_polkadot_runtime::xcm_config::LocationToAccountId,
|
||||
ParachainInfo: asset_hub_polkadot_runtime::ParachainInfo,
|
||||
},
|
||||
pallets = {
|
||||
PolkadotXcm: asset_hub_polkadot_runtime::PolkadotXcm,
|
||||
Assets: asset_hub_polkadot_runtime::Assets,
|
||||
Balances: asset_hub_polkadot_runtime::Balances,
|
||||
}
|
||||
},
|
||||
pub struct Collectives {
|
||||
genesis = collectives::genesis(),
|
||||
on_init = {
|
||||
collectives_polkadot_runtime::AuraExt::on_initialize(1);
|
||||
},
|
||||
runtime = collectives_polkadot_runtime,
|
||||
core = {
|
||||
XcmpMessageHandler: collectives_polkadot_runtime::XcmpQueue,
|
||||
DmpMessageHandler: collectives_polkadot_runtime::DmpQueue,
|
||||
LocationToAccountId: collectives_polkadot_runtime::xcm_config::LocationToAccountId,
|
||||
ParachainInfo: collectives_polkadot_runtime::ParachainInfo,
|
||||
},
|
||||
pallets = {
|
||||
PolkadotXcm: collectives_polkadot_runtime::PolkadotXcm,
|
||||
Balances: collectives_polkadot_runtime::Balances,
|
||||
}
|
||||
},
|
||||
pub struct BridgeHubPolkadot {
|
||||
genesis = bridge_hub_polkadot::genesis(),
|
||||
on_init = {
|
||||
bridge_hub_polkadot_runtime::AuraExt::on_initialize(1);
|
||||
},
|
||||
runtime = bridge_hub_polkadot_runtime,
|
||||
core = {
|
||||
XcmpMessageHandler: bridge_hub_polkadot_runtime::XcmpQueue,
|
||||
DmpMessageHandler: bridge_hub_polkadot_runtime::DmpQueue,
|
||||
LocationToAccountId: bridge_hub_polkadot_runtime::xcm_config::LocationToAccountId,
|
||||
ParachainInfo: bridge_hub_polkadot_runtime::ParachainInfo,
|
||||
},
|
||||
pallets = {
|
||||
PolkadotXcm: bridge_hub_polkadot_runtime::PolkadotXcm,
|
||||
}
|
||||
},
|
||||
pub struct PenpalPolkadotA {
|
||||
genesis = penpal::genesis(penpal::PARA_ID_A),
|
||||
on_init = {
|
||||
penpal_runtime::AuraExt::on_initialize(1);
|
||||
},
|
||||
runtime = penpal_runtime,
|
||||
core = {
|
||||
XcmpMessageHandler: penpal_runtime::XcmpQueue,
|
||||
DmpMessageHandler: penpal_runtime::DmpQueue,
|
||||
LocationToAccountId: penpal_runtime::xcm_config::LocationToAccountId,
|
||||
ParachainInfo: penpal_runtime::ParachainInfo,
|
||||
},
|
||||
pallets = {
|
||||
PolkadotXcm: penpal_runtime::PolkadotXcm,
|
||||
Assets: penpal_runtime::Assets,
|
||||
}
|
||||
},
|
||||
pub struct PenpalPolkadotB {
|
||||
genesis = penpal::genesis(penpal::PARA_ID_B),
|
||||
on_init = {
|
||||
penpal_runtime::AuraExt::on_initialize(1);
|
||||
},
|
||||
runtime = penpal_runtime,
|
||||
core = {
|
||||
XcmpMessageHandler: penpal_runtime::XcmpQueue,
|
||||
DmpMessageHandler: penpal_runtime::DmpQueue,
|
||||
LocationToAccountId: penpal_runtime::xcm_config::LocationToAccountId,
|
||||
ParachainInfo: penpal_runtime::ParachainInfo,
|
||||
},
|
||||
pallets = {
|
||||
PolkadotXcm: penpal_runtime::PolkadotXcm,
|
||||
Assets: penpal_runtime::Assets,
|
||||
}
|
||||
},
|
||||
// Kusama Parachains
|
||||
pub struct AssetHubKusama {
|
||||
genesis = asset_hub_kusama::genesis(),
|
||||
on_init = {
|
||||
asset_hub_kusama_runtime::AuraExt::on_initialize(1);
|
||||
},
|
||||
runtime = asset_hub_kusama_runtime,
|
||||
core = {
|
||||
XcmpMessageHandler: asset_hub_kusama_runtime::XcmpQueue,
|
||||
DmpMessageHandler: asset_hub_kusama_runtime::DmpQueue,
|
||||
LocationToAccountId: asset_hub_kusama_runtime::xcm_config::LocationToAccountId,
|
||||
ParachainInfo: asset_hub_kusama_runtime::ParachainInfo,
|
||||
},
|
||||
pallets = {
|
||||
PolkadotXcm: asset_hub_kusama_runtime::PolkadotXcm,
|
||||
Assets: asset_hub_kusama_runtime::Assets,
|
||||
ForeignAssets: asset_hub_kusama_runtime::ForeignAssets,
|
||||
PoolAssets: asset_hub_kusama_runtime::PoolAssets,
|
||||
AssetConversion: asset_hub_kusama_runtime::AssetConversion,
|
||||
Balances: asset_hub_kusama_runtime::Balances,
|
||||
}
|
||||
},
|
||||
pub struct BridgeHubKusama {
|
||||
genesis = bridge_hub_kusama::genesis(),
|
||||
on_init = {
|
||||
bridge_hub_kusama_runtime::AuraExt::on_initialize(1);
|
||||
},
|
||||
runtime = bridge_hub_kusama_runtime,
|
||||
core = {
|
||||
XcmpMessageHandler: bridge_hub_kusama_runtime::XcmpQueue,
|
||||
DmpMessageHandler: bridge_hub_kusama_runtime::DmpQueue,
|
||||
LocationToAccountId: bridge_hub_kusama_runtime::xcm_config::LocationToAccountId,
|
||||
ParachainInfo: bridge_hub_kusama_runtime::ParachainInfo,
|
||||
},
|
||||
pallets = {
|
||||
PolkadotXcm: bridge_hub_kusama_runtime::PolkadotXcm,
|
||||
}
|
||||
},
|
||||
pub struct PenpalKusamaA {
|
||||
genesis = penpal::genesis(penpal::PARA_ID_A),
|
||||
on_init = {
|
||||
penpal_runtime::AuraExt::on_initialize(1);
|
||||
},
|
||||
runtime = penpal_runtime,
|
||||
core = {
|
||||
XcmpMessageHandler: penpal_runtime::XcmpQueue,
|
||||
DmpMessageHandler: penpal_runtime::DmpQueue,
|
||||
LocationToAccountId: penpal_runtime::xcm_config::LocationToAccountId,
|
||||
ParachainInfo: penpal_runtime::ParachainInfo,
|
||||
},
|
||||
pallets = {
|
||||
PolkadotXcm: penpal_runtime::PolkadotXcm,
|
||||
Assets: penpal_runtime::Assets,
|
||||
}
|
||||
},
|
||||
pub struct PenpalKusamaB {
|
||||
genesis = penpal::genesis(penpal::PARA_ID_B),
|
||||
on_init = {
|
||||
penpal_runtime::AuraExt::on_initialize(1);
|
||||
},
|
||||
runtime = penpal_runtime,
|
||||
core = {
|
||||
XcmpMessageHandler: penpal_runtime::XcmpQueue,
|
||||
DmpMessageHandler: penpal_runtime::DmpQueue,
|
||||
LocationToAccountId: penpal_runtime::xcm_config::LocationToAccountId,
|
||||
ParachainInfo: penpal_runtime::ParachainInfo,
|
||||
},
|
||||
pallets = {
|
||||
PolkadotXcm: penpal_runtime::PolkadotXcm,
|
||||
Assets: penpal_runtime::Assets,
|
||||
}
|
||||
},
|
||||
// Westend Parachains
|
||||
pub struct AssetHubWestend {
|
||||
genesis = asset_hub_westend::genesis(),
|
||||
@@ -329,7 +140,7 @@ decl_test_parachains! {
|
||||
},
|
||||
// AssetHubRococo (aka Rockmine/Rockmine2) mirrors AssetHubKusama
|
||||
pub struct AssetHubRococo {
|
||||
genesis = asset_hub_kusama::genesis(),
|
||||
genesis = asset_hub_rococo::genesis(),
|
||||
on_init = {
|
||||
asset_hub_polkadot_runtime::AuraExt::on_initialize(1);
|
||||
},
|
||||
@@ -363,7 +174,7 @@ decl_test_parachains! {
|
||||
}
|
||||
},
|
||||
pub struct AssetHubWococo {
|
||||
genesis = asset_hub_polkadot::genesis(),
|
||||
genesis = asset_hub_westend::genesis(),
|
||||
on_init = {
|
||||
asset_hub_polkadot_runtime::AuraExt::on_initialize(1);
|
||||
},
|
||||
@@ -399,31 +210,6 @@ decl_test_parachains! {
|
||||
}
|
||||
|
||||
decl_test_networks! {
|
||||
pub struct PolkadotMockNet {
|
||||
relay_chain = Polkadot,
|
||||
parachains = vec![
|
||||
AssetHubPolkadot,
|
||||
Collectives,
|
||||
BridgeHubPolkadot,
|
||||
PenpalPolkadotA,
|
||||
PenpalPolkadotB,
|
||||
],
|
||||
// TODO: uncomment when https://github.com/paritytech/cumulus/pull/2528 is merged
|
||||
// bridge = PolkadotKusamaMockBridge
|
||||
bridge = ()
|
||||
},
|
||||
pub struct KusamaMockNet {
|
||||
relay_chain = Kusama,
|
||||
parachains = vec![
|
||||
AssetHubKusama,
|
||||
PenpalKusamaA,
|
||||
BridgeHubKusama,
|
||||
PenpalKusamaB,
|
||||
],
|
||||
// TODO: uncomment when https://github.com/paritytech/cumulus/pull/2528 is merged
|
||||
// bridge = KusamaPolkadotMockBridge
|
||||
bridge = ()
|
||||
},
|
||||
pub struct WestendMockNet {
|
||||
relay_chain = Westend,
|
||||
parachains = vec![
|
||||
@@ -475,16 +261,6 @@ decl_test_bridges! {
|
||||
// }
|
||||
}
|
||||
|
||||
// Polkadot implementation
|
||||
impl_accounts_helpers_for_relay_chain!(Polkadot);
|
||||
impl_assert_events_helpers_for_relay_chain!(Polkadot);
|
||||
impl_hrmp_channels_helpers_for_relay_chain!(Polkadot);
|
||||
|
||||
// Kusama implementation
|
||||
impl_accounts_helpers_for_relay_chain!(Kusama);
|
||||
impl_assert_events_helpers_for_relay_chain!(Kusama);
|
||||
impl_hrmp_channels_helpers_for_relay_chain!(Kusama);
|
||||
|
||||
// Westend implementation
|
||||
impl_accounts_helpers_for_relay_chain!(Westend);
|
||||
impl_assert_events_helpers_for_relay_chain!(Westend);
|
||||
@@ -497,65 +273,31 @@ impl_assert_events_helpers_for_relay_chain!(Rococo);
|
||||
impl_accounts_helpers_for_relay_chain!(Wococo);
|
||||
impl_assert_events_helpers_for_relay_chain!(Wococo);
|
||||
|
||||
// AssetHubPolkadot implementation
|
||||
impl_accounts_helpers_for_parachain!(AssetHubPolkadot);
|
||||
impl_assets_helpers_for_parachain!(AssetHubPolkadot, Polkadot);
|
||||
impl_assert_events_helpers_for_parachain!(AssetHubPolkadot);
|
||||
|
||||
// AssetHubKusama implementation
|
||||
impl_accounts_helpers_for_parachain!(AssetHubKusama);
|
||||
impl_assets_helpers_for_parachain!(AssetHubKusama, Kusama);
|
||||
impl_assert_events_helpers_for_parachain!(AssetHubKusama);
|
||||
|
||||
// AssetHubWestend implementation
|
||||
impl_accounts_helpers_for_parachain!(AssetHubWestend);
|
||||
impl_assets_helpers_for_parachain!(AssetHubWestend, Westend);
|
||||
impl_assert_events_helpers_for_parachain!(AssetHubWestend);
|
||||
|
||||
// PenpalPolkadot implementations
|
||||
impl_assert_events_helpers_for_parachain!(PenpalPolkadotA);
|
||||
impl_assert_events_helpers_for_parachain!(PenpalPolkadotB);
|
||||
|
||||
// PenpalKusama implementations
|
||||
impl_assert_events_helpers_for_parachain!(PenpalKusamaA);
|
||||
impl_assert_events_helpers_for_parachain!(PenpalKusamaB);
|
||||
|
||||
// PenpalWestendA implementation
|
||||
impl_assert_events_helpers_for_parachain!(PenpalWestendA);
|
||||
|
||||
// Collectives implementation
|
||||
impl_accounts_helpers_for_parachain!(Collectives);
|
||||
impl_assert_events_helpers_for_parachain!(Collectives);
|
||||
|
||||
// BridgeHubRococo implementation
|
||||
impl_accounts_helpers_for_parachain!(BridgeHubRococo);
|
||||
impl_assert_events_helpers_for_parachain!(BridgeHubRococo);
|
||||
|
||||
decl_test_sender_receiver_accounts_parameter_types! {
|
||||
// Relays
|
||||
Polkadot { sender: ALICE, receiver: BOB },
|
||||
Kusama { sender: ALICE, receiver: BOB },
|
||||
Westend { sender: ALICE, receiver: BOB },
|
||||
Rococo { sender: ALICE, receiver: BOB },
|
||||
Wococo { sender: ALICE, receiver: BOB },
|
||||
// Asset Hubs
|
||||
AssetHubPolkadot { sender: ALICE, receiver: BOB },
|
||||
AssetHubKusama { sender: ALICE, receiver: BOB },
|
||||
AssetHubWestend { sender: ALICE, receiver: BOB },
|
||||
AssetHubRococo { sender: ALICE, receiver: BOB },
|
||||
AssetHubWococo { sender: ALICE, receiver: BOB },
|
||||
// Collectives
|
||||
Collectives { sender: ALICE, receiver: BOB },
|
||||
// Bridged Hubs
|
||||
BridgeHubPolkadot { sender: ALICE, receiver: BOB },
|
||||
BridgeHubKusama { sender: ALICE, receiver: BOB },
|
||||
BridgeHubRococo { sender: ALICE, receiver: BOB },
|
||||
BridgeHubWococo { sender: ALICE, receiver: BOB },
|
||||
// Penpals
|
||||
PenpalPolkadotA { sender: ALICE, receiver: BOB },
|
||||
PenpalPolkadotB { sender: ALICE, receiver: BOB },
|
||||
PenpalKusamaA { sender: ALICE, receiver: BOB },
|
||||
PenpalKusamaB { sender: ALICE, receiver: BOB },
|
||||
PenpalWestendA { sender: ALICE, receiver: BOB },
|
||||
PenpalRococoA { sender: ALICE, receiver: BOB }
|
||||
}
|
||||
|
||||
@@ -56,7 +56,6 @@ sp-weights = { path = "../../../../../substrate/primitives/weights", default-fea
|
||||
primitive-types = { version = "0.12.1", default-features = false, features = ["codec", "scale-info", "num-traits"] }
|
||||
|
||||
# Polkadot
|
||||
kusama-runtime-constants = { path = "../../../../../polkadot/runtime/kusama/constants", default-features = false}
|
||||
pallet-xcm = { path = "../../../../../polkadot/xcm/pallet-xcm", default-features = false}
|
||||
pallet-xcm-benchmarks = { path = "../../../../../polkadot/xcm/pallet-xcm-benchmarks", default-features = false, optional = true }
|
||||
polkadot-core-primitives = { path = "../../../../../polkadot/core-primitives", default-features = false}
|
||||
@@ -177,7 +176,6 @@ std = [
|
||||
"frame-system-rpc-runtime-api/std",
|
||||
"frame-system/std",
|
||||
"frame-try-runtime?/std",
|
||||
"kusama-runtime-constants/std",
|
||||
"log/std",
|
||||
"pallet-asset-conversion-tx-payment/std",
|
||||
"pallet-asset-conversion/std",
|
||||
|
||||
@@ -56,7 +56,6 @@ pallet-xcm-benchmarks = { path = "../../../../../polkadot/xcm/pallet-xcm-benchma
|
||||
polkadot-core-primitives = { path = "../../../../../polkadot/core-primitives", default-features = false}
|
||||
polkadot-parachain-primitives = { path = "../../../../../polkadot/parachain", default-features = false}
|
||||
polkadot-runtime-common = { path = "../../../../../polkadot/runtime/common", default-features = false}
|
||||
polkadot-runtime-constants = { path = "../../../../../polkadot/runtime/polkadot/constants", default-features = false}
|
||||
xcm = { package = "staging-xcm", path = "../../../../../polkadot/xcm", default-features = false}
|
||||
xcm-builder = { package = "staging-xcm-builder", path = "../../../../../polkadot/xcm/xcm-builder", default-features = false}
|
||||
xcm-executor = { package = "staging-xcm-executor", path = "../../../../../polkadot/xcm/xcm-executor", default-features = false}
|
||||
@@ -185,7 +184,6 @@ std = [
|
||||
"polkadot-core-primitives/std",
|
||||
"polkadot-parachain-primitives/std",
|
||||
"polkadot-runtime-common/std",
|
||||
"polkadot-runtime-constants/std",
|
||||
"scale-info/std",
|
||||
"sp-api/std",
|
||||
"sp-block-builder/std",
|
||||
|
||||
@@ -49,7 +49,6 @@ sp-transaction-pool = { path = "../../../../../substrate/primitives/transaction-
|
||||
sp-version = { path = "../../../../../substrate/primitives/version", default-features = false}
|
||||
|
||||
# Polkadot
|
||||
kusama-runtime-constants = { path = "../../../../../polkadot/runtime/kusama/constants", default-features = false}
|
||||
pallet-xcm = { path = "../../../../../polkadot/xcm/pallet-xcm", default-features = false}
|
||||
pallet-xcm-benchmarks = { path = "../../../../../polkadot/xcm/pallet-xcm-benchmarks", default-features = false, optional = true }
|
||||
polkadot-core-primitives = { path = "../../../../../polkadot/core-primitives", default-features = false}
|
||||
@@ -94,7 +93,6 @@ std = [
|
||||
"frame-system-rpc-runtime-api/std",
|
||||
"frame-system/std",
|
||||
"frame-try-runtime?/std",
|
||||
"kusama-runtime-constants/std",
|
||||
"log/std",
|
||||
"pallet-aura/std",
|
||||
"pallet-authorship/std",
|
||||
|
||||
@@ -49,7 +49,6 @@ sp-transaction-pool = { path = "../../../../../substrate/primitives/transaction-
|
||||
sp-version = { path = "../../../../../substrate/primitives/version", default-features = false}
|
||||
|
||||
# Polkadot
|
||||
polkadot-runtime-constants = { path = "../../../../../polkadot/runtime/polkadot/constants", default-features = false}
|
||||
pallet-xcm = { path = "../../../../../polkadot/xcm/pallet-xcm", default-features = false}
|
||||
pallet-xcm-benchmarks = { path = "../../../../../polkadot/xcm/pallet-xcm-benchmarks", default-features = false, optional = true }
|
||||
polkadot-core-primitives = { path = "../../../../../polkadot/core-primitives", default-features = false}
|
||||
@@ -112,7 +111,6 @@ std = [
|
||||
"polkadot-core-primitives/std",
|
||||
"polkadot-parachain-primitives/std",
|
||||
"polkadot-runtime-common/std",
|
||||
"polkadot-runtime-constants/std",
|
||||
"scale-info/std",
|
||||
"serde",
|
||||
"sp-api/std",
|
||||
|
||||
@@ -58,7 +58,6 @@ pallet-xcm = { path = "../../../../../polkadot/xcm/pallet-xcm", default-features
|
||||
polkadot-core-primitives = { path = "../../../../../polkadot/core-primitives", default-features = false}
|
||||
polkadot-parachain-primitives = { path = "../../../../../polkadot/parachain", default-features = false}
|
||||
polkadot-runtime-common = { path = "../../../../../polkadot/runtime/common", default-features = false}
|
||||
polkadot-runtime-constants = { path = "../../../../../polkadot/runtime/polkadot/constants", default-features = false}
|
||||
xcm = { package = "staging-xcm", path = "../../../../../polkadot/xcm", default-features = false}
|
||||
xcm-builder = { package = "staging-xcm-builder", path = "../../../../../polkadot/xcm/xcm-builder", default-features = false}
|
||||
xcm-executor = { package = "staging-xcm-executor", path = "../../../../../polkadot/xcm/xcm-executor", default-features = false}
|
||||
@@ -195,7 +194,6 @@ std = [
|
||||
"polkadot-core-primitives/std",
|
||||
"polkadot-parachain-primitives/std",
|
||||
"polkadot-runtime-common/std",
|
||||
"polkadot-runtime-constants/std",
|
||||
"scale-info/std",
|
||||
"sp-api/std",
|
||||
"sp-arithmetic/std",
|
||||
|
||||
@@ -26,7 +26,6 @@ use frame_system::EnsureRoot;
|
||||
use pallet_xcm::XcmPassthrough;
|
||||
use parachains_common::{impls::ToStakingPot, xcm_config::ConcreteNativeAssetFrom};
|
||||
use polkadot_parachain_primitives::primitives::Sibling;
|
||||
use polkadot_runtime_constants::xcm::body::FELLOWSHIP_ADMIN_INDEX;
|
||||
use xcm::latest::prelude::*;
|
||||
use xcm_builder::{
|
||||
AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses,
|
||||
@@ -39,6 +38,8 @@ use xcm_builder::{
|
||||
};
|
||||
use xcm_executor::{traits::WithOriginFilter, XcmExecutor};
|
||||
|
||||
const FELLOWSHIP_ADMIN_INDEX: u32 = 1;
|
||||
|
||||
parameter_types! {
|
||||
pub const DotLocation: MultiLocation = MultiLocation::parent();
|
||||
pub const RelayNetwork: Option<NetworkId> = Some(NetworkId::Polkadot);
|
||||
|
||||
@@ -53,7 +53,6 @@ pallet-contracts = { path = "../../../../../substrate/frame/contracts", default-
|
||||
pallet-contracts-primitives = { path = "../../../../../substrate/frame/contracts/primitives", default-features = false}
|
||||
|
||||
# Polkadot
|
||||
kusama-runtime-constants = { path = "../../../../../polkadot/runtime/kusama/constants", default-features = false}
|
||||
pallet-xcm = { path = "../../../../../polkadot/xcm/pallet-xcm", default-features = false}
|
||||
polkadot-core-primitives = { path = "../../../../../polkadot/core-primitives", default-features = false}
|
||||
polkadot-parachain-primitives = { path = "../../../../../polkadot/parachain", default-features = false}
|
||||
@@ -94,7 +93,6 @@ std = [
|
||||
"frame-system-rpc-runtime-api/std",
|
||||
"frame-system/std",
|
||||
"frame-try-runtime/std",
|
||||
"kusama-runtime-constants/std",
|
||||
"log/std",
|
||||
"pallet-aura/std",
|
||||
"pallet-authorship/std",
|
||||
|
||||
@@ -23,7 +23,6 @@ pyro = { package = "pyroscope", version = "0.5.3", optional = true }
|
||||
pyroscope_pprofrs = { version = "0.2", optional = true }
|
||||
|
||||
service = { package = "polkadot-service", path = "../node/service", default-features = false, optional = true }
|
||||
polkadot-performance-test = { path = "../node/test/performance-test", optional = true }
|
||||
|
||||
sp-core = { path = "../../substrate/primitives/core" }
|
||||
sp-io = { path = "../../substrate/primitives/io" }
|
||||
@@ -57,7 +56,6 @@ cli = [
|
||||
runtime-benchmarks = [
|
||||
"frame-benchmarking-cli?/runtime-benchmarks",
|
||||
"polkadot-node-metrics/runtime-benchmarks",
|
||||
"polkadot-performance-test?/runtime-benchmarks",
|
||||
"sc-service?/runtime-benchmarks",
|
||||
"service/runtime-benchmarks",
|
||||
]
|
||||
@@ -65,7 +63,6 @@ full-node = [ "service/full-node" ]
|
||||
try-runtime = [ "service/try-runtime", "try-runtime-cli/try-runtime" ]
|
||||
fast-runtime = [ "service/fast-runtime" ]
|
||||
pyroscope = [ "pyro", "pyroscope_pprofrs" ]
|
||||
hostperfcheck = [ "polkadot-performance-test" ]
|
||||
|
||||
# Configure the native runtimes to use.
|
||||
westend-native = [ "service/westend-native" ]
|
||||
|
||||
@@ -58,10 +58,6 @@ pub enum Subcommand {
|
||||
#[command(subcommand)]
|
||||
Benchmark(frame_benchmarking_cli::BenchmarkCmd),
|
||||
|
||||
/// Runs performance checks such as PVF compilation in order to measure machine
|
||||
/// capabilities of running a validator.
|
||||
HostPerfCheck,
|
||||
|
||||
/// Try-runtime has migrated to a standalone CLI
|
||||
/// (<https://github.com/paritytech/try-runtime-cli>). The subcommand exists as a stub and
|
||||
/// deprecation notice. It will be removed entirely some time after Janurary 2024.
|
||||
|
||||
@@ -167,26 +167,6 @@ fn set_default_ss58_version(spec: &Box<dyn service::ChainSpec>) {
|
||||
sp_core::crypto::set_default_ss58_version(ss58_version);
|
||||
}
|
||||
|
||||
/// Runs performance checks.
|
||||
/// Should only be used in release build since the check would take too much time otherwise.
|
||||
fn host_perf_check() -> Result<()> {
|
||||
#[cfg(not(feature = "hostperfcheck"))]
|
||||
{
|
||||
return Err(Error::FeatureNotEnabled { feature: "hostperfcheck" }.into())
|
||||
}
|
||||
|
||||
#[cfg(all(not(build_type = "release"), feature = "hostperfcheck"))]
|
||||
{
|
||||
return Err(PerfCheckError::WrongBuildType.into())
|
||||
}
|
||||
|
||||
#[cfg(all(feature = "hostperfcheck", build_type = "release"))]
|
||||
{
|
||||
crate::host_perf_check::host_perf_check()?;
|
||||
return Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
/// Launch a node, accepting arguments just like a regular node,
|
||||
/// accepts an alternative overseer generator, to adjust behavior
|
||||
/// for integration tests as needed.
|
||||
@@ -509,13 +489,6 @@ pub fn run() -> Result<()> {
|
||||
_ => Err(Error::CommandNotImplemented),
|
||||
}
|
||||
},
|
||||
Some(Subcommand::HostPerfCheck) => {
|
||||
let mut builder = sc_cli::LoggerBuilder::new("");
|
||||
builder.with_colors(true);
|
||||
builder.init()?;
|
||||
|
||||
host_perf_check()
|
||||
},
|
||||
Some(Subcommand::Key(cmd)) => Ok(cmd.run(&cli)?),
|
||||
#[cfg(feature = "try-runtime")]
|
||||
Some(Subcommand::TryRuntime) => Err(try_runtime_cli::DEPRECATION_NOTICE.to_owned().into()),
|
||||
|
||||
@@ -28,10 +28,6 @@ pub enum Error {
|
||||
#[error(transparent)]
|
||||
SubstrateTracing(#[from] sc_tracing::logging::Error),
|
||||
|
||||
#[error(transparent)]
|
||||
#[cfg(feature = "hostperfcheck")]
|
||||
PerfCheck(#[from] polkadot_performance_test::PerfCheckError),
|
||||
|
||||
#[cfg(not(feature = "pyroscope"))]
|
||||
#[error("Binary was not compiled with `--feature=pyroscope`")]
|
||||
PyroscopeNotCompiledIn,
|
||||
|
||||
@@ -1,74 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Polkadot.
|
||||
|
||||
// Polkadot 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.
|
||||
|
||||
// Polkadot 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 Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use log::info;
|
||||
use polkadot_performance_test::{
|
||||
measure_erasure_coding, measure_pvf_prepare, PerfCheckError, ERASURE_CODING_N_VALIDATORS,
|
||||
ERASURE_CODING_TIME_LIMIT, PVF_PREPARE_TIME_LIMIT, VALIDATION_CODE_BOMB_LIMIT,
|
||||
};
|
||||
use std::time::Duration;
|
||||
|
||||
pub fn host_perf_check() -> Result<(), PerfCheckError> {
|
||||
let pvf_prepare_time_limit = time_limit_from_baseline(PVF_PREPARE_TIME_LIMIT);
|
||||
let erasure_coding_time_limit = time_limit_from_baseline(ERASURE_CODING_TIME_LIMIT);
|
||||
let wasm_code =
|
||||
polkadot_performance_test::WASM_BINARY.ok_or(PerfCheckError::WasmBinaryMissing)?;
|
||||
|
||||
// Decompress the code before running checks.
|
||||
let code = sp_maybe_compressed_blob::decompress(wasm_code, VALIDATION_CODE_BOMB_LIMIT)
|
||||
.or(Err(PerfCheckError::CodeDecompressionFailed))?;
|
||||
|
||||
info!("Running the performance checks...");
|
||||
|
||||
perf_check("PVF-prepare", pvf_prepare_time_limit, || measure_pvf_prepare(code.as_ref()))?;
|
||||
|
||||
perf_check("Erasure-coding", erasure_coding_time_limit, || {
|
||||
measure_erasure_coding(ERASURE_CODING_N_VALIDATORS, code.as_ref())
|
||||
})?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Returns a no-warning threshold for the given time limit.
|
||||
fn green_threshold(duration: Duration) -> Duration {
|
||||
duration * 4 / 5
|
||||
}
|
||||
|
||||
/// Returns an extended time limit to be used for the actual check.
|
||||
fn time_limit_from_baseline(duration: Duration) -> Duration {
|
||||
duration * 3 / 2
|
||||
}
|
||||
|
||||
fn perf_check(
|
||||
test_name: &str,
|
||||
time_limit: Duration,
|
||||
test: impl Fn() -> Result<Duration, PerfCheckError>,
|
||||
) -> Result<(), PerfCheckError> {
|
||||
let elapsed = test()?;
|
||||
|
||||
if elapsed < green_threshold(time_limit) {
|
||||
info!("🟢 {} performance check passed, elapsed: {:?}", test_name, elapsed);
|
||||
Ok(())
|
||||
} else if elapsed <= time_limit {
|
||||
info!(
|
||||
"🟡 {} performance check passed, {:?} limit almost exceeded, elapsed: {:?}",
|
||||
test_name, time_limit, elapsed
|
||||
);
|
||||
Ok(())
|
||||
} else {
|
||||
Err(PerfCheckError::TimeOut { elapsed, limit: time_limit })
|
||||
}
|
||||
}
|
||||
@@ -24,8 +24,6 @@ mod cli;
|
||||
mod command;
|
||||
#[cfg(feature = "cli")]
|
||||
mod error;
|
||||
#[cfg(all(feature = "hostperfcheck", build_type = "release"))]
|
||||
mod host_perf_check;
|
||||
|
||||
#[cfg(feature = "service")]
|
||||
pub use service::{self, Block, CoreApi, IdentifyVariant, ProvideRuntimeApi, TFullClient};
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
[package]
|
||||
name = "polkadot-performance-test"
|
||||
publish = false
|
||||
version = "1.0.0"
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
||||
license.workspace = true
|
||||
|
||||
[dependencies]
|
||||
thiserror = "1.0.48"
|
||||
quote = "1.0.28"
|
||||
env_logger = "0.9"
|
||||
log = "0.4"
|
||||
|
||||
polkadot-node-core-pvf-prepare-worker = { path = "../../core/pvf/prepare-worker" }
|
||||
polkadot-erasure-coding = { path = "../../../erasure-coding" }
|
||||
polkadot-node-primitives = { path = "../../primitives" }
|
||||
polkadot-primitives = { path = "../../../primitives" }
|
||||
|
||||
sc-executor-common = { path = "../../../../substrate/client/executor/common" }
|
||||
sp-maybe-compressed-blob = { path = "../../../../substrate/primitives/maybe-compressed-blob" }
|
||||
|
||||
kusama-runtime = { package = "staging-kusama-runtime", path = "../../../runtime/kusama" }
|
||||
|
||||
[[bin]]
|
||||
name = "gen-ref-constants"
|
||||
path = "src/gen_ref_constants.rs"
|
||||
|
||||
[features]
|
||||
runtime-benchmarks = [
|
||||
"kusama-runtime/runtime-benchmarks",
|
||||
"polkadot-primitives/runtime-benchmarks",
|
||||
]
|
||||
@@ -1,21 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Polkadot.
|
||||
|
||||
// Polkadot 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.
|
||||
|
||||
// Polkadot 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 Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
fn main() {
|
||||
if let Ok(profile) = std::env::var("PROFILE") {
|
||||
println!("cargo:rustc-cfg=build_type=\"{}\"", profile);
|
||||
}
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Polkadot.
|
||||
|
||||
// Polkadot 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.
|
||||
|
||||
// Polkadot 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 Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! This file was automatically generated by `gen-ref-constants`.
|
||||
//! Do not edit manually!
|
||||
|
||||
use std::time::Duration;
|
||||
pub const PVF_PREPARE_TIME_LIMIT: Duration = Duration::from_millis(4910u64);
|
||||
pub const ERASURE_CODING_TIME_LIMIT: Duration = Duration::from_millis(466u64);
|
||||
@@ -1,99 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Polkadot.
|
||||
|
||||
// Polkadot 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.
|
||||
|
||||
// Polkadot 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 Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Generate reference performance check results.
|
||||
|
||||
use polkadot_performance_test::PerfCheckError;
|
||||
|
||||
fn main() -> Result<(), PerfCheckError> {
|
||||
#[cfg(build_type = "release")]
|
||||
{
|
||||
run::run()
|
||||
}
|
||||
#[cfg(not(build_type = "release"))]
|
||||
{
|
||||
Err(PerfCheckError::WrongBuildType)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(build_type = "release")]
|
||||
mod run {
|
||||
use polkadot_node_primitives::VALIDATION_CODE_BOMB_LIMIT;
|
||||
use polkadot_performance_test::{
|
||||
measure_erasure_coding, measure_pvf_prepare, PerfCheckError, ERASURE_CODING_N_VALIDATORS,
|
||||
};
|
||||
use std::{
|
||||
fs::OpenOptions,
|
||||
io::{self, Write},
|
||||
time::Duration,
|
||||
};
|
||||
|
||||
const WARM_UP_RUNS: usize = 16;
|
||||
const FILE_HEADER: &str = include_str!("../../../../file_header.txt");
|
||||
const DOC_COMMENT: &str = "//! This file was automatically generated by `gen-ref-constants`.\n//! Do not edit manually!";
|
||||
const FILE_PATH: &str = concat!(env!("CARGO_MANIFEST_DIR"), "/src/constants.rs");
|
||||
|
||||
fn save_constants(pvf_prepare: Duration, erasure_coding: Duration) -> io::Result<()> {
|
||||
let mut output =
|
||||
OpenOptions::new().truncate(true).create(true).write(true).open(FILE_PATH)?;
|
||||
|
||||
writeln!(output, "{}\n\n{}\n", FILE_HEADER, DOC_COMMENT)?;
|
||||
|
||||
let pvf_prepare_millis = pvf_prepare.as_millis() as u64;
|
||||
let erasure_coding_millis = erasure_coding.as_millis() as u64;
|
||||
|
||||
let token_stream = quote::quote! {
|
||||
use std::time::Duration;
|
||||
|
||||
pub const PVF_PREPARE_TIME_LIMIT: Duration = Duration::from_millis(#pvf_prepare_millis);
|
||||
pub const ERASURE_CODING_TIME_LIMIT: Duration = Duration::from_millis(#erasure_coding_millis);
|
||||
};
|
||||
|
||||
writeln!(output, "{}", token_stream.to_string())?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn run() -> Result<(), PerfCheckError> {
|
||||
let _ = env_logger::builder().filter(None, log::LevelFilter::Info).try_init();
|
||||
|
||||
let wasm_code =
|
||||
polkadot_performance_test::WASM_BINARY.ok_or(PerfCheckError::WasmBinaryMissing)?;
|
||||
|
||||
log::info!("Running the benchmark, number of iterations: {}", WARM_UP_RUNS);
|
||||
|
||||
let code = sp_maybe_compressed_blob::decompress(wasm_code, VALIDATION_CODE_BOMB_LIMIT)
|
||||
.or(Err(PerfCheckError::CodeDecompressionFailed))?;
|
||||
|
||||
let (pvf_prepare_time, erasure_coding_time) = (1..=WARM_UP_RUNS)
|
||||
.map(|i| {
|
||||
if i - 1 > 0 && (i - 1) % 5 == 0 {
|
||||
log::info!("{} iterations done", i - 1);
|
||||
}
|
||||
(
|
||||
measure_pvf_prepare(code.as_ref()),
|
||||
measure_erasure_coding(ERASURE_CODING_N_VALIDATORS, code.as_ref()),
|
||||
)
|
||||
})
|
||||
.last()
|
||||
.expect("`WARM_UP_RUNS` is greater than 1 and thus we have at least one element; qed");
|
||||
|
||||
save_constants(pvf_prepare_time?, erasure_coding_time?)?;
|
||||
|
||||
log::info!("Successfully stored new reference values at {:?}. Make sure to format the file via `cargo +nightly fmt`", FILE_PATH);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
@@ -1,89 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Polkadot.
|
||||
|
||||
// Polkadot 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.
|
||||
|
||||
// Polkadot 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 Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! A Polkadot performance tests utilities.
|
||||
|
||||
use polkadot_erasure_coding::{obtain_chunks, reconstruct};
|
||||
use polkadot_primitives::ExecutorParams;
|
||||
use std::time::{Duration, Instant};
|
||||
|
||||
mod constants;
|
||||
|
||||
pub use constants::*;
|
||||
pub use polkadot_node_primitives::VALIDATION_CODE_BOMB_LIMIT;
|
||||
|
||||
/// Value used for reference benchmark of erasure-coding.
|
||||
pub const ERASURE_CODING_N_VALIDATORS: usize = 1024;
|
||||
|
||||
pub use kusama_runtime::WASM_BINARY;
|
||||
|
||||
#[allow(missing_docs)]
|
||||
#[derive(thiserror::Error, Debug)]
|
||||
pub enum PerfCheckError {
|
||||
#[error("This subcommand is only available in release mode")]
|
||||
WrongBuildType,
|
||||
|
||||
#[error("No wasm code found for running the performance test")]
|
||||
WasmBinaryMissing,
|
||||
|
||||
#[error("Failed to decompress wasm code")]
|
||||
CodeDecompressionFailed,
|
||||
|
||||
#[error(transparent)]
|
||||
Wasm(#[from] sc_executor_common::error::WasmError),
|
||||
|
||||
#[error(transparent)]
|
||||
ErasureCoding(#[from] polkadot_erasure_coding::Error),
|
||||
|
||||
#[error(transparent)]
|
||||
Io(#[from] std::io::Error),
|
||||
|
||||
#[error(
|
||||
"Performance check not passed: exceeded the {limit:?} time limit, elapsed: {elapsed:?}"
|
||||
)]
|
||||
TimeOut { elapsed: Duration, limit: Duration },
|
||||
}
|
||||
|
||||
/// Measures the time it takes to compile arbitrary wasm code.
|
||||
pub fn measure_pvf_prepare(wasm_code: &[u8]) -> Result<Duration, PerfCheckError> {
|
||||
let start = Instant::now();
|
||||
|
||||
let code = sp_maybe_compressed_blob::decompress(wasm_code, VALIDATION_CODE_BOMB_LIMIT)
|
||||
.or(Err(PerfCheckError::CodeDecompressionFailed))?;
|
||||
|
||||
// Recreate the pipeline from the pvf prepare worker.
|
||||
let blob = polkadot_node_core_pvf_prepare_worker::prevalidate(code.as_ref())
|
||||
.map_err(PerfCheckError::from)?;
|
||||
polkadot_node_core_pvf_prepare_worker::prepare(blob, &ExecutorParams::default())
|
||||
.map_err(PerfCheckError::from)?;
|
||||
|
||||
Ok(start.elapsed())
|
||||
}
|
||||
|
||||
/// Measure the time it takes to break arbitrary data into chunks and reconstruct it back.
|
||||
pub fn measure_erasure_coding(
|
||||
n_validators: usize,
|
||||
data: &[u8],
|
||||
) -> Result<Duration, PerfCheckError> {
|
||||
let start = Instant::now();
|
||||
|
||||
let chunks = obtain_chunks(n_validators, &data)?;
|
||||
let indexed_chunks = chunks.iter().enumerate().map(|(i, chunk)| (chunk.as_slice(), i));
|
||||
|
||||
let _: Vec<u8> = reconstruct(n_validators, indexed_chunks)?;
|
||||
|
||||
Ok(start.elapsed())
|
||||
}
|
||||
@@ -1,352 +0,0 @@
|
||||
[package]
|
||||
name = "staging-kusama-runtime"
|
||||
build = "build.rs"
|
||||
version = "1.0.0"
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
||||
license.workspace = true
|
||||
|
||||
[dependencies]
|
||||
bitvec = { version = "1.0.0", default-features = false, features = ["alloc"] }
|
||||
parity-scale-codec = { version = "3.6.1", default-features = false, features = ["derive", "max-encoded-len"] }
|
||||
scale-info = { version = "2.5.0", default-features = false, features = ["derive"] }
|
||||
log = { version = "0.4.17", default-features = false }
|
||||
rustc-hex = { version = "2.1.0", default-features = false }
|
||||
serde = { version = "1.0.188", default-features = false }
|
||||
serde_derive = { version = "1.0.117", optional = true }
|
||||
static_assertions = "1.1.0"
|
||||
smallvec = "1.8.0"
|
||||
|
||||
authority-discovery-primitives = { package = "sp-authority-discovery", path = "../../../substrate/primitives/authority-discovery", default-features = false }
|
||||
babe-primitives = { package = "sp-consensus-babe", path = "../../../substrate/primitives/consensus/babe", default-features = false }
|
||||
beefy-primitives = { package = "sp-consensus-beefy", path = "../../../substrate/primitives/consensus/beefy", default-features = false }
|
||||
binary-merkle-tree = { path = "../../../substrate/utils/binary-merkle-tree", default-features = false }
|
||||
kusama-runtime-constants = { package = "kusama-runtime-constants", path = "constants", default-features = false }
|
||||
sp-api = { path = "../../../substrate/primitives/api", default-features = false }
|
||||
inherents = { package = "sp-inherents", path = "../../../substrate/primitives/inherents", default-features = false }
|
||||
offchain-primitives = { package = "sp-offchain", path = "../../../substrate/primitives/offchain", default-features = false }
|
||||
sp-std = { package = "sp-std", path = "../../../substrate/primitives/std", default-features = false }
|
||||
sp-application-crypto = { path = "../../../substrate/primitives/application-crypto", default-features = false }
|
||||
sp-arithmetic = { path = "../../../substrate/primitives/arithmetic", default-features = false }
|
||||
sp-genesis-builder = { path = "../../../substrate/primitives/genesis-builder", default-features = false }
|
||||
sp-io = { path = "../../../substrate/primitives/io", default-features = false }
|
||||
sp-mmr-primitives = { path = "../../../substrate/primitives/merkle-mountain-range", default-features = false }
|
||||
sp-runtime = { path = "../../../substrate/primitives/runtime", default-features = false }
|
||||
sp-staking = { path = "../../../substrate/primitives/staking", default-features = false }
|
||||
sp-core = { path = "../../../substrate/primitives/core", default-features = false }
|
||||
sp-session = { path = "../../../substrate/primitives/session", default-features = false }
|
||||
sp-storage = { path = "../../../substrate/primitives/storage", default-features = false }
|
||||
sp-version = { path = "../../../substrate/primitives/version", default-features = false }
|
||||
tx-pool-api = { package = "sp-transaction-pool", path = "../../../substrate/primitives/transaction-pool", default-features = false }
|
||||
block-builder-api = { package = "sp-block-builder", path = "../../../substrate/primitives/block-builder", default-features = false }
|
||||
sp-npos-elections = { path = "../../../substrate/primitives/npos-elections", default-features = false }
|
||||
|
||||
pallet-authority-discovery = { path = "../../../substrate/frame/authority-discovery", default-features = false }
|
||||
pallet-authorship = { path = "../../../substrate/frame/authorship", default-features = false }
|
||||
pallet-babe = { path = "../../../substrate/frame/babe", default-features = false }
|
||||
pallet-bags-list = { path = "../../../substrate/frame/bags-list", default-features = false }
|
||||
pallet-balances = { path = "../../../substrate/frame/balances", default-features = false }
|
||||
pallet-beefy = { path = "../../../substrate/frame/beefy", default-features = false }
|
||||
pallet-beefy-mmr = { path = "../../../substrate/frame/beefy-mmr", default-features = false }
|
||||
pallet-bounties = { path = "../../../substrate/frame/bounties", default-features = false }
|
||||
pallet-child-bounties = { path = "../../../substrate/frame/child-bounties", default-features = false }
|
||||
pallet-transaction-payment = { path = "../../../substrate/frame/transaction-payment", default-features = false }
|
||||
pallet-transaction-payment-rpc-runtime-api = { path = "../../../substrate/frame/transaction-payment/rpc/runtime-api", default-features = false }
|
||||
pallet-nomination-pools-runtime-api = { path = "../../../substrate/frame/nomination-pools/runtime-api", default-features = false }
|
||||
pallet-collective = { path = "../../../substrate/frame/collective", default-features = false }
|
||||
pallet-conviction-voting = { path = "../../../substrate/frame/conviction-voting", default-features = false }
|
||||
pallet-democracy = { path = "../../../substrate/frame/democracy", default-features = false }
|
||||
pallet-elections-phragmen = { path = "../../../substrate/frame/elections-phragmen", default-features = false }
|
||||
pallet-election-provider-multi-phase = { path = "../../../substrate/frame/election-provider-multi-phase", default-features = false }
|
||||
pallet-fast-unstake = { path = "../../../substrate/frame/fast-unstake", default-features = false }
|
||||
frame-executive = { path = "../../../substrate/frame/executive", default-features = false }
|
||||
pallet-grandpa = { path = "../../../substrate/frame/grandpa", default-features = false }
|
||||
pallet-nis = { path = "../../../substrate/frame/nis", default-features = false }
|
||||
pallet-identity = { path = "../../../substrate/frame/identity", default-features = false }
|
||||
pallet-im-online = { path = "../../../substrate/frame/im-online", default-features = false }
|
||||
pallet-indices = { path = "../../../substrate/frame/indices", default-features = false }
|
||||
pallet-membership = { path = "../../../substrate/frame/membership", default-features = false }
|
||||
pallet-message-queue = { path = "../../../substrate/frame/message-queue", default-features = false }
|
||||
pallet-mmr = { path = "../../../substrate/frame/merkle-mountain-range", default-features = false }
|
||||
pallet-multisig = { path = "../../../substrate/frame/multisig", default-features = false }
|
||||
pallet-nomination-pools = { path = "../../../substrate/frame/nomination-pools", default-features = false }
|
||||
pallet-offences = { path = "../../../substrate/frame/offences", default-features = false }
|
||||
pallet-preimage = { path = "../../../substrate/frame/preimage", default-features = false }
|
||||
pallet-proxy = { path = "../../../substrate/frame/proxy", default-features = false }
|
||||
pallet-ranked-collective = { path = "../../../substrate/frame/ranked-collective", default-features = false }
|
||||
pallet-recovery = { path = "../../../substrate/frame/recovery", default-features = false }
|
||||
pallet-referenda = { path = "../../../substrate/frame/referenda", default-features = false }
|
||||
pallet-scheduler = { path = "../../../substrate/frame/scheduler", default-features = false }
|
||||
pallet-session = { path = "../../../substrate/frame/session", default-features = false }
|
||||
pallet-society = { path = "../../../substrate/frame/society", default-features = false }
|
||||
frame-support = { path = "../../../substrate/frame/support", default-features = false }
|
||||
pallet-staking = { path = "../../../substrate/frame/staking", default-features = false }
|
||||
pallet-state-trie-migration = { path = "../../../substrate/frame/state-trie-migration", default-features = false }
|
||||
pallet-staking-runtime-api = { path = "../../../substrate/frame/staking/runtime-api", default-features = false }
|
||||
frame-system = { path = "../../../substrate/frame/system", default-features = false }
|
||||
frame-system-rpc-runtime-api = { path = "../../../substrate/frame/system/rpc/runtime-api", default-features = false }
|
||||
pallet-timestamp = { path = "../../../substrate/frame/timestamp", default-features = false }
|
||||
pallet-tips = { path = "../../../substrate/frame/tips", default-features = false }
|
||||
pallet-treasury = { path = "../../../substrate/frame/treasury", default-features = false }
|
||||
pallet-utility = { path = "../../../substrate/frame/utility", default-features = false }
|
||||
pallet-vesting = { path = "../../../substrate/frame/vesting", default-features = false }
|
||||
pallet-whitelist = { path = "../../../substrate/frame/whitelist", default-features = false }
|
||||
pallet-xcm = { path = "../../xcm/pallet-xcm", default-features = false }
|
||||
pallet-xcm-benchmarks = { path = "../../xcm/pallet-xcm-benchmarks", default-features = false, optional = true }
|
||||
frame-election-provider-support = { path = "../../../substrate/frame/election-provider-support", default-features = false }
|
||||
|
||||
frame-benchmarking = { path = "../../../substrate/frame/benchmarking", default-features = false, optional = true }
|
||||
frame-try-runtime = { path = "../../../substrate/frame/try-runtime", default-features = false, optional = true }
|
||||
pallet-offences-benchmarking = { path = "../../../substrate/frame/offences/benchmarking", default-features = false, optional = true }
|
||||
pallet-session-benchmarking = { path = "../../../substrate/frame/session/benchmarking", default-features = false, optional = true }
|
||||
pallet-nomination-pools-benchmarking = { path = "../../../substrate/frame/nomination-pools/benchmarking", default-features = false, optional = true }
|
||||
frame-system-benchmarking = { path = "../../../substrate/frame/system/benchmarking", default-features = false, optional = true }
|
||||
pallet-election-provider-support-benchmarking = { path = "../../../substrate/frame/election-provider-support/benchmarking", default-features = false, optional = true }
|
||||
hex-literal = "0.4.1"
|
||||
|
||||
runtime-common = { package = "polkadot-runtime-common", path = "../common", default-features = false }
|
||||
runtime-parachains = { package = "polkadot-runtime-parachains", path = "../parachains", default-features = false }
|
||||
primitives = { package = "polkadot-primitives", path = "../../primitives", default-features = false }
|
||||
|
||||
xcm = { package = "staging-xcm", path = "../../xcm", default-features = false }
|
||||
xcm-executor = { package = "staging-xcm-executor", path = "../../xcm/xcm-executor", default-features = false }
|
||||
xcm-builder = { package = "staging-xcm-builder", path = "../../xcm/xcm-builder", default-features = false }
|
||||
|
||||
[dev-dependencies]
|
||||
tiny-keccak = { version = "2.0.2", features = ["keccak"] }
|
||||
keyring = { package = "sp-keyring", path = "../../../substrate/primitives/keyring" }
|
||||
sp-trie = { path = "../../../substrate/primitives/trie" }
|
||||
separator = "0.4.1"
|
||||
serde_json = "1.0.107"
|
||||
remote-externalities = { package = "frame-remote-externalities" , path = "../../../substrate/utils/frame/remote-externalities" }
|
||||
tokio = { version = "1.24.2", features = ["macros"] }
|
||||
sp-tracing = { path = "../../../substrate/primitives/tracing", default-features = false }
|
||||
|
||||
[build-dependencies]
|
||||
substrate-wasm-builder = { path = "../../../substrate/utils/wasm-builder" }
|
||||
|
||||
[features]
|
||||
default = [ "std" ]
|
||||
no_std = []
|
||||
only-staking = []
|
||||
std = [
|
||||
"authority-discovery-primitives/std",
|
||||
"babe-primitives/std",
|
||||
"beefy-primitives/std",
|
||||
"binary-merkle-tree/std",
|
||||
"bitvec/std",
|
||||
"block-builder-api/std",
|
||||
"frame-benchmarking?/std",
|
||||
"frame-election-provider-support/std",
|
||||
"frame-executive/std",
|
||||
"frame-support/std",
|
||||
"frame-system-benchmarking?/std",
|
||||
"frame-system-rpc-runtime-api/std",
|
||||
"frame-system/std",
|
||||
"frame-try-runtime/std",
|
||||
"inherents/std",
|
||||
"kusama-runtime-constants/std",
|
||||
"log/std",
|
||||
"offchain-primitives/std",
|
||||
"pallet-authority-discovery/std",
|
||||
"pallet-authorship/std",
|
||||
"pallet-babe/std",
|
||||
"pallet-bags-list/std",
|
||||
"pallet-balances/std",
|
||||
"pallet-beefy-mmr/std",
|
||||
"pallet-beefy/std",
|
||||
"pallet-bounties/std",
|
||||
"pallet-child-bounties/std",
|
||||
"pallet-collective/std",
|
||||
"pallet-conviction-voting/std",
|
||||
"pallet-democracy/std",
|
||||
"pallet-election-provider-multi-phase/std",
|
||||
"pallet-election-provider-support-benchmarking?/std",
|
||||
"pallet-elections-phragmen/std",
|
||||
"pallet-fast-unstake/std",
|
||||
"pallet-grandpa/std",
|
||||
"pallet-identity/std",
|
||||
"pallet-im-online/std",
|
||||
"pallet-indices/std",
|
||||
"pallet-membership/std",
|
||||
"pallet-message-queue/std",
|
||||
"pallet-mmr/std",
|
||||
"pallet-multisig/std",
|
||||
"pallet-nis/std",
|
||||
"pallet-nomination-pools-benchmarking?/std",
|
||||
"pallet-nomination-pools-runtime-api/std",
|
||||
"pallet-nomination-pools/std",
|
||||
"pallet-offences-benchmarking?/std",
|
||||
"pallet-offences/std",
|
||||
"pallet-preimage/std",
|
||||
"pallet-proxy/std",
|
||||
"pallet-ranked-collective/std",
|
||||
"pallet-recovery/std",
|
||||
"pallet-referenda/std",
|
||||
"pallet-scheduler/std",
|
||||
"pallet-session-benchmarking?/std",
|
||||
"pallet-session/std",
|
||||
"pallet-society/std",
|
||||
"pallet-staking-runtime-api/std",
|
||||
"pallet-staking/std",
|
||||
"pallet-state-trie-migration/std",
|
||||
"pallet-timestamp/std",
|
||||
"pallet-tips/std",
|
||||
"pallet-transaction-payment-rpc-runtime-api/std",
|
||||
"pallet-transaction-payment/std",
|
||||
"pallet-treasury/std",
|
||||
"pallet-utility/std",
|
||||
"pallet-vesting/std",
|
||||
"pallet-whitelist/std",
|
||||
"pallet-xcm-benchmarks?/std",
|
||||
"pallet-xcm/std",
|
||||
"parity-scale-codec/std",
|
||||
"primitives/std",
|
||||
"runtime-common/std",
|
||||
"runtime-parachains/std",
|
||||
"rustc-hex/std",
|
||||
"scale-info/std",
|
||||
"serde/std",
|
||||
"serde_derive",
|
||||
"sp-api/std",
|
||||
"sp-application-crypto/std",
|
||||
"sp-arithmetic/std",
|
||||
"sp-core/std",
|
||||
"sp-genesis-builder/std",
|
||||
"sp-io/std",
|
||||
"sp-mmr-primitives/std",
|
||||
"sp-npos-elections/std",
|
||||
"sp-runtime/std",
|
||||
"sp-session/std",
|
||||
"sp-staking/std",
|
||||
"sp-std/std",
|
||||
"sp-storage/std",
|
||||
"sp-tracing/std",
|
||||
"sp-version/std",
|
||||
"tx-pool-api/std",
|
||||
"xcm-builder/std",
|
||||
"xcm-executor/std",
|
||||
"xcm/std",
|
||||
]
|
||||
runtime-benchmarks = [
|
||||
"frame-benchmarking/runtime-benchmarks",
|
||||
"frame-election-provider-support/runtime-benchmarks",
|
||||
"frame-support/runtime-benchmarks",
|
||||
"frame-system-benchmarking/runtime-benchmarks",
|
||||
"frame-system/runtime-benchmarks",
|
||||
"pallet-babe/runtime-benchmarks",
|
||||
"pallet-bags-list/runtime-benchmarks",
|
||||
"pallet-balances/runtime-benchmarks",
|
||||
"pallet-bounties/runtime-benchmarks",
|
||||
"pallet-child-bounties/runtime-benchmarks",
|
||||
"pallet-collective/runtime-benchmarks",
|
||||
"pallet-conviction-voting/runtime-benchmarks",
|
||||
"pallet-democracy/runtime-benchmarks",
|
||||
"pallet-election-provider-multi-phase/runtime-benchmarks",
|
||||
"pallet-election-provider-support-benchmarking/runtime-benchmarks",
|
||||
"pallet-elections-phragmen/runtime-benchmarks",
|
||||
"pallet-fast-unstake/runtime-benchmarks",
|
||||
"pallet-grandpa/runtime-benchmarks",
|
||||
"pallet-identity/runtime-benchmarks",
|
||||
"pallet-im-online/runtime-benchmarks",
|
||||
"pallet-indices/runtime-benchmarks",
|
||||
"pallet-membership/runtime-benchmarks",
|
||||
"pallet-message-queue/runtime-benchmarks",
|
||||
"pallet-mmr/runtime-benchmarks",
|
||||
"pallet-multisig/runtime-benchmarks",
|
||||
"pallet-nis/runtime-benchmarks",
|
||||
"pallet-nomination-pools-benchmarking/runtime-benchmarks",
|
||||
"pallet-nomination-pools/runtime-benchmarks",
|
||||
"pallet-offences-benchmarking/runtime-benchmarks",
|
||||
"pallet-offences/runtime-benchmarks",
|
||||
"pallet-preimage/runtime-benchmarks",
|
||||
"pallet-proxy/runtime-benchmarks",
|
||||
"pallet-ranked-collective/runtime-benchmarks",
|
||||
"pallet-recovery/runtime-benchmarks",
|
||||
"pallet-referenda/runtime-benchmarks",
|
||||
"pallet-scheduler/runtime-benchmarks",
|
||||
"pallet-session-benchmarking/runtime-benchmarks",
|
||||
"pallet-society/runtime-benchmarks",
|
||||
"pallet-staking/runtime-benchmarks",
|
||||
"pallet-state-trie-migration/runtime-benchmarks",
|
||||
"pallet-timestamp/runtime-benchmarks",
|
||||
"pallet-tips/runtime-benchmarks",
|
||||
"pallet-treasury/runtime-benchmarks",
|
||||
"pallet-utility/runtime-benchmarks",
|
||||
"pallet-vesting/runtime-benchmarks",
|
||||
"pallet-whitelist/runtime-benchmarks",
|
||||
"pallet-xcm-benchmarks/runtime-benchmarks",
|
||||
"pallet-xcm/runtime-benchmarks",
|
||||
"primitives/runtime-benchmarks",
|
||||
"runtime-common/runtime-benchmarks",
|
||||
"runtime-parachains/runtime-benchmarks",
|
||||
"sp-runtime/runtime-benchmarks",
|
||||
"sp-staking/runtime-benchmarks",
|
||||
"xcm-builder/runtime-benchmarks",
|
||||
"xcm-executor/runtime-benchmarks",
|
||||
]
|
||||
try-runtime = [
|
||||
"frame-election-provider-support/try-runtime",
|
||||
"frame-executive/try-runtime",
|
||||
"frame-support/try-runtime",
|
||||
"frame-system/try-runtime",
|
||||
"frame-try-runtime",
|
||||
"frame-try-runtime/try-runtime",
|
||||
"pallet-authority-discovery/try-runtime",
|
||||
"pallet-authorship/try-runtime",
|
||||
"pallet-babe/try-runtime",
|
||||
"pallet-bags-list/try-runtime",
|
||||
"pallet-balances/try-runtime",
|
||||
"pallet-beefy-mmr/try-runtime",
|
||||
"pallet-beefy/try-runtime",
|
||||
"pallet-bounties/try-runtime",
|
||||
"pallet-child-bounties/try-runtime",
|
||||
"pallet-collective/try-runtime",
|
||||
"pallet-conviction-voting/try-runtime",
|
||||
"pallet-democracy/try-runtime",
|
||||
"pallet-election-provider-multi-phase/try-runtime",
|
||||
"pallet-elections-phragmen/try-runtime",
|
||||
"pallet-fast-unstake/try-runtime",
|
||||
"pallet-grandpa/try-runtime",
|
||||
"pallet-identity/try-runtime",
|
||||
"pallet-im-online/try-runtime",
|
||||
"pallet-indices/try-runtime",
|
||||
"pallet-membership/try-runtime",
|
||||
"pallet-message-queue/try-runtime",
|
||||
"pallet-mmr/try-runtime",
|
||||
"pallet-multisig/try-runtime",
|
||||
"pallet-nis/try-runtime",
|
||||
"pallet-nomination-pools/try-runtime",
|
||||
"pallet-offences/try-runtime",
|
||||
"pallet-preimage/try-runtime",
|
||||
"pallet-proxy/try-runtime",
|
||||
"pallet-ranked-collective/try-runtime",
|
||||
"pallet-recovery/try-runtime",
|
||||
"pallet-referenda/try-runtime",
|
||||
"pallet-scheduler/try-runtime",
|
||||
"pallet-session/try-runtime",
|
||||
"pallet-society/try-runtime",
|
||||
"pallet-staking/try-runtime",
|
||||
"pallet-state-trie-migration/try-runtime",
|
||||
"pallet-timestamp/try-runtime",
|
||||
"pallet-tips/try-runtime",
|
||||
"pallet-transaction-payment/try-runtime",
|
||||
"pallet-treasury/try-runtime",
|
||||
"pallet-utility/try-runtime",
|
||||
"pallet-vesting/try-runtime",
|
||||
"pallet-whitelist/try-runtime",
|
||||
"pallet-xcm/try-runtime",
|
||||
"runtime-common/try-runtime",
|
||||
"runtime-parachains/try-runtime",
|
||||
"sp-runtime/try-runtime",
|
||||
]
|
||||
|
||||
# A feature that should be enabled when the runtime should be build for on-chain
|
||||
# deployment. This will disable stuff that shouldn't be part of the on-chain wasm
|
||||
# to make it smaller like logging for example.
|
||||
on-chain-release-build = [ "sp-api/disable-logging" ]
|
||||
|
||||
# Set timing constants (e.g. session period) to faster versions to speed up testing.
|
||||
fast-runtime = []
|
||||
|
||||
runtime-metrics = [ "runtime-parachains/runtime-metrics", "sp-io/with-tracing" ]
|
||||
@@ -1,25 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Polkadot.
|
||||
|
||||
// Polkadot 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.
|
||||
|
||||
// Polkadot 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 Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use substrate_wasm_builder::WasmBuilder;
|
||||
|
||||
fn main() {
|
||||
WasmBuilder::new()
|
||||
.with_current_project()
|
||||
.import_memory()
|
||||
.export_heap_base()
|
||||
.build()
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
[package]
|
||||
name = "kusama-runtime-constants"
|
||||
version = "1.0.0"
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
||||
license.workspace = true
|
||||
|
||||
[dependencies]
|
||||
smallvec = "1.8.0"
|
||||
|
||||
frame-support = { path = "../../../../substrate/frame/support", default-features = false }
|
||||
primitives = { package = "polkadot-primitives", path = "../../../primitives", default-features = false }
|
||||
runtime-common = { package = "polkadot-runtime-common", path = "../../common", default-features = false }
|
||||
sp-runtime = { path = "../../../../substrate/primitives/runtime", default-features = false }
|
||||
sp-weights = { path = "../../../../substrate/primitives/weights", default-features = false }
|
||||
sp-core = { path = "../../../../substrate/primitives/core", default-features = false }
|
||||
|
||||
[features]
|
||||
default = [ "std" ]
|
||||
std = [
|
||||
"frame-support/std",
|
||||
"primitives/std",
|
||||
"runtime-common/std",
|
||||
"sp-core/std",
|
||||
"sp-runtime/std",
|
||||
"sp-weights/std",
|
||||
]
|
||||
@@ -1,128 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Polkadot.
|
||||
|
||||
// Polkadot 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.
|
||||
|
||||
// Polkadot 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 Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
pub mod weights;
|
||||
|
||||
/// Money matters.
|
||||
pub mod currency {
|
||||
use primitives::Balance;
|
||||
|
||||
/// The existential deposit.
|
||||
pub const EXISTENTIAL_DEPOSIT: Balance = 1 * CENTS;
|
||||
|
||||
pub const UNITS: Balance = 1_000_000_000_000;
|
||||
pub const QUID: Balance = UNITS / 30;
|
||||
pub const CENTS: Balance = QUID / 100;
|
||||
pub const GRAND: Balance = QUID * 1_000;
|
||||
pub const MILLICENTS: Balance = CENTS / 1_000;
|
||||
|
||||
pub const fn deposit(items: u32, bytes: u32) -> Balance {
|
||||
items as Balance * 2_000 * CENTS + (bytes as Balance) * 100 * MILLICENTS
|
||||
}
|
||||
}
|
||||
|
||||
/// Time and blocks.
|
||||
pub mod time {
|
||||
use primitives::{BlockNumber, Moment};
|
||||
use runtime_common::prod_or_fast;
|
||||
pub const MILLISECS_PER_BLOCK: Moment = 6000;
|
||||
pub const SLOT_DURATION: Moment = MILLISECS_PER_BLOCK;
|
||||
pub const EPOCH_DURATION_IN_SLOTS: BlockNumber = prod_or_fast!(1 * HOURS, 1 * MINUTES);
|
||||
|
||||
// These time units are defined in number of blocks.
|
||||
pub const MINUTES: BlockNumber = 60_000 / (MILLISECS_PER_BLOCK as BlockNumber);
|
||||
pub const HOURS: BlockNumber = MINUTES * 60;
|
||||
pub const DAYS: BlockNumber = HOURS * 24;
|
||||
pub const WEEKS: BlockNumber = DAYS * 7;
|
||||
|
||||
// 1 in 4 blocks (on average, not counting collisions) will be primary babe blocks.
|
||||
// The choice of is done in accordance to the slot duration and expected target
|
||||
// block time, for safely resisting network delays of maximum two seconds.
|
||||
// <https://research.web3.foundation/en/latest/polkadot/BABE/Babe/#6-practical-results>
|
||||
pub const PRIMARY_PROBABILITY: (u64, u64) = (1, 4);
|
||||
}
|
||||
|
||||
/// Fee-related.
|
||||
pub mod fee {
|
||||
use crate::weights::ExtrinsicBaseWeight;
|
||||
use frame_support::weights::{
|
||||
WeightToFeeCoefficient, WeightToFeeCoefficients, WeightToFeePolynomial,
|
||||
};
|
||||
use primitives::Balance;
|
||||
use smallvec::smallvec;
|
||||
pub use sp_runtime::Perbill;
|
||||
|
||||
/// The block saturation level. Fees will be updates based on this value.
|
||||
pub const TARGET_BLOCK_FULLNESS: Perbill = Perbill::from_percent(25);
|
||||
|
||||
/// Handles converting a weight scalar to a fee value, based on the scale and granularity of the
|
||||
/// node's balance type.
|
||||
///
|
||||
/// This should typically create a mapping between the following ranges:
|
||||
/// - [0, `MAXIMUM_BLOCK_WEIGHT`]
|
||||
/// - [Balance::min, Balance::max]
|
||||
///
|
||||
/// Yet, it can be used for any other sort of change to weight-fee. Some examples being:
|
||||
/// - Setting it to `0` will essentially disable the weight fee.
|
||||
/// - Setting it to `1` will cause the literal `#[weight = x]` values to be charged.
|
||||
pub struct WeightToFee;
|
||||
impl WeightToFeePolynomial for WeightToFee {
|
||||
type Balance = Balance;
|
||||
fn polynomial() -> WeightToFeeCoefficients<Self::Balance> {
|
||||
// in Kusama, extrinsic base weight (smallest non-zero weight) is mapped to 1/10 CENT:
|
||||
let p = super::currency::CENTS;
|
||||
let q = 10 * Balance::from(ExtrinsicBaseWeight::get().ref_time());
|
||||
smallvec![WeightToFeeCoefficient {
|
||||
degree: 1,
|
||||
negative: false,
|
||||
coeff_frac: Perbill::from_rational(p % q, q),
|
||||
coeff_integer: p / q,
|
||||
}]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::{
|
||||
currency::{CENTS, MILLICENTS},
|
||||
fee::WeightToFee,
|
||||
};
|
||||
use crate::weights::ExtrinsicBaseWeight;
|
||||
use frame_support::weights::WeightToFee as WeightToFeeT;
|
||||
use runtime_common::MAXIMUM_BLOCK_WEIGHT;
|
||||
|
||||
#[test]
|
||||
// Test that the fee for `MAXIMUM_BLOCK_WEIGHT` of weight has sane bounds.
|
||||
fn full_block_fee_is_correct() {
|
||||
// A full block should cost between 1,000 and 10,000 CENTS.
|
||||
let full_block = WeightToFee::weight_to_fee(&MAXIMUM_BLOCK_WEIGHT);
|
||||
assert!(full_block >= 1_000 * CENTS);
|
||||
assert!(full_block <= 10_000 * CENTS);
|
||||
}
|
||||
|
||||
#[test]
|
||||
// This function tests that the fee for `ExtrinsicBaseWeight` of weight is correct
|
||||
fn extrinsic_base_fee_is_correct() {
|
||||
// `ExtrinsicBaseWeight` should cost 1/10 of a CENT
|
||||
println!("Base: {}", ExtrinsicBaseWeight::get());
|
||||
let x = WeightToFee::weight_to_fee(&ExtrinsicBaseWeight::get());
|
||||
let y = CENTS / 10;
|
||||
assert!(x.max(y) - x.min(y) < MILLICENTS);
|
||||
}
|
||||
}
|
||||
@@ -1,81 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Polkadot.
|
||||
|
||||
// Polkadot 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.
|
||||
|
||||
// Polkadot 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 Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-06-19 (Y/M/D)
|
||||
//! HOSTNAME: `runner-e8ezs4ez-project-163-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//!
|
||||
//! SHORT-NAME: `block`, LONG-NAME: `BlockExecution`, RUNTIME: `Development`
|
||||
//! WARMUPS: `10`, REPEAT: `100`
|
||||
//! WEIGHT-PATH: `runtime/kusama/constants/src/weights/`
|
||||
//! WEIGHT-METRIC: `Average`, WEIGHT-MUL: `1.0`, WEIGHT-ADD: `0`
|
||||
|
||||
// Executed Command:
|
||||
// ./target/production/polkadot
|
||||
// benchmark
|
||||
// overhead
|
||||
// --chain=kusama-dev
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --weight-path=runtime/kusama/constants/src/weights/
|
||||
// --warmup=10
|
||||
// --repeat=100
|
||||
// --header=./file_header.txt
|
||||
|
||||
use sp_core::parameter_types;
|
||||
use sp_weights::{constants::WEIGHT_REF_TIME_PER_NANOS, Weight};
|
||||
|
||||
parameter_types! {
|
||||
/// Time to execute an empty block.
|
||||
/// Calculated by multiplying the *Average* with `1.0` and adding `0`.
|
||||
///
|
||||
/// Stats nanoseconds:
|
||||
/// Min, Max: 14_012_555, 15_267_251
|
||||
/// Average: 14_278_073
|
||||
/// Median: 14_244_231
|
||||
/// Std-Dev: 180701.37
|
||||
///
|
||||
/// Percentiles nanoseconds:
|
||||
/// 99th: 14_916_615
|
||||
/// 95th: 14_622_262
|
||||
/// 75th: 14_317_299
|
||||
pub const BlockExecutionWeight: Weight =
|
||||
Weight::from_parts(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(14_278_073), 0);
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod test_weights {
|
||||
use sp_weights::constants;
|
||||
|
||||
/// Checks that the weight exists and is sane.
|
||||
// NOTE: If this test fails but you are sure that the generated values are fine,
|
||||
// you can delete it.
|
||||
#[test]
|
||||
fn sane() {
|
||||
let w = super::BlockExecutionWeight::get();
|
||||
|
||||
// At least 100 µs.
|
||||
assert!(
|
||||
w.ref_time() >= 100u64 * constants::WEIGHT_REF_TIME_PER_MICROS,
|
||||
"Weight should be at least 100 µs."
|
||||
);
|
||||
// At most 50 ms.
|
||||
assert!(
|
||||
w.ref_time() <= 50u64 * constants::WEIGHT_REF_TIME_PER_MILLIS,
|
||||
"Weight should be at most 50 ms."
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,81 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Polkadot.
|
||||
|
||||
// Polkadot 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.
|
||||
|
||||
// Polkadot 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 Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-06-19 (Y/M/D)
|
||||
//! HOSTNAME: `runner-e8ezs4ez-project-163-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//!
|
||||
//! SHORT-NAME: `extrinsic`, LONG-NAME: `ExtrinsicBase`, RUNTIME: `Development`
|
||||
//! WARMUPS: `10`, REPEAT: `100`
|
||||
//! WEIGHT-PATH: `runtime/kusama/constants/src/weights/`
|
||||
//! WEIGHT-METRIC: `Average`, WEIGHT-MUL: `1.0`, WEIGHT-ADD: `0`
|
||||
|
||||
// Executed Command:
|
||||
// ./target/production/polkadot
|
||||
// benchmark
|
||||
// overhead
|
||||
// --chain=kusama-dev
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --weight-path=runtime/kusama/constants/src/weights/
|
||||
// --warmup=10
|
||||
// --repeat=100
|
||||
// --header=./file_header.txt
|
||||
|
||||
use sp_core::parameter_types;
|
||||
use sp_weights::{constants::WEIGHT_REF_TIME_PER_NANOS, Weight};
|
||||
|
||||
parameter_types! {
|
||||
/// Time to execute a NO-OP extrinsic, for example `System::remark`.
|
||||
/// Calculated by multiplying the *Average* with `1.0` and adding `0`.
|
||||
///
|
||||
/// Stats nanoseconds:
|
||||
/// Min, Max: 123_598, 126_451
|
||||
/// Average: 124_706
|
||||
/// Median: 124_675
|
||||
/// Std-Dev: 548.81
|
||||
///
|
||||
/// Percentiles nanoseconds:
|
||||
/// 99th: 126_070
|
||||
/// 95th: 125_605
|
||||
/// 75th: 125_041
|
||||
pub const ExtrinsicBaseWeight: Weight =
|
||||
Weight::from_parts(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(124_706), 0);
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod test_weights {
|
||||
use sp_weights::constants;
|
||||
|
||||
/// Checks that the weight exists and is sane.
|
||||
// NOTE: If this test fails but you are sure that the generated values are fine,
|
||||
// you can delete it.
|
||||
#[test]
|
||||
fn sane() {
|
||||
let w = super::ExtrinsicBaseWeight::get();
|
||||
|
||||
// At least 10 µs.
|
||||
assert!(
|
||||
w.ref_time() >= 10u64 * constants::WEIGHT_REF_TIME_PER_MICROS,
|
||||
"Weight should be at least 10 µs."
|
||||
);
|
||||
// At most 1 ms.
|
||||
assert!(
|
||||
w.ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS,
|
||||
"Weight should be at most 1 ms."
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
//! Expose the auto generated weight files.
|
||||
|
||||
pub mod block_weights;
|
||||
pub mod extrinsic_weights;
|
||||
pub mod paritydb_weights;
|
||||
pub mod rocksdb_weights;
|
||||
|
||||
pub use block_weights::BlockExecutionWeight;
|
||||
pub use extrinsic_weights::ExtrinsicBaseWeight;
|
||||
pub use paritydb_weights::constants::ParityDbWeight;
|
||||
pub use rocksdb_weights::constants::RocksDbWeight;
|
||||
@@ -1,63 +0,0 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
pub mod constants {
|
||||
use frame_support::{
|
||||
parameter_types,
|
||||
weights::{constants, RuntimeDbWeight},
|
||||
};
|
||||
|
||||
parameter_types! {
|
||||
/// `ParityDB` can be enabled with a feature flag, but is still experimental. These weights
|
||||
/// are available for brave runtime engineers who may want to try this out as default.
|
||||
pub const ParityDbWeight: RuntimeDbWeight = RuntimeDbWeight {
|
||||
read: 8_000 * constants::WEIGHT_REF_TIME_PER_NANOS,
|
||||
write: 50_000 * constants::WEIGHT_REF_TIME_PER_NANOS,
|
||||
};
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod test_db_weights {
|
||||
use super::constants::ParityDbWeight as W;
|
||||
use frame_support::weights::constants;
|
||||
|
||||
/// Checks that all weights exist and have sane values.
|
||||
// NOTE: If this test fails but you are sure that the generated values are fine,
|
||||
// you can delete it.
|
||||
#[test]
|
||||
fn sane() {
|
||||
// At least 1 µs.
|
||||
assert!(
|
||||
W::get().reads(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS,
|
||||
"Read weight should be at least 1 µs."
|
||||
);
|
||||
assert!(
|
||||
W::get().writes(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS,
|
||||
"Write weight should be at least 1 µs."
|
||||
);
|
||||
// At most 1 ms.
|
||||
assert!(
|
||||
W::get().reads(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS,
|
||||
"Read weight should be at most 1 ms."
|
||||
);
|
||||
assert!(
|
||||
W::get().writes(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS,
|
||||
"Write weight should be at most 1 ms."
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,63 +0,0 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
pub mod constants {
|
||||
use frame_support::{
|
||||
parameter_types,
|
||||
weights::{constants, RuntimeDbWeight},
|
||||
};
|
||||
|
||||
parameter_types! {
|
||||
/// By default, Substrate uses `RocksDB`, so this will be the weight used throughout
|
||||
/// the runtime.
|
||||
pub const RocksDbWeight: RuntimeDbWeight = RuntimeDbWeight {
|
||||
read: 25_000 * constants::WEIGHT_REF_TIME_PER_NANOS,
|
||||
write: 100_000 * constants::WEIGHT_REF_TIME_PER_NANOS,
|
||||
};
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod test_db_weights {
|
||||
use super::constants::RocksDbWeight as W;
|
||||
use frame_support::weights::constants;
|
||||
|
||||
/// Checks that all weights exist and have sane values.
|
||||
// NOTE: If this test fails but you are sure that the generated values are fine,
|
||||
// you can delete it.
|
||||
#[test]
|
||||
fn sane() {
|
||||
// At least 1 µs.
|
||||
assert!(
|
||||
W::get().reads(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS,
|
||||
"Read weight should be at least 1 µs."
|
||||
);
|
||||
assert!(
|
||||
W::get().writes(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS,
|
||||
"Write weight should be at least 1 µs."
|
||||
);
|
||||
// At most 1 ms.
|
||||
assert!(
|
||||
W::get().reads(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS,
|
||||
"Read weight should be at most 1 ms."
|
||||
);
|
||||
assert!(
|
||||
W::get().writes(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS,
|
||||
"Write weight should be at most 1 ms."
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,234 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Polkadot.
|
||||
|
||||
// Polkadot 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.
|
||||
|
||||
// Polkadot 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 Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated voter bag thresholds.
|
||||
//!
|
||||
//! Generated on 2021-07-05T14:34:44.453491278+00:00
|
||||
//! for the kusama runtime.
|
||||
|
||||
/// Existential weight for this runtime.
|
||||
#[cfg(any(test, feature = "std"))]
|
||||
#[allow(unused)]
|
||||
pub const EXISTENTIAL_WEIGHT: u64 = 33_333_333;
|
||||
|
||||
/// Constant ratio between bags for this runtime.
|
||||
#[cfg(any(test, feature = "std"))]
|
||||
#[allow(unused)]
|
||||
pub const CONSTANT_RATIO: f64 = 1.1455399939091000;
|
||||
|
||||
/// Upper thresholds delimiting the bag list.
|
||||
pub const THRESHOLDS: [u64; 200] = [
|
||||
33_333_333,
|
||||
38_184_666,
|
||||
43_742_062,
|
||||
50_108_281,
|
||||
57_401_040,
|
||||
65_755_187,
|
||||
75_325_197,
|
||||
86_288_026,
|
||||
98_846_385,
|
||||
113_232_487,
|
||||
129_712_342,
|
||||
148_590_675,
|
||||
170_216_561,
|
||||
194_989_878,
|
||||
223_368_704,
|
||||
255_877_784,
|
||||
293_118_235,
|
||||
335_778_661,
|
||||
384_647_885,
|
||||
440_629_536,
|
||||
504_758_756,
|
||||
578_221_342,
|
||||
662_375_673,
|
||||
758_777_824,
|
||||
869_210_344,
|
||||
995_715_212,
|
||||
1_140_631_598,
|
||||
1_306_639_114,
|
||||
1_496_807_363,
|
||||
1_714_652_697,
|
||||
1_964_203_240,
|
||||
2_250_073_368,
|
||||
2_577_549_032,
|
||||
2_952_685_502,
|
||||
3_382_419_332,
|
||||
3_874_696_621,
|
||||
4_438_619_944,
|
||||
5_084_616_664,
|
||||
5_824_631_742,
|
||||
6_672_348_610,
|
||||
7_643_442_186,
|
||||
8_755_868_715,
|
||||
10_030_197_794,
|
||||
11_489_992_720,
|
||||
13_162_246_190,
|
||||
15_077_879_420,
|
||||
17_272_313_899,
|
||||
19_786_126_359,
|
||||
22_665_799_069,
|
||||
25_964_579_327,
|
||||
29_743_464_044,
|
||||
34_072_327_620,
|
||||
39_031_213_974,
|
||||
44_711_816_618,
|
||||
51_219_174_136,
|
||||
58_673_612_428,
|
||||
67_212_969_623,
|
||||
76_995_144_813,
|
||||
88_201_017_720,
|
||||
101_037_793_302,
|
||||
115_742_833_124,
|
||||
132_588_044_352,
|
||||
151_884_907_519,
|
||||
173_990_236_034,
|
||||
199_312_773_927,
|
||||
228_320_753_830,
|
||||
261_550_554_952,
|
||||
299_616_621_127,
|
||||
343_222_822_341,
|
||||
393_175_469_814,
|
||||
450_398_225_296,
|
||||
515_949_180_262,
|
||||
591_040_420_815,
|
||||
677_060_440_060,
|
||||
775_599_812_382,
|
||||
888_480_604_352,
|
||||
1_017_790_066_098,
|
||||
1_165_919_226_119,
|
||||
1_335_607_103_187,
|
||||
1_529_991_352_850,
|
||||
1_752_666_285_025,
|
||||
2_007_749_325_472,
|
||||
2_299_957_150_072,
|
||||
2_634_692_899_685,
|
||||
3_018_146_088_258,
|
||||
3_457_407_051_560,
|
||||
3_960_598_052_785,
|
||||
4_537_023_469_264,
|
||||
5_197_341_837_346,
|
||||
5_953_762_936_697,
|
||||
6_820_273_558_240,
|
||||
7_812_896_130_365,
|
||||
8_949_984_985_591,
|
||||
10_252_565_745_880,
|
||||
11_744_724_102_088,
|
||||
13_454_051_176_370,
|
||||
15_412_153_702_632,
|
||||
17_655_238_458_639,
|
||||
20_224_781_756_373,
|
||||
23_168_296_370_008,
|
||||
26_540_210_082_583,
|
||||
30_402_872_096_348,
|
||||
34_827_705_916_070,
|
||||
39_896_530_022_963,
|
||||
45_703_070_759_499,
|
||||
52_354_695_399_464,
|
||||
59_974_397_449_015,
|
||||
68_703_070_888_447,
|
||||
78_702_115_407_088,
|
||||
90_156_420_804_069,
|
||||
103_277_785_738_759,
|
||||
118_308_834_046_123,
|
||||
135_527_501_032_588,
|
||||
155_252_172_707_386,
|
||||
177_847_572_977_594,
|
||||
203_731_507_665_501,
|
||||
233_382_590_050_230,
|
||||
267_349_090_784_630,
|
||||
306_259_075_829_029,
|
||||
350_832_019_859_793,
|
||||
401_892_109_893_305,
|
||||
460_383_485_119_292,
|
||||
527_387_694_739_404,
|
||||
604_143_696_619_511,
|
||||
692_070_766_545_736,
|
||||
792_794_741_693_469,
|
||||
908_178_083_570_703,
|
||||
1_040_354_316_321_961,
|
||||
1_191_767_477_182_765,
|
||||
1_365_217_308_553_008,
|
||||
1_563_911_027_324_411,
|
||||
1_791_522_628_715_580,
|
||||
2_052_260_821_186_860,
|
||||
2_350_946_848_602_280,
|
||||
2_693_103_638_628_474,
|
||||
3_085_057_925_791_037,
|
||||
3_534_057_237_519_885,
|
||||
4_048_403_906_342_940,
|
||||
4_637_608_586_213_668,
|
||||
5_312_566_111_603_995,
|
||||
6_085_756_951_128_531,
|
||||
6_971_477_980_728_040,
|
||||
7_986_106_843_580_624,
|
||||
9_148_404_784_952_770,
|
||||
10_479_863_561_632_778,
|
||||
12_005_102_840_561_012,
|
||||
13_752_325_434_854_380,
|
||||
15_753_838_794_879_048,
|
||||
18_046_652_397_130_688,
|
||||
20_673_162_077_088_732,
|
||||
23_681_933_959_870_064,
|
||||
27_128_602_484_145_260,
|
||||
31_076_899_124_450_156,
|
||||
35_599_830_833_736_348,
|
||||
40_781_029_996_443_328,
|
||||
46_716_300_853_732_512,
|
||||
53_515_390_995_440_424,
|
||||
61_304_020_674_959_928,
|
||||
70_226_207_470_596_936,
|
||||
80_446_929_278_126_800,
|
||||
92_155_174_875_271_168,
|
||||
105_567_438_465_310_176,
|
||||
120_931_722_816_550_704,
|
||||
138_532_125_018_688_464,
|
||||
158_694_089_650_123_072,
|
||||
181_790_426_491_212_160,
|
||||
208_248_204_055_475_872,
|
||||
238_556_646_405_290_848,
|
||||
273_276_179_270_092_192,
|
||||
313_048_792_736_563_520,
|
||||
358_609_912_124_694_080,
|
||||
410_801_996_551_064_960,
|
||||
470_590_116_626_953_088,
|
||||
539_079_799_334_522_496,
|
||||
617_537_470_046_187_776,
|
||||
707_413_869_675_350_912,
|
||||
810_370_879_959_114_368,
|
||||
928_312_252_892_475_904,
|
||||
1_063_418_812_524_189_696,
|
||||
1_218_188_780_021_782_528,
|
||||
1_395_483_967_646_286_592,
|
||||
1_598_582_695_797_773_824,
|
||||
1_831_240_411_607_374_592,
|
||||
2_097_759_129_958_809_600,
|
||||
2_403_066_980_955_773_440,
|
||||
2_752_809_334_727_236_096,
|
||||
3_153_453_188_536_351_744,
|
||||
3_612_406_746_388_564_480,
|
||||
4_138_156_402_255_148_032,
|
||||
4_740_423_659_834_265_600,
|
||||
5_430_344_890_413_097_984,
|
||||
6_220_677_252_688_132_096,
|
||||
7_126_034_582_154_840_064,
|
||||
8_163_157_611_837_691_904,
|
||||
9_351_223_520_943_572_992,
|
||||
10_712_200_535_224_332_288,
|
||||
12_271_254_135_873_939_456,
|
||||
14_057_212_388_066_050_048,
|
||||
16_103_098_993_404_108_800,
|
||||
18_446_744_073_709_551_615,
|
||||
];
|
||||
@@ -1,358 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Polkadot.
|
||||
|
||||
// Polkadot 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.
|
||||
|
||||
// Polkadot 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 Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Elements of governance concerning the Polkadot Fellowship. This is only a temporary arrangement
|
||||
//! since the Polkadot Fellowship belongs under the Polkadot Relay. However, that is not yet in
|
||||
//! place, so until then it will need to live here. Once it is in place and there exists a bridge
|
||||
//! between Polkadot/Kusama then this code can be removed.
|
||||
|
||||
use frame_support::traits::{MapSuccess, TryMapSuccess};
|
||||
use sp_arithmetic::traits::CheckedSub;
|
||||
use sp_runtime::{
|
||||
morph_types,
|
||||
traits::{ConstU16, Replace, TypedGet},
|
||||
};
|
||||
|
||||
use super::*;
|
||||
use crate::{DAYS, QUID};
|
||||
|
||||
parameter_types! {
|
||||
pub const AlarmInterval: BlockNumber = 1;
|
||||
pub const SubmissionDeposit: Balance = 0;
|
||||
pub const UndecidingTimeout: BlockNumber = 7 * DAYS;
|
||||
}
|
||||
|
||||
pub struct TracksInfo;
|
||||
impl pallet_referenda::TracksInfo<Balance, BlockNumber> for TracksInfo {
|
||||
type Id = u16;
|
||||
type RuntimeOrigin = <RuntimeOrigin as frame_support::traits::OriginTrait>::PalletsOrigin;
|
||||
fn tracks() -> &'static [(Self::Id, pallet_referenda::TrackInfo<Balance, BlockNumber>)] {
|
||||
static DATA: [(u16, pallet_referenda::TrackInfo<Balance, BlockNumber>); 10] = [
|
||||
(
|
||||
0u16,
|
||||
pallet_referenda::TrackInfo {
|
||||
name: "candidates",
|
||||
max_deciding: 10,
|
||||
decision_deposit: 100 * QUID,
|
||||
prepare_period: 30 * MINUTES,
|
||||
decision_period: 7 * DAYS,
|
||||
confirm_period: 30 * MINUTES,
|
||||
min_enactment_period: 1 * MINUTES,
|
||||
min_approval: pallet_referenda::Curve::LinearDecreasing {
|
||||
length: Perbill::from_percent(100),
|
||||
floor: Perbill::from_percent(50),
|
||||
ceil: Perbill::from_percent(100),
|
||||
},
|
||||
min_support: pallet_referenda::Curve::LinearDecreasing {
|
||||
length: Perbill::from_percent(100),
|
||||
floor: Perbill::from_percent(0),
|
||||
ceil: Perbill::from_percent(50),
|
||||
},
|
||||
},
|
||||
),
|
||||
(
|
||||
1u16,
|
||||
pallet_referenda::TrackInfo {
|
||||
name: "members",
|
||||
max_deciding: 10,
|
||||
decision_deposit: 10 * QUID,
|
||||
prepare_period: 30 * MINUTES,
|
||||
decision_period: 7 * DAYS,
|
||||
confirm_period: 30 * MINUTES,
|
||||
min_enactment_period: 1 * MINUTES,
|
||||
min_approval: pallet_referenda::Curve::LinearDecreasing {
|
||||
length: Perbill::from_percent(100),
|
||||
floor: Perbill::from_percent(50),
|
||||
ceil: Perbill::from_percent(100),
|
||||
},
|
||||
min_support: pallet_referenda::Curve::LinearDecreasing {
|
||||
length: Perbill::from_percent(100),
|
||||
floor: Perbill::from_percent(0),
|
||||
ceil: Perbill::from_percent(50),
|
||||
},
|
||||
},
|
||||
),
|
||||
(
|
||||
2u16,
|
||||
pallet_referenda::TrackInfo {
|
||||
name: "proficients",
|
||||
max_deciding: 10,
|
||||
decision_deposit: 10 * QUID,
|
||||
prepare_period: 30 * MINUTES,
|
||||
decision_period: 7 * DAYS,
|
||||
confirm_period: 30 * MINUTES,
|
||||
min_enactment_period: 1 * MINUTES,
|
||||
min_approval: pallet_referenda::Curve::LinearDecreasing {
|
||||
length: Perbill::from_percent(100),
|
||||
floor: Perbill::from_percent(50),
|
||||
ceil: Perbill::from_percent(100),
|
||||
},
|
||||
min_support: pallet_referenda::Curve::LinearDecreasing {
|
||||
length: Perbill::from_percent(100),
|
||||
floor: Perbill::from_percent(0),
|
||||
ceil: Perbill::from_percent(50),
|
||||
},
|
||||
},
|
||||
),
|
||||
(
|
||||
3u16,
|
||||
pallet_referenda::TrackInfo {
|
||||
name: "fellows",
|
||||
max_deciding: 10,
|
||||
decision_deposit: 10 * QUID,
|
||||
prepare_period: 30 * MINUTES,
|
||||
decision_period: 7 * DAYS,
|
||||
confirm_period: 30 * MINUTES,
|
||||
min_enactment_period: 1 * MINUTES,
|
||||
min_approval: pallet_referenda::Curve::LinearDecreasing {
|
||||
length: Perbill::from_percent(100),
|
||||
floor: Perbill::from_percent(50),
|
||||
ceil: Perbill::from_percent(100),
|
||||
},
|
||||
min_support: pallet_referenda::Curve::LinearDecreasing {
|
||||
length: Perbill::from_percent(100),
|
||||
floor: Perbill::from_percent(0),
|
||||
ceil: Perbill::from_percent(50),
|
||||
},
|
||||
},
|
||||
),
|
||||
(
|
||||
4u16,
|
||||
pallet_referenda::TrackInfo {
|
||||
name: "senior fellows",
|
||||
max_deciding: 10,
|
||||
decision_deposit: 10 * QUID,
|
||||
prepare_period: 30 * MINUTES,
|
||||
decision_period: 7 * DAYS,
|
||||
confirm_period: 30 * MINUTES,
|
||||
min_enactment_period: 1 * MINUTES,
|
||||
min_approval: pallet_referenda::Curve::LinearDecreasing {
|
||||
length: Perbill::from_percent(100),
|
||||
floor: Perbill::from_percent(50),
|
||||
ceil: Perbill::from_percent(100),
|
||||
},
|
||||
min_support: pallet_referenda::Curve::LinearDecreasing {
|
||||
length: Perbill::from_percent(100),
|
||||
floor: Perbill::from_percent(0),
|
||||
ceil: Perbill::from_percent(50),
|
||||
},
|
||||
},
|
||||
),
|
||||
(
|
||||
5u16,
|
||||
pallet_referenda::TrackInfo {
|
||||
name: "experts",
|
||||
max_deciding: 10,
|
||||
decision_deposit: 1 * QUID,
|
||||
prepare_period: 30 * MINUTES,
|
||||
decision_period: 7 * DAYS,
|
||||
confirm_period: 30 * MINUTES,
|
||||
min_enactment_period: 1 * MINUTES,
|
||||
min_approval: pallet_referenda::Curve::LinearDecreasing {
|
||||
length: Perbill::from_percent(100),
|
||||
floor: Perbill::from_percent(50),
|
||||
ceil: Perbill::from_percent(100),
|
||||
},
|
||||
min_support: pallet_referenda::Curve::LinearDecreasing {
|
||||
length: Perbill::from_percent(100),
|
||||
floor: Perbill::from_percent(0),
|
||||
ceil: Perbill::from_percent(50),
|
||||
},
|
||||
},
|
||||
),
|
||||
(
|
||||
6u16,
|
||||
pallet_referenda::TrackInfo {
|
||||
name: "senior experts",
|
||||
max_deciding: 10,
|
||||
decision_deposit: 1 * QUID,
|
||||
prepare_period: 30 * MINUTES,
|
||||
decision_period: 7 * DAYS,
|
||||
confirm_period: 30 * MINUTES,
|
||||
min_enactment_period: 1 * MINUTES,
|
||||
min_approval: pallet_referenda::Curve::LinearDecreasing {
|
||||
length: Perbill::from_percent(100),
|
||||
floor: Perbill::from_percent(50),
|
||||
ceil: Perbill::from_percent(100),
|
||||
},
|
||||
min_support: pallet_referenda::Curve::LinearDecreasing {
|
||||
length: Perbill::from_percent(100),
|
||||
floor: Perbill::from_percent(0),
|
||||
ceil: Perbill::from_percent(50),
|
||||
},
|
||||
},
|
||||
),
|
||||
(
|
||||
7u16,
|
||||
pallet_referenda::TrackInfo {
|
||||
name: "masters",
|
||||
max_deciding: 10,
|
||||
decision_deposit: 1 * QUID,
|
||||
prepare_period: 30 * MINUTES,
|
||||
decision_period: 7 * DAYS,
|
||||
confirm_period: 30 * MINUTES,
|
||||
min_enactment_period: 1 * MINUTES,
|
||||
min_approval: pallet_referenda::Curve::LinearDecreasing {
|
||||
length: Perbill::from_percent(100),
|
||||
floor: Perbill::from_percent(50),
|
||||
ceil: Perbill::from_percent(100),
|
||||
},
|
||||
min_support: pallet_referenda::Curve::LinearDecreasing {
|
||||
length: Perbill::from_percent(100),
|
||||
floor: Perbill::from_percent(0),
|
||||
ceil: Perbill::from_percent(50),
|
||||
},
|
||||
},
|
||||
),
|
||||
(
|
||||
8u16,
|
||||
pallet_referenda::TrackInfo {
|
||||
name: "senior masters",
|
||||
max_deciding: 10,
|
||||
decision_deposit: 1 * QUID,
|
||||
prepare_period: 30 * MINUTES,
|
||||
decision_period: 7 * DAYS,
|
||||
confirm_period: 30 * MINUTES,
|
||||
min_enactment_period: 1 * MINUTES,
|
||||
min_approval: pallet_referenda::Curve::LinearDecreasing {
|
||||
length: Perbill::from_percent(100),
|
||||
floor: Perbill::from_percent(50),
|
||||
ceil: Perbill::from_percent(100),
|
||||
},
|
||||
min_support: pallet_referenda::Curve::LinearDecreasing {
|
||||
length: Perbill::from_percent(100),
|
||||
floor: Perbill::from_percent(0),
|
||||
ceil: Perbill::from_percent(50),
|
||||
},
|
||||
},
|
||||
),
|
||||
(
|
||||
9u16,
|
||||
pallet_referenda::TrackInfo {
|
||||
name: "grand masters",
|
||||
max_deciding: 10,
|
||||
decision_deposit: 1 * QUID,
|
||||
prepare_period: 30 * MINUTES,
|
||||
decision_period: 7 * DAYS,
|
||||
confirm_period: 30 * MINUTES,
|
||||
min_enactment_period: 1 * MINUTES,
|
||||
min_approval: pallet_referenda::Curve::LinearDecreasing {
|
||||
length: Perbill::from_percent(100),
|
||||
floor: Perbill::from_percent(50),
|
||||
ceil: Perbill::from_percent(100),
|
||||
},
|
||||
min_support: pallet_referenda::Curve::LinearDecreasing {
|
||||
length: Perbill::from_percent(100),
|
||||
floor: Perbill::from_percent(0),
|
||||
ceil: Perbill::from_percent(50),
|
||||
},
|
||||
},
|
||||
),
|
||||
];
|
||||
&DATA[..]
|
||||
}
|
||||
fn track_for(id: &Self::RuntimeOrigin) -> Result<Self::Id, ()> {
|
||||
use super::origins::Origin;
|
||||
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
{
|
||||
// For benchmarks, we enable a root origin.
|
||||
// It is important that this is not available in production!
|
||||
let root: Self::RuntimeOrigin = frame_system::RawOrigin::Root.into();
|
||||
if &root == id {
|
||||
return Ok(9)
|
||||
}
|
||||
}
|
||||
|
||||
match Origin::try_from(id.clone()) {
|
||||
Ok(Origin::FellowshipInitiates) => Ok(0),
|
||||
Ok(Origin::Fellowship1Dan) => Ok(1),
|
||||
Ok(Origin::Fellowship2Dan) => Ok(2),
|
||||
Ok(Origin::Fellowship3Dan) | Ok(Origin::Fellows) => Ok(3),
|
||||
Ok(Origin::Fellowship4Dan) => Ok(4),
|
||||
Ok(Origin::Fellowship5Dan) | Ok(Origin::FellowshipExperts) => Ok(5),
|
||||
Ok(Origin::Fellowship6Dan) => Ok(6),
|
||||
Ok(Origin::Fellowship7Dan | Origin::FellowshipMasters) => Ok(7),
|
||||
Ok(Origin::Fellowship8Dan) => Ok(8),
|
||||
Ok(Origin::Fellowship9Dan) => Ok(9),
|
||||
_ => Err(()),
|
||||
}
|
||||
}
|
||||
}
|
||||
pallet_referenda::impl_tracksinfo_get!(TracksInfo, Balance, BlockNumber);
|
||||
|
||||
pub type FellowshipReferendaInstance = pallet_referenda::Instance2;
|
||||
|
||||
impl pallet_referenda::Config<FellowshipReferendaInstance> for Runtime {
|
||||
type WeightInfo = weights::pallet_referenda_fellowship_referenda::WeightInfo<Self>;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type Scheduler = Scheduler;
|
||||
type Currency = Balances;
|
||||
type SubmitOrigin =
|
||||
pallet_ranked_collective::EnsureMember<Runtime, FellowshipCollectiveInstance, 1>;
|
||||
type CancelOrigin = FellowshipExperts;
|
||||
type KillOrigin = FellowshipMasters;
|
||||
type Slash = Treasury;
|
||||
type Votes = pallet_ranked_collective::Votes;
|
||||
type Tally = pallet_ranked_collective::TallyOf<Runtime, FellowshipCollectiveInstance>;
|
||||
type SubmissionDeposit = SubmissionDeposit;
|
||||
type MaxQueued = ConstU32<100>;
|
||||
type UndecidingTimeout = UndecidingTimeout;
|
||||
type AlarmInterval = AlarmInterval;
|
||||
type Tracks = TracksInfo;
|
||||
type Preimages = Preimage;
|
||||
}
|
||||
|
||||
pub type FellowshipCollectiveInstance = pallet_ranked_collective::Instance1;
|
||||
|
||||
morph_types! {
|
||||
/// A `TryMorph` implementation to reduce a scalar by a particular amount, checking for
|
||||
/// underflow.
|
||||
pub type CheckedReduceBy<N: TypedGet>: TryMorph = |r: N::Type| -> Result<N::Type, ()> {
|
||||
r.checked_sub(&N::get()).ok_or(())
|
||||
} where N::Type: CheckedSub;
|
||||
}
|
||||
|
||||
impl pallet_ranked_collective::Config<FellowshipCollectiveInstance> for Runtime {
|
||||
type WeightInfo = weights::pallet_ranked_collective::WeightInfo<Self>;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
// Promotion is by any of:
|
||||
// - Root can demote arbitrarily.
|
||||
// - the FellowshipAdmin origin (i.e. token holder referendum);
|
||||
// - a vote by the rank *above* the new rank.
|
||||
type PromoteOrigin = EitherOf<
|
||||
frame_system::EnsureRootWithSuccess<Self::AccountId, ConstU16<65535>>,
|
||||
EitherOf<
|
||||
MapSuccess<FellowshipAdmin, Replace<ConstU16<9>>>,
|
||||
TryMapSuccess<origins::EnsureFellowship, CheckedReduceBy<ConstU16<1>>>,
|
||||
>,
|
||||
>;
|
||||
// Demotion is by any of:
|
||||
// - Root can demote arbitrarily.
|
||||
// - the FellowshipAdmin origin (i.e. token holder referendum);
|
||||
// - a vote by the rank two above the current rank.
|
||||
type DemoteOrigin = EitherOf<
|
||||
frame_system::EnsureRootWithSuccess<Self::AccountId, ConstU16<65535>>,
|
||||
EitherOf<
|
||||
MapSuccess<FellowshipAdmin, Replace<ConstU16<9>>>,
|
||||
TryMapSuccess<origins::EnsureFellowship, CheckedReduceBy<ConstU16<2>>>,
|
||||
>,
|
||||
>;
|
||||
type Polls = FellowshipReferenda;
|
||||
type MinRankOfClass = sp_runtime::traits::Identity;
|
||||
type VoteWeight = pallet_ranked_collective::Geometric;
|
||||
}
|
||||
@@ -1,93 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Polkadot.
|
||||
|
||||
// Polkadot 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.
|
||||
|
||||
// Polkadot 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 Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! New governance configurations for the Kusama runtime.
|
||||
|
||||
use super::*;
|
||||
use frame_support::{
|
||||
parameter_types,
|
||||
traits::{ConstU16, EitherOf},
|
||||
};
|
||||
use frame_system::EnsureRootWithSuccess;
|
||||
|
||||
mod origins;
|
||||
pub use origins::{
|
||||
pallet_custom_origins, AuctionAdmin, Fellows, FellowshipAdmin, FellowshipExperts,
|
||||
FellowshipInitiates, FellowshipMasters, GeneralAdmin, LeaseAdmin, ReferendumCanceller,
|
||||
ReferendumKiller, Spender, StakingAdmin, Treasurer, WhitelistedCaller,
|
||||
};
|
||||
mod tracks;
|
||||
pub use tracks::TracksInfo;
|
||||
mod fellowship;
|
||||
pub use fellowship::{FellowshipCollectiveInstance, FellowshipReferendaInstance};
|
||||
|
||||
parameter_types! {
|
||||
pub const VoteLockingPeriod: BlockNumber = 7 * DAYS;
|
||||
}
|
||||
|
||||
impl pallet_conviction_voting::Config for Runtime {
|
||||
type WeightInfo = weights::pallet_conviction_voting::WeightInfo<Self>;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type Currency = Balances;
|
||||
type VoteLockingPeriod = VoteLockingPeriod;
|
||||
type MaxVotes = ConstU32<512>;
|
||||
type MaxTurnout =
|
||||
frame_support::traits::tokens::currency::ActiveIssuanceOf<Balances, Self::AccountId>;
|
||||
type Polls = Referenda;
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
pub const AlarmInterval: BlockNumber = 1;
|
||||
pub const SubmissionDeposit: Balance = 1 * QUID;
|
||||
pub const UndecidingTimeout: BlockNumber = 14 * DAYS;
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
pub const MaxBalance: Balance = Balance::max_value();
|
||||
}
|
||||
pub type TreasurySpender = EitherOf<EnsureRootWithSuccess<AccountId, MaxBalance>, Spender>;
|
||||
|
||||
impl origins::pallet_custom_origins::Config for Runtime {}
|
||||
|
||||
impl pallet_whitelist::Config for Runtime {
|
||||
type WeightInfo = weights::pallet_whitelist::WeightInfo<Self>;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type WhitelistOrigin =
|
||||
EitherOf<EnsureRootWithSuccess<Self::AccountId, ConstU16<65535>>, Fellows>;
|
||||
type DispatchWhitelistedOrigin = EitherOf<EnsureRoot<Self::AccountId>, WhitelistedCaller>;
|
||||
type Preimages = Preimage;
|
||||
}
|
||||
|
||||
impl pallet_referenda::Config for Runtime {
|
||||
type WeightInfo = weights::pallet_referenda_referenda::WeightInfo<Self>;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type Scheduler = Scheduler;
|
||||
type Currency = Balances;
|
||||
type SubmitOrigin = frame_system::EnsureSigned<AccountId>;
|
||||
type CancelOrigin = EitherOf<EnsureRoot<AccountId>, ReferendumCanceller>;
|
||||
type KillOrigin = EitherOf<EnsureRoot<AccountId>, ReferendumKiller>;
|
||||
type Slash = Treasury;
|
||||
type Votes = pallet_conviction_voting::VotesOf<Runtime>;
|
||||
type Tally = pallet_conviction_voting::TallyOf<Runtime>;
|
||||
type SubmissionDeposit = SubmissionDeposit;
|
||||
type MaxQueued = ConstU32<100>;
|
||||
type UndecidingTimeout = UndecidingTimeout;
|
||||
type AlarmInterval = AlarmInterval;
|
||||
type Tracks = TracksInfo;
|
||||
type Preimages = Preimage;
|
||||
}
|
||||
@@ -1,194 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Polkadot.
|
||||
|
||||
// Polkadot 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.
|
||||
|
||||
// Polkadot 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 Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Custom origins for governance interventions.
|
||||
|
||||
pub use pallet_custom_origins::*;
|
||||
|
||||
#[frame_support::pallet]
|
||||
pub mod pallet_custom_origins {
|
||||
use crate::{Balance, GRAND, QUID};
|
||||
use frame_support::pallet_prelude::*;
|
||||
|
||||
#[pallet::config]
|
||||
pub trait Config: frame_system::Config {}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(_);
|
||||
|
||||
#[derive(PartialEq, Eq, Clone, MaxEncodedLen, Encode, Decode, TypeInfo, RuntimeDebug)]
|
||||
#[pallet::origin]
|
||||
pub enum Origin {
|
||||
/// Origin for cancelling slashes.
|
||||
StakingAdmin,
|
||||
/// Origin for spending (any amount of) funds.
|
||||
Treasurer,
|
||||
/// Origin for managing the composition of the fellowship.
|
||||
FellowshipAdmin,
|
||||
/// Origin for managing the registrar and permissioned HRMP channel operations.
|
||||
GeneralAdmin,
|
||||
/// Origin for starting auctions.
|
||||
AuctionAdmin,
|
||||
/// Origin able to force slot leases.
|
||||
LeaseAdmin,
|
||||
/// Origin able to cancel referenda.
|
||||
ReferendumCanceller,
|
||||
/// Origin able to kill referenda.
|
||||
ReferendumKiller,
|
||||
/// Origin able to spend up to 1 KSM from the treasury at once.
|
||||
SmallTipper,
|
||||
/// Origin able to spend up to 5 KSM from the treasury at once.
|
||||
BigTipper,
|
||||
/// Origin able to spend up to 50 KSM from the treasury at once.
|
||||
SmallSpender,
|
||||
/// Origin able to spend up to 500 KSM from the treasury at once.
|
||||
MediumSpender,
|
||||
/// Origin able to spend up to 5,000 KSM from the treasury at once.
|
||||
BigSpender,
|
||||
/// Origin able to dispatch a whitelisted call.
|
||||
WhitelistedCaller,
|
||||
/// Origin commanded by any members of the Polkadot Fellowship (no Dan grade needed).
|
||||
FellowshipInitiates,
|
||||
/// Origin commanded by Polkadot Fellows (3rd Dan fellows or greater).
|
||||
Fellows,
|
||||
/// Origin commanded by Polkadot Experts (5th Dan fellows or greater).
|
||||
FellowshipExperts,
|
||||
/// Origin commanded by Polkadot Masters (7th Dan fellows of greater).
|
||||
FellowshipMasters,
|
||||
/// Origin commanded by rank 1 of the Polkadot Fellowship and with a success of 1.
|
||||
Fellowship1Dan,
|
||||
/// Origin commanded by rank 2 of the Polkadot Fellowship and with a success of 2.
|
||||
Fellowship2Dan,
|
||||
/// Origin commanded by rank 3 of the Polkadot Fellowship and with a success of 3.
|
||||
Fellowship3Dan,
|
||||
/// Origin commanded by rank 4 of the Polkadot Fellowship and with a success of 4.
|
||||
Fellowship4Dan,
|
||||
/// Origin commanded by rank 5 of the Polkadot Fellowship and with a success of 5.
|
||||
Fellowship5Dan,
|
||||
/// Origin commanded by rank 6 of the Polkadot Fellowship and with a success of 6.
|
||||
Fellowship6Dan,
|
||||
/// Origin commanded by rank 7 of the Polkadot Fellowship and with a success of 7.
|
||||
Fellowship7Dan,
|
||||
/// Origin commanded by rank 8 of the Polkadot Fellowship and with a success of 8.
|
||||
Fellowship8Dan,
|
||||
/// Origin commanded by rank 9 of the Polkadot Fellowship and with a success of 9.
|
||||
Fellowship9Dan,
|
||||
}
|
||||
|
||||
macro_rules! decl_unit_ensures {
|
||||
( $name:ident: $success_type:ty = $success:expr ) => {
|
||||
pub struct $name;
|
||||
impl<O: Into<Result<Origin, O>> + From<Origin>>
|
||||
EnsureOrigin<O> for $name
|
||||
{
|
||||
type Success = $success_type;
|
||||
fn try_origin(o: O) -> Result<Self::Success, O> {
|
||||
o.into().and_then(|o| match o {
|
||||
Origin::$name => Ok($success),
|
||||
r => Err(O::from(r)),
|
||||
})
|
||||
}
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
fn try_successful_origin() -> Result<O, ()> {
|
||||
Ok(O::from(Origin::$name))
|
||||
}
|
||||
}
|
||||
};
|
||||
( $name:ident ) => { decl_unit_ensures! { $name : () = () } };
|
||||
( $name:ident: $success_type:ty = $success:expr, $( $rest:tt )* ) => {
|
||||
decl_unit_ensures! { $name: $success_type = $success }
|
||||
decl_unit_ensures! { $( $rest )* }
|
||||
};
|
||||
( $name:ident, $( $rest:tt )* ) => {
|
||||
decl_unit_ensures! { $name }
|
||||
decl_unit_ensures! { $( $rest )* }
|
||||
};
|
||||
() => {}
|
||||
}
|
||||
decl_unit_ensures!(
|
||||
StakingAdmin,
|
||||
Treasurer,
|
||||
FellowshipAdmin,
|
||||
GeneralAdmin,
|
||||
AuctionAdmin,
|
||||
LeaseAdmin,
|
||||
ReferendumCanceller,
|
||||
ReferendumKiller,
|
||||
WhitelistedCaller,
|
||||
FellowshipInitiates: u16 = 0,
|
||||
Fellows: u16 = 3,
|
||||
FellowshipExperts: u16 = 5,
|
||||
FellowshipMasters: u16 = 7,
|
||||
);
|
||||
|
||||
macro_rules! decl_ensure {
|
||||
(
|
||||
$vis:vis type $name:ident: EnsureOrigin<Success = $success_type:ty> {
|
||||
$( $item:ident = $success:expr, )*
|
||||
}
|
||||
) => {
|
||||
$vis struct $name;
|
||||
impl<O: Into<Result<Origin, O>> + From<Origin>>
|
||||
EnsureOrigin<O> for $name
|
||||
{
|
||||
type Success = $success_type;
|
||||
fn try_origin(o: O) -> Result<Self::Success, O> {
|
||||
o.into().and_then(|o| match o {
|
||||
$(
|
||||
Origin::$item => Ok($success),
|
||||
)*
|
||||
r => Err(O::from(r)),
|
||||
})
|
||||
}
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
fn try_successful_origin() -> Result<O, ()> {
|
||||
// By convention the more privileged origins go later, so for greatest chance
|
||||
// of success, we want the last one.
|
||||
let _result: Result<O, ()> = Err(());
|
||||
$(
|
||||
let _result: Result<O, ()> = Ok(O::from(Origin::$item));
|
||||
)*
|
||||
_result
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
decl_ensure! {
|
||||
pub type Spender: EnsureOrigin<Success = Balance> {
|
||||
SmallTipper = 250 * QUID,
|
||||
BigTipper = 1 * GRAND,
|
||||
SmallSpender = 10 * GRAND,
|
||||
MediumSpender = 100 * GRAND,
|
||||
BigSpender = 1_000 * GRAND,
|
||||
Treasurer = 10_000 * GRAND,
|
||||
}
|
||||
}
|
||||
|
||||
decl_ensure! {
|
||||
pub type EnsureFellowship: EnsureOrigin<Success = u16> {
|
||||
Fellowship1Dan = 1,
|
||||
Fellowship2Dan = 2,
|
||||
Fellowship3Dan = 3,
|
||||
Fellowship4Dan = 4,
|
||||
Fellowship5Dan = 5,
|
||||
Fellowship6Dan = 6,
|
||||
Fellowship7Dan = 7,
|
||||
Fellowship8Dan = 8,
|
||||
Fellowship9Dan = 9,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,320 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Polkadot.
|
||||
|
||||
// Polkadot 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.
|
||||
|
||||
// Polkadot 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 Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Track configurations for governance.
|
||||
|
||||
use super::*;
|
||||
|
||||
const fn percent(x: i32) -> sp_arithmetic::FixedI64 {
|
||||
sp_arithmetic::FixedI64::from_rational(x as u128, 100)
|
||||
}
|
||||
use pallet_referenda::Curve;
|
||||
const APP_ROOT: Curve = Curve::make_reciprocal(4, 28, percent(80), percent(50), percent(100));
|
||||
const SUP_ROOT: Curve = Curve::make_linear(28, 28, percent(0), percent(50));
|
||||
const APP_STAKING_ADMIN: Curve = Curve::make_linear(17, 28, percent(50), percent(100));
|
||||
const SUP_STAKING_ADMIN: Curve =
|
||||
Curve::make_reciprocal(12, 28, percent(1), percent(0), percent(50));
|
||||
const APP_TREASURER: Curve = Curve::make_reciprocal(4, 28, percent(80), percent(50), percent(100));
|
||||
const SUP_TREASURER: Curve = Curve::make_linear(28, 28, percent(0), percent(50));
|
||||
const APP_FELLOWSHIP_ADMIN: Curve = Curve::make_linear(17, 28, percent(50), percent(100));
|
||||
const SUP_FELLOWSHIP_ADMIN: Curve =
|
||||
Curve::make_reciprocal(12, 28, percent(1), percent(0), percent(50));
|
||||
const APP_GENERAL_ADMIN: Curve =
|
||||
Curve::make_reciprocal(4, 28, percent(80), percent(50), percent(100));
|
||||
const SUP_GENERAL_ADMIN: Curve =
|
||||
Curve::make_reciprocal(7, 28, percent(10), percent(0), percent(50));
|
||||
const APP_AUCTION_ADMIN: Curve =
|
||||
Curve::make_reciprocal(4, 28, percent(80), percent(50), percent(100));
|
||||
const SUP_AUCTION_ADMIN: Curve =
|
||||
Curve::make_reciprocal(7, 28, percent(10), percent(0), percent(50));
|
||||
const APP_LEASE_ADMIN: Curve = Curve::make_linear(17, 28, percent(50), percent(100));
|
||||
const SUP_LEASE_ADMIN: Curve = Curve::make_reciprocal(12, 28, percent(1), percent(0), percent(50));
|
||||
const APP_REFERENDUM_CANCELLER: Curve = Curve::make_linear(17, 28, percent(50), percent(100));
|
||||
const SUP_REFERENDUM_CANCELLER: Curve =
|
||||
Curve::make_reciprocal(12, 28, percent(1), percent(0), percent(50));
|
||||
const APP_REFERENDUM_KILLER: Curve = Curve::make_linear(17, 28, percent(50), percent(100));
|
||||
const SUP_REFERENDUM_KILLER: Curve =
|
||||
Curve::make_reciprocal(12, 28, percent(1), percent(0), percent(50));
|
||||
const APP_SMALL_TIPPER: Curve = Curve::make_linear(10, 28, percent(50), percent(100));
|
||||
const SUP_SMALL_TIPPER: Curve = Curve::make_reciprocal(1, 28, percent(4), percent(0), percent(50));
|
||||
const APP_BIG_TIPPER: Curve = Curve::make_linear(10, 28, percent(50), percent(100));
|
||||
const SUP_BIG_TIPPER: Curve = Curve::make_reciprocal(8, 28, percent(1), percent(0), percent(50));
|
||||
const APP_SMALL_SPENDER: Curve = Curve::make_linear(17, 28, percent(50), percent(100));
|
||||
const SUP_SMALL_SPENDER: Curve =
|
||||
Curve::make_reciprocal(12, 28, percent(1), percent(0), percent(50));
|
||||
const APP_MEDIUM_SPENDER: Curve = Curve::make_linear(23, 28, percent(50), percent(100));
|
||||
const SUP_MEDIUM_SPENDER: Curve =
|
||||
Curve::make_reciprocal(16, 28, percent(1), percent(0), percent(50));
|
||||
const APP_BIG_SPENDER: Curve = Curve::make_linear(28, 28, percent(50), percent(100));
|
||||
const SUP_BIG_SPENDER: Curve = Curve::make_reciprocal(20, 28, percent(1), percent(0), percent(50));
|
||||
const APP_WHITELISTED_CALLER: Curve =
|
||||
Curve::make_reciprocal(16, 28 * 24, percent(96), percent(50), percent(100));
|
||||
const SUP_WHITELISTED_CALLER: Curve =
|
||||
Curve::make_reciprocal(1, 28, percent(20), percent(5), percent(50));
|
||||
|
||||
const TRACKS_DATA: [(u16, pallet_referenda::TrackInfo<Balance, BlockNumber>); 15] = [
|
||||
(
|
||||
0,
|
||||
pallet_referenda::TrackInfo {
|
||||
name: "root",
|
||||
max_deciding: 1,
|
||||
decision_deposit: 100 * GRAND,
|
||||
prepare_period: 2 * HOURS,
|
||||
decision_period: 14 * DAYS,
|
||||
confirm_period: 24 * HOURS,
|
||||
min_enactment_period: 24 * HOURS,
|
||||
min_approval: APP_ROOT,
|
||||
min_support: SUP_ROOT,
|
||||
},
|
||||
),
|
||||
(
|
||||
1,
|
||||
pallet_referenda::TrackInfo {
|
||||
name: "whitelisted_caller",
|
||||
max_deciding: 100,
|
||||
decision_deposit: 10 * GRAND,
|
||||
prepare_period: 30 * MINUTES,
|
||||
decision_period: 14 * DAYS,
|
||||
confirm_period: 10 * MINUTES,
|
||||
min_enactment_period: 10 * MINUTES,
|
||||
min_approval: APP_WHITELISTED_CALLER,
|
||||
min_support: SUP_WHITELISTED_CALLER,
|
||||
},
|
||||
),
|
||||
(
|
||||
10,
|
||||
pallet_referenda::TrackInfo {
|
||||
name: "staking_admin",
|
||||
max_deciding: 10,
|
||||
decision_deposit: 5 * GRAND,
|
||||
prepare_period: 2 * HOURS,
|
||||
decision_period: 14 * DAYS,
|
||||
confirm_period: 3 * HOURS,
|
||||
min_enactment_period: 10 * MINUTES,
|
||||
min_approval: APP_STAKING_ADMIN,
|
||||
min_support: SUP_STAKING_ADMIN,
|
||||
},
|
||||
),
|
||||
(
|
||||
11,
|
||||
pallet_referenda::TrackInfo {
|
||||
name: "treasurer",
|
||||
max_deciding: 10,
|
||||
decision_deposit: 1 * GRAND,
|
||||
prepare_period: 2 * HOURS,
|
||||
decision_period: 14 * DAYS,
|
||||
confirm_period: 3 * HOURS,
|
||||
min_enactment_period: 24 * HOURS,
|
||||
min_approval: APP_TREASURER,
|
||||
min_support: SUP_TREASURER,
|
||||
},
|
||||
),
|
||||
(
|
||||
12,
|
||||
pallet_referenda::TrackInfo {
|
||||
name: "lease_admin",
|
||||
max_deciding: 10,
|
||||
decision_deposit: 5 * GRAND,
|
||||
prepare_period: 2 * HOURS,
|
||||
decision_period: 14 * DAYS,
|
||||
confirm_period: 3 * HOURS,
|
||||
min_enactment_period: 10 * MINUTES,
|
||||
min_approval: APP_LEASE_ADMIN,
|
||||
min_support: SUP_LEASE_ADMIN,
|
||||
},
|
||||
),
|
||||
(
|
||||
13,
|
||||
pallet_referenda::TrackInfo {
|
||||
name: "fellowship_admin",
|
||||
max_deciding: 10,
|
||||
decision_deposit: 5 * GRAND,
|
||||
prepare_period: 2 * HOURS,
|
||||
decision_period: 14 * DAYS,
|
||||
confirm_period: 3 * HOURS,
|
||||
min_enactment_period: 10 * MINUTES,
|
||||
min_approval: APP_FELLOWSHIP_ADMIN,
|
||||
min_support: SUP_FELLOWSHIP_ADMIN,
|
||||
},
|
||||
),
|
||||
(
|
||||
14,
|
||||
pallet_referenda::TrackInfo {
|
||||
name: "general_admin",
|
||||
max_deciding: 10,
|
||||
decision_deposit: 5 * GRAND,
|
||||
prepare_period: 2 * HOURS,
|
||||
decision_period: 14 * DAYS,
|
||||
confirm_period: 3 * HOURS,
|
||||
min_enactment_period: 10 * MINUTES,
|
||||
min_approval: APP_GENERAL_ADMIN,
|
||||
min_support: SUP_GENERAL_ADMIN,
|
||||
},
|
||||
),
|
||||
(
|
||||
15,
|
||||
pallet_referenda::TrackInfo {
|
||||
name: "auction_admin",
|
||||
max_deciding: 10,
|
||||
decision_deposit: 5 * GRAND,
|
||||
prepare_period: 2 * HOURS,
|
||||
decision_period: 14 * DAYS,
|
||||
confirm_period: 3 * HOURS,
|
||||
min_enactment_period: 10 * MINUTES,
|
||||
min_approval: APP_AUCTION_ADMIN,
|
||||
min_support: SUP_AUCTION_ADMIN,
|
||||
},
|
||||
),
|
||||
(
|
||||
20,
|
||||
pallet_referenda::TrackInfo {
|
||||
name: "referendum_canceller",
|
||||
max_deciding: 1_000,
|
||||
decision_deposit: 10 * GRAND,
|
||||
prepare_period: 2 * HOURS,
|
||||
decision_period: 7 * DAYS,
|
||||
confirm_period: 3 * HOURS,
|
||||
min_enactment_period: 10 * MINUTES,
|
||||
min_approval: APP_REFERENDUM_CANCELLER,
|
||||
min_support: SUP_REFERENDUM_CANCELLER,
|
||||
},
|
||||
),
|
||||
(
|
||||
21,
|
||||
pallet_referenda::TrackInfo {
|
||||
name: "referendum_killer",
|
||||
max_deciding: 1_000,
|
||||
decision_deposit: 50 * GRAND,
|
||||
prepare_period: 2 * HOURS,
|
||||
decision_period: 14 * DAYS,
|
||||
confirm_period: 3 * HOURS,
|
||||
min_enactment_period: 10 * MINUTES,
|
||||
min_approval: APP_REFERENDUM_KILLER,
|
||||
min_support: SUP_REFERENDUM_KILLER,
|
||||
},
|
||||
),
|
||||
(
|
||||
30,
|
||||
pallet_referenda::TrackInfo {
|
||||
name: "small_tipper",
|
||||
max_deciding: 200,
|
||||
decision_deposit: 1 * QUID,
|
||||
prepare_period: 1 * MINUTES,
|
||||
decision_period: 7 * DAYS,
|
||||
confirm_period: 10 * MINUTES,
|
||||
min_enactment_period: 1 * MINUTES,
|
||||
min_approval: APP_SMALL_TIPPER,
|
||||
min_support: SUP_SMALL_TIPPER,
|
||||
},
|
||||
),
|
||||
(
|
||||
31,
|
||||
pallet_referenda::TrackInfo {
|
||||
name: "big_tipper",
|
||||
max_deciding: 100,
|
||||
decision_deposit: 10 * QUID,
|
||||
prepare_period: 10 * MINUTES,
|
||||
decision_period: 7 * DAYS,
|
||||
confirm_period: 1 * HOURS,
|
||||
min_enactment_period: 10 * MINUTES,
|
||||
min_approval: APP_BIG_TIPPER,
|
||||
min_support: SUP_BIG_TIPPER,
|
||||
},
|
||||
),
|
||||
(
|
||||
32,
|
||||
pallet_referenda::TrackInfo {
|
||||
name: "small_spender",
|
||||
max_deciding: 50,
|
||||
decision_deposit: 100 * QUID,
|
||||
prepare_period: 4 * HOURS,
|
||||
decision_period: 14 * DAYS,
|
||||
confirm_period: 12 * HOURS,
|
||||
min_enactment_period: 24 * HOURS,
|
||||
min_approval: APP_SMALL_SPENDER,
|
||||
min_support: SUP_SMALL_SPENDER,
|
||||
},
|
||||
),
|
||||
(
|
||||
33,
|
||||
pallet_referenda::TrackInfo {
|
||||
name: "medium_spender",
|
||||
max_deciding: 50,
|
||||
decision_deposit: 200 * QUID,
|
||||
prepare_period: 4 * HOURS,
|
||||
decision_period: 14 * DAYS,
|
||||
confirm_period: 24 * HOURS,
|
||||
min_enactment_period: 24 * HOURS,
|
||||
min_approval: APP_MEDIUM_SPENDER,
|
||||
min_support: SUP_MEDIUM_SPENDER,
|
||||
},
|
||||
),
|
||||
(
|
||||
34,
|
||||
pallet_referenda::TrackInfo {
|
||||
name: "big_spender",
|
||||
max_deciding: 50,
|
||||
decision_deposit: 400 * QUID,
|
||||
prepare_period: 4 * HOURS,
|
||||
decision_period: 14 * DAYS,
|
||||
confirm_period: 48 * HOURS,
|
||||
min_enactment_period: 24 * HOURS,
|
||||
min_approval: APP_BIG_SPENDER,
|
||||
min_support: SUP_BIG_SPENDER,
|
||||
},
|
||||
),
|
||||
];
|
||||
|
||||
pub struct TracksInfo;
|
||||
impl pallet_referenda::TracksInfo<Balance, BlockNumber> for TracksInfo {
|
||||
type Id = u16;
|
||||
type RuntimeOrigin = <RuntimeOrigin as frame_support::traits::OriginTrait>::PalletsOrigin;
|
||||
fn tracks() -> &'static [(Self::Id, pallet_referenda::TrackInfo<Balance, BlockNumber>)] {
|
||||
&TRACKS_DATA[..]
|
||||
}
|
||||
fn track_for(id: &Self::RuntimeOrigin) -> Result<Self::Id, ()> {
|
||||
if let Ok(system_origin) = frame_system::RawOrigin::try_from(id.clone()) {
|
||||
match system_origin {
|
||||
frame_system::RawOrigin::Root => Ok(0),
|
||||
_ => Err(()),
|
||||
}
|
||||
} else if let Ok(custom_origin) = origins::Origin::try_from(id.clone()) {
|
||||
match custom_origin {
|
||||
origins::Origin::WhitelistedCaller => Ok(1),
|
||||
// General admin
|
||||
origins::Origin::StakingAdmin => Ok(10),
|
||||
origins::Origin::Treasurer => Ok(11),
|
||||
origins::Origin::LeaseAdmin => Ok(12),
|
||||
origins::Origin::FellowshipAdmin => Ok(13),
|
||||
origins::Origin::GeneralAdmin => Ok(14),
|
||||
origins::Origin::AuctionAdmin => Ok(15),
|
||||
// Referendum admins
|
||||
origins::Origin::ReferendumCanceller => Ok(20),
|
||||
origins::Origin::ReferendumKiller => Ok(21),
|
||||
// Limited treasury spenders
|
||||
origins::Origin::SmallTipper => Ok(30),
|
||||
origins::Origin::BigTipper => Ok(31),
|
||||
origins::Origin::SmallSpender => Ok(32),
|
||||
origins::Origin::MediumSpender => Ok(33),
|
||||
origins::Origin::BigSpender => Ok(34),
|
||||
_ => Err(()),
|
||||
}
|
||||
} else {
|
||||
Err(())
|
||||
}
|
||||
}
|
||||
}
|
||||
pallet_referenda::impl_tracksinfo_get!(TracksInfo, Balance, BlockNumber);
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,312 +0,0 @@
|
||||
// This file is part of Polkadot.
|
||||
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
use super::*;
|
||||
use hex_literal::hex;
|
||||
use pallet_society::migrations::from_raw_past_payouts;
|
||||
|
||||
parameter_types! {
|
||||
pub PastPayouts: Vec<(AccountId, Balance)> = from_raw_past_payouts::<Runtime, ()>(vec![
|
||||
(hex!["04152389a92e4356ed03ed30625afba062b9c4496116cba888e89f347834a31e"], 89000000000000u128),
|
||||
(hex!["0483de2b96cd3756f05301eb1bca875166ae5be67a81f86a1dad152bccad6909"], 54666600000000u128),
|
||||
(hex!["048a62b89589f7573c5f80584de850b9c8bcd4cb7a8766948d3db713d8a57204"], 83000000000000u128),
|
||||
(hex!["060e1eacd9f4460ae43b28d39e472078784482139e483307436344019a48f26e"], 15513300000000u128),
|
||||
(hex!["0ab0b61984dfcfe2fcb82147f0a2f00f992fa8a6b5ee81490387f8210a1ab678"], 6766666600u128),
|
||||
(hex!["0c6e31c65ee1e82129879a145eb0c0d4de45e60c3dcab1d2219628cd70673a6b"], 69000000000000u128),
|
||||
(hex!["10e9e630de91310a60b0bc7a4a2303a60b703afde9239750921514deb2655a0d"], 54333200000000u128),
|
||||
(hex!["162eb21266fef25e25eb8286994264450b8c80ccf2911967cc42ee4cc55c2061"], 14223300000000u128),
|
||||
(hex!["183f8c4d5084d96816ae7d82d44373b99bb134a16845d1589df4467671e3b56a"], 23333300000000u128),
|
||||
(hex!["18b2624ddf0eca6c9698496801dcda614580367a4d54833fe75bbf54a9a09966"], 52999900000000u128),
|
||||
(hex!["18b44d4c64c3aa3fb20d88b016a412d8f27000912fa7b350ed270ac8f55b3a27"], 5135000000000u128),
|
||||
(hex!["1aa23df47ab442adc15f6c923cfd0f6c4255b2cacc19538028685e37410a691f"], 54000000000000u128),
|
||||
(hex!["1ce0527c225ce227c1cceed0317eae0817bd600be3aa87489a704678c95a5451"], 41166600000000u128),
|
||||
(hex!["1e20318bd5c0bc44576955b7205354b8ed9c8e4a783ba9da70d5cee0e11b4740"], 11000000000000u128),
|
||||
(hex!["1e6fa8ff46b01fe3b8c52ea50a5ab61313ffac31393a28f621625840a6b3776d"], 11556600000000u128),
|
||||
(hex!["20243c6b74a5f83b89ec202a337bd06ebc985fe7b1557184bfd012dc9bc97873"], 13000000000000u128),
|
||||
(hex!["22cabf36e0954f0c013af666e27e46cb9a41f7a0db46ccec245f43b5ba438452"], 31000000000000u128),
|
||||
(hex!["24172a563943291c97d252def71e17abf467a1626bca358728a90a82b3de3118"], 200000000000000u128),
|
||||
(hex!["247f22a3073d04a85ab417505bb7667a5941ed74cfa596dfc7402813198a0560"], 68999000000000u128),
|
||||
(hex!["28250c422851313e923c89cc0a41fec2af80cc124290343ae250f77ff60d767d"], 6993300000000u128),
|
||||
(hex!["2c709012f807af8fc3f0d2abb0c51ca9a88d4ef24d1a092bf89dacf5ce63ea1d"], 333333333332u128),
|
||||
(hex!["305b27652a4dc8038c587df4cf1d7758b413fe18a97b3a3a5c7d609f50092e11"], 39000000000000u128),
|
||||
(hex!["3063796fb70f0bcde597bb7ed4d50f6ec7755686c894c7dbaa1ea2e33103876e"], 11650000000000u128),
|
||||
(hex!["325c848b9000d5430844bd5486d34d844acd89e11964ed1b535bf45557e1c87f"], 10666600000000u128),
|
||||
(hex!["3a632ab63a0ec92f1b67af756a49c8849f5722a345e54ef51cb294bef569070b"], 14993300000000u128),
|
||||
(hex!["3c97e1879015dfb64a367e0f0eb32f16968fb6be6a48da7de7776bc8953c854d"], 18149900000000u128),
|
||||
(hex!["3e8eb90cd422b7d72f166f135ed3db2137d0d9216e14cfdbd0ca75d2a18e2235"], 83000000000000u128),
|
||||
(hex!["3ea89a71ac11ea023bf42d9d6215a9d8c775e626a2ee38d574b297f42c58a622"], 15056500000000u128),
|
||||
(hex!["402d95c5f6d37ab03ecbec4628d290b2cc7571ff790ee5757b21bbcba4108924"], 12666600000000u128),
|
||||
(hex!["40300fe00bcfb90f3ded42dc082b775dd9a8a8ea491261a262a78155a069a268"], 112000000000000u128),
|
||||
(hex!["406855a4bb07710384d3876cf37cacbd66f2f1dab2346ebea130b00f63d0d317"], 83500000000000u128),
|
||||
(hex!["40c6e021d4d80b9b38d850b1c5334ea88b2bcc148d07e83f5be1b45b8ceb3740"], 9893300000000u128),
|
||||
(hex!["40f8a816b07bd23e166d2e479cfd5a3e5118f3937230ca5088eff9e33c84b552"], 12790000000000u128),
|
||||
(hex!["422286e0da2fb826f04e46d2f6ef1319a43412261d0f8d91274a81eee21af24e"], 69000000000000u128),
|
||||
(hex!["484a648ebe737d7dbee39d8e169d5ded94d29f70100e4d3ee87162c4a8bbdf73"], 2483300000000u128),
|
||||
(hex!["4c4a2f66cd9f5000968f0913f01ac1181ccd2db137d6af152252ee3de689450b"], 2000000000000u128),
|
||||
(hex!["505eb7820f60d0949697617b2f3366bd616d8c7e96724aa681e0113f6bf45c46"], 898900000000u128),
|
||||
(hex!["569f5ab70b93bb40ecb5a8888bbbc781c785ac3709863e9866422f0fd62f2477"], 8000000000000u128),
|
||||
(hex!["5c1be3d517926a6c194d42131d996140f3e8d7398764423cab176341b882ee7b"], 8490000000000u128),
|
||||
(hex!["5c32313c22eebc15ecf28ebb75ed8e264d53e50429a5ce09ed3a86e72732c56d"], 5000000000000u128),
|
||||
(hex!["5c436629095023be4d2ed2120002497bc18295fb485a11e83e529e617412626f"], 6999900000000u128),
|
||||
(hex!["5c81f3afd924f4cdd7c151d539c7abc3cd3de33eebd59403b81b568b8efa2d3b"], 15000000000000u128),
|
||||
(hex!["602d798e4d6f076cb28719b4bc757645ff0894a591173bd923bc8cb631fdeb0c"], 201660000000000u128),
|
||||
(hex!["621014fccda62dbd21d32b3628691f68cecafa887a62d641ba8876e3e7e4c068"], 8000000000000u128),
|
||||
(hex!["6613962cf897114a56ba84bbad47f52c46dc56960aae8ccfc71805cfc3fced19"], 32666600000000u128),
|
||||
(hex!["662ef2fa0d3a90f1f9691d05daee187d35fb17482cc72b3e03922358d0bdcc6f"], 10000000000000u128),
|
||||
(hex!["687b7e0289f5d116a2b68cf9d0496f62de37e579ea777ce39d81471c09ec142b"], 275000000000000u128),
|
||||
(hex!["688de40f61eb6ecc19b4c3702267c0bbf052ed9ee843ff6d346d765f89ed6067"], 7000000000000u128),
|
||||
(hex!["68fae6be10c90d572388d42129e074005005baf68d116a993073c5648ec78865"], 6356600000000u128),
|
||||
(hex!["6a8cafed3a670189545d5b242aec4d52bb4fe90f5af2f5984d8a14eb44713a70"], 12780000000000u128),
|
||||
(hex!["6c64f0ac3b73174aa0b0cd935b5576611e405c8485ef13a0be8bf2ea3a48da6f"], 8000000000000u128),
|
||||
(hex!["6eb31a06ff9d943b174f683f8327e3b4847a02e197e951f01ac7759b4c102f10"], 52333300000000u128),
|
||||
(hex!["6ed537e76f1ef68764d7544cd7a8be19cbaba2ef8af181090d281d80105fd963"], 175000000000000u128),
|
||||
(hex!["7241b3a590243df346a79a2d0ebf79dc990f07c1c499145d0424f3769ca4c826"], 81000000000000u128),
|
||||
(hex!["728ea7cd638962b92ec6405e7b5572b67cfbc96c7c2fc7becf4cddb22b50b02c"], 11890000000000u128),
|
||||
(hex!["7a91a646fd4d7592aabed6ad7f3c1d9f12371f200ae3d644454c80272b8e8c14"], 44000000000000u128),
|
||||
(hex!["7c9ae158bf660dbd429592d055efe4897fad8a07c4ed61accd1861380c5c3843"], 24666600000000u128),
|
||||
(hex!["7cb95b196a81bb0b7952e94ff0624b9b1429e81bee0f03c8bf2f3cea5213c611"], 5805000000000u128),
|
||||
(hex!["7ec0c61a682519e78e65026c51ceea52273870636814605a33518f02ad543317"], 6969600000000u128),
|
||||
(hex!["802c32932fca84ba9c80d57e4b0ebccc8404ee75a346ae0b50a17666bb38c01c"], 4986600000000u128),
|
||||
(hex!["806369b4f04792b7bd1a0d8586b7aa528591ba732362e3fb3d52d7b01e741b18"], 8660866667000u128),
|
||||
(hex!["80a551df4b4b67586a512356fc0e513d641e39f62172d185465dfee61e67143a"], 15160000000000u128),
|
||||
(hex!["821e24cd21f1da627bea7b7077d591b9c8a48f93dd87eb7f3f1ac4ec512f7b5f"], 7500000000000u128),
|
||||
(hex!["84c62d27805ac9c7a62086e31dfae23703ac9dfb37fbd31bec95aa611c5d2c33"], 999666600000000u128),
|
||||
(hex!["865facd74193d96f1b35a702efe05116e7be752d77f46c7fe4720905728ccb36"], 6993300000000u128),
|
||||
(hex!["88077737732044369dc52dd7f7bf400cfb493a219f013fbfdd46f7cd52673d6f"], 67666600000000u128),
|
||||
(hex!["8865278958eaaba42406d1ae16545267c944113c216fffc386edb4d6a8cffd36"], 5000000000000u128),
|
||||
(hex!["8ad06fa44a5669702a29b394424560714a1af90ad9efb57f3864b93b1ff7961c"], 100000000000u128),
|
||||
(hex!["8e7215d5218f170d0865fcbe16b2ceb752db7e7bfce3f3d487ecb60e776a2c36"], 39333200000000u128),
|
||||
(hex!["8ef7167c4d50be846c6a03591e13005fa68ef858d87321bb79428b121e105a11"], 9166600000000u128),
|
||||
(hex!["90bc6fc1133c3df447222e89b5ceaa028b69348ee381385239377b31df275248"], 15000000000000u128),
|
||||
(hex!["90da58a51d922ae69f27d8020d52e2fc71a5e5af1b63571bae81ddb87f8ff424"], 6696900000000u128),
|
||||
(hex!["92af8236baeef25f6e85ed30d85b758f5604c5c4c4c3637657fea1946a3da61b"], 13000000000000u128),
|
||||
(hex!["969fe4cba88544e8d3d71f31790cc1d377cf85a89e1b3d03e7a8b932aed1d312"], 84000000000000u128),
|
||||
(hex!["96be4635aeb775be58f3c0843bd8bc1832d257e56905525dcb3d38126d8f855e"], 12166600000000u128),
|
||||
(hex!["9822df7da6d3c119f5118587b29eaa30aaf00839e2a03161c2df4222a0d8744e"], 8999900000000u128),
|
||||
(hex!["9cb774a6051717a844657f0c037a93173f70afc000babd2f7f0be7d1e8475436"], 9000000000000u128),
|
||||
(hex!["9eb27cde65b09610cbe8a3d3b82c6730f5a5dd51aeb082fdd74236c4765a040a"], 8890000000000u128),
|
||||
(hex!["a0c6e8d74992d1ea3e43081624b2cddbd98b50d7a75998662ce6adbb2290aa64"], 175000000000000u128),
|
||||
(hex!["a2b8bfb3c0c1f04346134e7b27cb5b63de8a7af0d57c502d09c05ba7b3dd1e28"], 9326600000000u128),
|
||||
(hex!["a415a980463876c54b503c358613b5c02d8ac9781c13378797c54ab37fc07c05"], 8666600000000u128),
|
||||
(hex!["a48539457aa2e54048493ccaf980be18253d8cabd6eecd295e6b62e6a357352f"], 8879900000000u128),
|
||||
(hex!["a60b82ce304c28aad744e2a95924b3e1e560803a75e5a39fc91300556e9a9538"], 83499000000000u128),
|
||||
(hex!["a673009c77c4734fbc09f3bf505e3414282f714e89688ca3fa9292921cb7e51d"], 93000000000000u128),
|
||||
(hex!["a69f19b16dfdfb01b1d480c59512b0d589e600538cd9102de9619ef419211f1b"], 11993300000000u128),
|
||||
(hex!["aa17e09d3e9685a53d52d5123cc7f4f6f9fc7f3ab34f268a6f8860de68f2b612"], 15000000000000u128),
|
||||
(hex!["aa893ab408a0c0b8bb175ed7fa2b042e0fd30915e6ab8f66a9ac524e552d167f"], 11480000000000u128),
|
||||
(hex!["accd5106f4794d9052617617a993556b15c6e62859282bad7edb24592d728a69"], 94999000000000u128),
|
||||
(hex!["ae4bada5af908d3bddd0cb7e250d38da99cf9d6508a6b1118a89dc59fb372a4a"], 17000000000000u128),
|
||||
(hex!["b2012e8078883fdd9693d75c90bb669834f7b2c302def049e6eb486e56dc7365"], 13500000000000u128),
|
||||
(hex!["b2fa9763f56890cabe29a1ea971851a3234aecd03584c44f822e036fbd9c5156"], 8554600000000u128),
|
||||
(hex!["b8a750597d770430e4f9771829cf964825ea6750a6229deb06dc515371c7033f"], 96600000000u128),
|
||||
(hex!["ba8a15ff06ff808a77b93ad335884ac66e3744a5cea908f8b8a865d98a934541"], 21333300000000u128),
|
||||
(hex!["baf98d06056833e2e887c85c938aeb1c31dff74a91d35d9863327abc8ec93f4a"], 7500000000000u128),
|
||||
(hex!["c2487c00d0e309fdb96d1e0ed7bb2da173d777b3ae26b25c1369992add25972d"], 21000000000000u128),
|
||||
(hex!["c2fc6a3cc910e05c508c8b252f32c6df760858d12c6a636b256135e966edcf7e"], 9715500000000u128),
|
||||
(hex!["c443922426297f4ded0e635f0a92b8e31823b2e6893398b1e8351c34a728fe34"], 6493300000000u128),
|
||||
(hex!["c4f4760edf86fffa05380f31bf047c72837cccfc684d9dd9b1d7fa4e3503ce51"], 14500000000000u128),
|
||||
(hex!["c676a26c89e3be0451afa1126516b8f88b3da99511aba215ec99707ac5f08e3c"], 14833300000000u128),
|
||||
(hex!["d25af2fedd4eb672f218932fde44f97f10c1d7788efd0079957ffad4f186ae78"], 100000000000000u128),
|
||||
(hex!["d4610b986b4e4cb505ce0003142df98f803b7c3413acc9f7805992dc2a00483c"], 110000000000000u128),
|
||||
(hex!["d80cb19a68fb4ae325cd0209e8563cf3d5ff0368e2ede5530940f29371a02a25"], 19000000000000u128),
|
||||
(hex!["dc8f45881886ba4d2e2409ea49661b14a29a72e64d7a59d98465a9cee8084107"], 34666600000000u128),
|
||||
(hex!["de3898d3824e41435b6519f2095d25af51954af6be4a946d5d2df46df3ea264f"], 110000000000000u128),
|
||||
(hex!["e2094a5bcc479f2e6c83bfdbc88fe3658b817522ba1fb240f804b131ffa81600"], 41000000000000u128),
|
||||
(hex!["e27bc8259449251380d0b6c848cd607b12a09b0fa8fd8875ae3f6eea70c3fd69"], 1993300000000u128),
|
||||
(hex!["e45c09f0387a72f3a1eeb9e1a8f23feb738bc48d56d99ab88c8a910807c48a0c"], 18646600000000u128),
|
||||
(hex!["e62321ed84ec54791122f2ec72e9e36d3cb336ed358d6848a65b8410b405650a"], 9216100000000u128),
|
||||
(hex!["e80d8a511c20f08d8abbd69f1258fa27c28181ffa8fbee0989f706e7b6c48b21"], 9000000000000u128),
|
||||
(hex!["ea53405eb9054ddf0b6b82de940a4646c70cb815ba4c4616394fe0488030bb32"], 72333300000000u128),
|
||||
(hex!["eedfb6337bed7b15d7a0338820e8a4981d96fe7284e444885c7f478fe649012f"], 14566600000000u128),
|
||||
(hex!["f20f603b0314b04a4c3b295cbfc7b53c11370cc0349ddb3cd32c91c5b416fc51"], 7493300000000u128),
|
||||
(hex!["f4fa6e013f0a33b809b8c1dc8d73c1461407a474106f5def66c109a3d7c4f556"], 56666600000000u128),
|
||||
(hex!["faaede0e8cfb95d55e325e29a4737decb4a20960a525384003248c5610405b7d"], 1893300000000u128),
|
||||
(hex!["fae2f8b2e08e32c333e0332b4254119241c2f15421846b76b693eba714b3e571"], 20333300000000u128),
|
||||
(hex!["44152e29de73d969a8d5bc6d0b3497f31ee7e7f6e01722a5a91fccadd6bcce76"], 14900000000000u128),
|
||||
(hex!["4adb5df8ae7001c508d3e630deda167bce1760aa0e7c8544a1e3b70358ac3b45"], 15900000000000u128),
|
||||
(hex!["f04581f47bc54daf59437fe8a8e7e76ab3f034d8b30f3629652a6a013f7e0b38"], 13986600000000u128),
|
||||
(hex!["9c107fbcac10f60dc1910e27210283c39f8d5951816f8d7c8f5f96d0c71dbb29"], 26666666400u128),
|
||||
].into_iter());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn check_addresses() {
|
||||
use sp_core::{
|
||||
crypto::{AccountId32, Ss58Codec},
|
||||
hexdisplay::HexDisplay,
|
||||
};
|
||||
|
||||
let payouts: Vec<(&'static str, f64)> = vec![
|
||||
("CffzJo8UPWwvwPF73VcbEv4jSG4ckvGwNePL9V52hYh743X", 89f64),
|
||||
("CgEt8AwW9SThQXpLBAZy3MpKgNG7ZHaEDGeV5MLqHVPVoJg", 54.6666f64),
|
||||
("CgGpRVgE8WXd2hjc3GBVxGpnG9KpjkvEGNkM6AAaCBmhQY9", 83f64),
|
||||
("CiFzvmP1wyXB8nUHh6rA1j7tFQFBx2akg57TwdTGjRAXicm", 15.5133f64),
|
||||
("CpLVRWcUd7PxDPSmtXwQC3628dwEYiMd3GbqZTnqvphMN3B", 0.0067666666f64),
|
||||
("CrcpvEZP2Z82iYFUPConih1t46VFwttrX7Tv19NW6hoCzKG", 69f64),
|
||||
("CxVmQoEyZKimVp3eMgtNHSwiFrEU3gwF1NGNPBo2gUNSr1g", 54.3332f64),
|
||||
("D5QSdd589pFWeJm9bz1j3RTyy14ejKpnUKyEa4GBW9kYkVC", 14.2233f64),
|
||||
("D87YYjk4agajQXHr1VyiW1qpzfm5QV4L8bk7XduhimVVS7H", 23.3333f64),
|
||||
("D8hf8DjZ2eb8X6cyNAYx14fRa7hVUqB52ejx5YNc2ed81gC", 52.9999f64),
|
||||
("D8iEArcApNbkH9BxEvc2AfLLWMD1sWS9F2XdRXyY9J6QDpi", 5.135f64),
|
||||
("DBExZRq4qoK8xiZaHTR7iP9tWmQ8FL9JSQG8DLyLL8yV2J8", 54f64),
|
||||
("DEBVjNhPic2eVBw2y42xJpTJfCSvDXXA6ibs7MzpXp2s2hj", 41.1666f64),
|
||||
("DFpWz9jGga5ZKcRghQGchhMhSHURUcUc2TaT7dMB4pQhkeB", 11f64),
|
||||
("DGE8ATd2NaitqX4jdvZNXFNMmY9Qui6swnfoheCiz7efWGG", 11.5566f64),
|
||||
("DJTpC2pbDJeoJ2CTHSQBurbkbd9ZgkD2WYNDtCmJhem3swh", 13f64),
|
||||
("DMwNfM1mwrraAoSG3LSnZcwGzuUcKipqYmRsFeCuvTvrdgL", 31f64),
|
||||
("DPe86fQfixDTfejAiEJbRt2mvbtcGkWdGXsyCFDu37iKYVu", 200f64),
|
||||
("DQB1TYcr7dw4UsHaNbNhM2jtyYaoQQrBoWS7jLb95D39XGb", 68.999f64),
|
||||
("DUxSQ29BxeZWDXin4jZN7ogArgxJDohyeuKsqY83WqPhT4h", 6.9933f64),
|
||||
("DaViizibrmJZwyUchRMRebv5YMXadS4PbYBLuZhbfMTtxPm", 0f64),
|
||||
("Dab4bfYTZRUDMWjYAUQuFbDreQ9mt7nULWu3Dw7jodbzVe9", 0.333333333332f64),
|
||||
("DfitqjAjNxJykJYaigWQmSRw7T847hfytxwVRuAwscdtYUh", 39f64),
|
||||
("DfmNCWtsVSG9D8KWazZ84VdkSVgxot6989W1qL7bHEAP7SF", 11.65f64),
|
||||
("DiMPtqB6HeYpYkjJJKNR6btJjmUNeG8yyhSg1N8UL3st5Um", 10.6666f64),
|
||||
("Dikw9VJqJ4fJFcXuKaSqu3eSwBQM6zC8ja9rdAP3RbfeK1Y", 0f64),
|
||||
("Dtskg3rQsxSpxxBG4pJYjTujm9fo48Q7qnEYtBfJ6UDqtSS", 14.9933f64),
|
||||
("DwmWULE1g84ZMYyM4du8SmcQCkuz7VL7C6GmaWKoRXSG6vJ", 18.1499f64),
|
||||
("DzLtEdo7ScPi1o3izPETynSm9kdXJF8H1Y68b3eFbsQUgm6", 83f64),
|
||||
("DzUa9PynyTKBEJ9Yjk27o44aav9XaJG8p57YHKVNaorxbZu", 15.0565f64),
|
||||
("E2U89NfSnVCmY3hBQHEdJ9KV6shd6B8h4EWkNLcSJCPRAk8", 12.6666f64),
|
||||
("E2UrpeDCGs2mb9SZLzAk8E89yWaZncAvjFD5VnbYbDp44Xo", 112f64),
|
||||
("E2maNj3d7YZZhpeUwCGGeThD7JX2zk1W8AUQ1Rqb2K9oDBR", 83.5f64),
|
||||
("E3FfH6nbxCwQ9bg3oHAmBFpS3qEtWLbQ4QV8XUqn6qQaaab", 9.8933f64),
|
||||
("E3WSzAdgZtu3o8NjTJdwweJjpmSGwcf42pZAFDR7CsNTrrr", 12.79f64),
|
||||
("E52wAv1fTdLGUNR4CNSbeCmj1yNUeSFnj1CPKbRzTubt3YU", 69f64),
|
||||
("ED74i7eA79DtKFu5WXbcLXLWT2E1XSDEdJSAEkU3ePN7LE4", 2.4833f64),
|
||||
("EDQWMYr6a9aLjTbsMtKFAcoUsVA6qvm66RJsyJsNgbpxCFx", 0f64),
|
||||
("EJ4FuvmVpU7Ri2GRMtQVhhfHsHzGLYngbKJzJ58RkmRrzJm", 0f64),
|
||||
("EJMCExEPNyuq6EofbvwD2ErZKwuZCJVTFhiDcDwuW12c187", 2f64),
|
||||
("EPhV6vifCet2sJPPCNGnUZdRhsQpfcsbxRvDkjsMPPCCvwR", 0.8989f64),
|
||||
("EQ12pCgs4H3XHgDTc5n44xfXo6WNNkAg33b4aDFv3eUSgZd", 0f64),
|
||||
("EXtySo37DkJUdQb5425KGzUCG8ecYL4nVkcNB5XZpDQPH73", 8f64),
|
||||
("Ef6D2jpq92FoX8wSKihodFCg8juMjFu9CBnMwwBQDbYi4XU", 8.49f64),
|
||||
("EfCqHrWEwRnRq2ekmTmWvKzYwKtcgD4uaJAm3T92wx3ekUx", 5f64),
|
||||
("EfHwkqXCDup8Hi7DVWsPTDQoGiaW55HXgbQV3XzVSCEu1ii", 6.9999f64),
|
||||
("EfcXWwDMt9UoYhj6KRfEA4NLccsZK2eQ2AFpGw4EGatNwcj", 15f64),
|
||||
("EkRd7vCKiDZi6BM6tHKs5YAeGmE3MmQgChrrbtkRkf6SBwW", 201.66f64),
|
||||
("EntzFKky1rX9oYWzEiv4K4D997XGtCH9BHCmairrXhrW2gb", 8f64),
|
||||
("EtADjuauj4ETanscktz4jpejZdkCMVPnRxKos6AwgpzLdHM", 32.6666f64),
|
||||
("EtJMBiUVsHm3bwfMhWksQ14mv1P69BHjp7ELYDWdqXynR6K", 10f64),
|
||||
("EwKBYgaaELEEB5Vm9QAgArinAtps3dRUmb9bwBVTg5HqvxJ", 275f64),
|
||||
("EwQeYkCGQtBHMgKvNZ7NZ9Dy9tqKJDqN3DknJm5XF8czbYB", 7f64),
|
||||
("Ewy2kju7jdqBFbp95Nw1go31KyiMHS9rRVaevGkM62F1btd", 6.3566f64),
|
||||
("Ez2PN6BKn31byeQTrTBqP6MAv4WF7eKF3J8UXXxaaAd1Kuv", 12.78f64),
|
||||
("F2Sg6L8dTASXBz4rn9Rv4xsfaCKPn21pDzAX9HSAR8krMzR", 8f64),
|
||||
("F5TzLdntQpfz5RXcqCqJM4NKrjS7jVnAcNRKhu5FpLLWm2i", 52.3333f64),
|
||||
("F5e8A2i3XZvA5jZTYmwcUiHzVsoTAhJDgMxZEnsFe8dq2VA", 175f64),
|
||||
("FA8VcXg8Yzg9RvVrTdhcKk5JLSH1hcwrS9fr7pjFraCRWcm", 81f64),
|
||||
("FAXMVgYUWh6s2SFaX9h33mrjXXeq8HTcNwFHEy9D1eimrLK", 11.89f64),
|
||||
("FM2dJMRnBkbJDbdtqhRpLfgRbwJBkiw6iKT8u6UJ7pojypt", 44f64),
|
||||
("FPhTtxHSTKZM4fTndfgBSSXyTpdMkpEnqojAvGTS1c8hv9S", 24.6666f64),
|
||||
("FPrWyj8aDy3dofjmXZE5mx4o6Kf82MnEGGpjVEHjH7khReo", 5.805f64),
|
||||
("FSWpLozBJnXdVhE8t7LXYEpBybwse3S795WYFKiobhZWKVE", 6.9696f64),
|
||||
("FUNmzDNdzWtXK51EZmwbDJXQALhcYGCQUeo8E4rtcx9QBX7", 4.9866f64),
|
||||
("FUfBKr2pDxKrxmExGp4hjU6St4BDgffzKcyAqv6pruGnez1", 8.660866667f64),
|
||||
("FUzksiAhxzSvvPqiYvUEwK32rFf6Fmyug9GZEdbMaoLmwh5", 15.16f64),
|
||||
("FWvhQBV91wrvaqWiqDZfq4QPYYPFS28UV8zNgeJYyUexxXm", 7.5f64),
|
||||
("FaQi6AhM49SdjBd7oZJftAPE6tt9mrH8AdySztpYUU1B6Vq", 999.6666f64),
|
||||
("FcWMb9VtQutzQ5hxguyQrWKtN28zaXKuXLbL3D9oX6AJbiC", 6.9933f64),
|
||||
("FcxNWVy5RESDsErjwyZmPCW6Z8Y3fbfLzmou34YZTrbcraL", 0f64),
|
||||
("FegFL7hjGtjwRWvDMabMuPFGTzToioEWu4BLxjRxYPfvCpn", 67.6666f64),
|
||||
("FfA5YrMeaPzBYB4rE4JBuauXua6BEAQoJPTd8dRCLCdRdhM", 5f64),
|
||||
("FiL3XNxVpx5Cgnh4WPpPWms5Ed9tGqA44YEtHVDyPacHVGt", 0.1f64),
|
||||
("Fo6D1N9EjneyZYYPGxiW1WNKsj1S9Gx1nxcrMCkKGQ1bwDM", 39.3332f64),
|
||||
("Fomib3HNL24Cv6CbLJUf59yDF5shGFyDg8Wx7eGtmDdwrRF", 9.1666f64),
|
||||
("Fr6PbzHWKrTvmFJmiYy7MD1iaUpTKHN91VS5iQZZgo7BWCw", 15f64),
|
||||
("FrFGwHJKqLTyGDwqWfLgGYFDkjP12yAATQuh4oNpZMhpFzM", 6.6969f64),
|
||||
("Ft2cSCw4V47d2S7V9nN2S6V5ByGmAnkfbkFbWUVuHVuaMvW", 0f64),
|
||||
("FtG8FbxJXfDj6fcGp3eTL9tKJzkfqT9k8PREKXDgKmbnSDR", 0f64),
|
||||
("FteeR6d11cvmoRUmvoBeYYHNpMd5onPnpGy5PUcR6Vo7dJX", 13f64),
|
||||
("FypCVBt2MU61ZVL3N6mePXaUXrFX9nvGK6h5yqR89jc6JeW", 84f64),
|
||||
("FyyDvxKBmKr81HwQWtbugiFRiu2P1JpSqBDid56AfFevuTV", 12.1666f64),
|
||||
("G1o9z4HVf2pW7bbyKKNRP9MnmGEN4n7Ada3yJRpNzaiPoKd", 8.9999f64),
|
||||
("G7oV7X7FzJJ2g8TetMvAaC4GvM1ZCzPCnfSk5KcnVy2PJEF", 9f64),
|
||||
("GAQ75C8zHzVjWJLDH5PqFbLxfyck89wLJkhCzMZTXBFV5L7", 8.89f64),
|
||||
("GD8GVB4Ai4uCSzMCiX6C4vuY4DVkBctQRT6QMqD6y5mJfr9", 175f64),
|
||||
("GFgA4KV6Mm2TsHwEYtXfXZCf6QzebuN7c69UJGcRF2vCDTD", 9.3266f64),
|
||||
("GHTohCLUcLyB8w4xMr4TyDkvUzDnim6fadWfJ7edPke971d", 8.6666f64),
|
||||
("GJ2wraBjTtXH3m2TUxsVEc1bQdiuo6yiZUfczsws19uioX9", 8.8799f64),
|
||||
("GL2tM9Q6KL6XxMEWBg5jdjLezP4EzYsh3bqR1pjTmwDY1Mf", 83.499f64),
|
||||
("GLZdTryDdiHe3gVwFdncm2a6pKN6EiMxTGJQFHq5RxcNJZt", 93f64),
|
||||
("GLnjFi1U2jk6hDs7HCL1Y8XHsVLPHd2UAQh3AqRgpcUAUcn", 11.9933f64),
|
||||
("GRLkXUQUNqQMxKnNH1cM5TvWmu2H3yxGx9ohvJXSxRHUyJq", 15f64),
|
||||
("GRvRXw8jB2H9EGojmmjM4vZCeofuu91W2Zpbtr2QC5f7iLb", 11.48f64),
|
||||
("GUtkCnQKsVXzjqJvSZkiHtvdwZoEyukZrDE1iLTyV8F7tH6", 94.999f64),
|
||||
("GWrL9KsayVkniG2GmkYoTRDaFHhpTTSf6fL25e623bHVkRt", 17f64),
|
||||
("GbiPhuH4m4BCYiiLpqo2S2TyFxvgpfdSKWMdp9ZrbKdtXeM", 13.5f64),
|
||||
("GczUwD9zRdzJnTCr9kyREURmVeYpZAg1wNWrZMjqqimHcds", 8.5546f64),
|
||||
("GkS2m7UK6RSUkFiCHYPRtp8GCKdPtrBwP1wj7448gWoiut8", 0.0966f64),
|
||||
("Gnh63rW5fy3FAbnZQPkajyrQXxQGkg56Waoe2Ede1RjRjrJ", 0f64),
|
||||
("GnkMTVovNUith3JMaN5yvpuuwPzVeFbjM15wzg6LrAQSN6P", 0f64),
|
||||
("GnuSjJqE7VWMUGYsEEqsMioXwzNXfhu7FPMvdfKCiVazJwD", 21.3333f64),
|
||||
("GoUZE6g169BskxYVFV6prDUN4siKxa6Mr8VZD8B6TU9MEtX", 7.5f64),
|
||||
("Gy4LfGahVbR4eM8Sj2aCC4hHFk4fbUWGZCWQV5pjSGwJRZb", 21f64),
|
||||
("GyynnvzZzcJt24FQ6DNNg77Mgbfe8ddLdUiQG6nssoBVpmE", 9.7155f64),
|
||||
("H1eyZGi1DKxTGdtM8UQRA1RGEe6kGhvKC4onRpy97qKqiPE", 6.4933f64),
|
||||
("H2ZXJi5QAVB29d48oWgM1oBAmg2ngiofft4yEeyq58pViwt", 14.5f64),
|
||||
("H4YEv9v4DzU6WJsF2pxSHGcVxZEZDS761XWYsnRKX7P3aMQ", 14.8333f64),
|
||||
("H9eSvWe34vQDJAWckeTHWSqSChRat8bgKHG39GC1fjvEm7y", 0f64),
|
||||
("HJHs8fpzT916HTQgdGf6s69qp5zwNmZpTTnGXmm6qNqaQyW", 0f64),
|
||||
("HL8bEp8YicBdrUmJocCAWVLKUaR2dd1y6jnD934pbre3un1", 100f64),
|
||||
("HNnVpuhqgXRRDL8h4H39EgvvXtVYEtFSPi1XBWHcEW4cEYc", 110f64),
|
||||
("HTbdbMAMsFkUVeoMQ6pbH341DgQ1a4MpdCcaBu5N6uShJBq", 19f64),
|
||||
("HZWcWK1Px51bWgu1BD5d9M6A1djczFsdRWVwhVpRrU6VUJH", 34.6666f64),
|
||||
("Hbgxh54N33ApEZrpnYGhhvPJNYWD5LNprZodPVnSHq7QDDh", 110f64),
|
||||
("Hgh6jDVF9SXHs5pw6TfAXMWj4qHXpU6Q4dXh7h8zpx26cdw", 41f64),
|
||||
("HhH7NMA7FEkj327ZktSzkthknuQU591tLr1vX8zuc4E4JkB", 1.9933f64),
|
||||
("Hjjn1CmyGWKCswCmVZJFTFMJkruTtgeycEmvR4rWJYU7izQ", 18.6466f64),
|
||||
("HkRdC1w5XDvQQadAS2nL58mPRBCLyUCZAAiaV7DUWJgj7P8", 0f64),
|
||||
("Hn4y5xom4rBD49e2eMTpsEbqAJgE7uSR62VGLVv78ZqCuxT", 9.2161f64),
|
||||
("Hpaecetm5cBAJYDVqN9VeFUgVNQh3AAJAqUKAFW8PZGRst6", 9f64),
|
||||
("HsZTGLU5foma6bWoC7BGAs51aRu9TNc2RKRQBcfaHhJES1z", 72.3333f64),
|
||||
("HyXNSykBLZFMK8eAdys5L97ncetUhnStnLKMpuSp7kM9bCU", 14.5666f64),
|
||||
("J3hg1qmm6VeU6WWcxGQnKaMnD8wYAxnFQwaysE7RhVXbNvs", 7.4933f64),
|
||||
("J7XbTDFU4SRUaW6t6mYiK4tzDXtguhwa5ZK13EVCE5F2qak", 56.6666f64),
|
||||
("J9c2fcmRhhNaJAxA8yLMkxap7PEWuYc1UaaTqxunfKscjG3", 0f64),
|
||||
("JBfNxpntp7DaRM7pzg4XEm9TYX3gCaAVZvwgZW25ZzwXjy2", 0f64),
|
||||
("JEzQAbxmotcDNAXFFgcDcjgEF9gbuxaxer4bhGdKEfQqyRw", 0f64),
|
||||
("JF1SD3o1qZFdLBWmKTRHcHgBsXZRGGJhkwLeStYNoHs7ep1", 1.8933f64),
|
||||
("JFGuwWzqiyJZ3MPM8NRy7kK75MdxwSkh7GNZcsVd6BpZq2h", 20.3333f64),
|
||||
("D5WYdgC7f4W6jGCkQaQ3Lfe5P5F7JvfhYBAX9G6CBToMYe4", 0f64),
|
||||
("EJgdRddcYSd6XWnwr8oZkkzxJJX8SLwig38d5yxZSRgJGQZ", 0f64),
|
||||
("FXRK8xzufVJ45bCXuCCRr6FuS1dCfx9VjiuwqZDSqzEWgLm", 0f64),
|
||||
("Gt8ferkwFEX9jLbxpuhLYqKdNzP9KtjZcGYVN2mMbuCwhAP", 0f64),
|
||||
("HHCd33jjDBJJDZic7rbQZMuMaoe5ddYaRkaLf7tDURHpE56", 0f64),
|
||||
("E7b4mfFEhpnbw7iKdhvnBw7fXoQ1QFQE4TtTRhseWMU1H2E", 14.9000f64),
|
||||
("EGUE7VyrVLVSoaG43XVrEf3eKcgzJC8p3mFRtPUTMNLhdYs", 15.9000f64),
|
||||
("EtommijqrHDFWFvBxP515oUbkXx9vK2qohzrmwpCXbU7Yx2", 0f64),
|
||||
("GxzBsXcxZXXaKcLXj4CWGDdoCaXRVmcRkyiUAHFc1AfTMEV", 0f64),
|
||||
("H1heyw8DdkexFHAJ85GhuJr5om72Kx2DdK6sHsmb2f9ebUJ", 0f64),
|
||||
("J1Mf8RWcRWpuCRBAQVq6yRgb9exuHdKJdfV2NymtbXdkTF4", 13.9866f64),
|
||||
("FX6PCBQr4gtejvdR5dCdstrxmS3oFrzjZHtAKXSBumEse96", 0f64),
|
||||
("EdE26hU1nVmmVoteHWGKX8BuayykEg84iz7x3MCmzfocn2u", 0f64),
|
||||
("DzN3bMAAKKam6DBr9co4r1TBSj5X6Looh3JvNmfegiVrUgy", 0f64),
|
||||
("Dx2p54FSAxrqvFVN4ptvjV9LoUHkKQirM8SbLjD9PVnAonv", 0f64),
|
||||
("G6wtWujSHgT24UxXhDHVaVbnY5fBkUJLsjykyWBvtNs2aGQ", 0.0266666664f64),
|
||||
("DMrWWv31QiiDDESjGjyVcGhoCYMkPvrSTHHUDK5mR1riV2A", 0f64),
|
||||
("EkahQVDKRCe97ZT9TgS1YyfTzLgPah5PHa8NsfGFLsPKpjo", 0f64),
|
||||
("GhQ3gB8oaLZfjSd6gyeYZgymnJ2LEmvaUrSELBbva9342Y6", 0f64),
|
||||
];
|
||||
for (who, amount) in payouts.into_iter().filter(|&(_, amount)| amount > 0f64) {
|
||||
println!(
|
||||
"(hex![\"{}\"], {}u128),",
|
||||
HexDisplay::from(AsRef::<[u8; 32]>::as_ref(&AccountId32::from_string(who).unwrap())),
|
||||
(amount * 1_000_000_000_000f64).round() as u128,
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -1,177 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Polkadot.
|
||||
|
||||
// Polkadot 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.
|
||||
|
||||
// Polkadot 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 Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Tests for the Kusama Runtime Configuration
|
||||
|
||||
use crate::*;
|
||||
use frame_support::{
|
||||
dispatch::GetDispatchInfo, traits::WhitelistedStorageKeys, weights::WeightToFee as WeightToFeeT,
|
||||
};
|
||||
use keyring::Sr25519Keyring::Charlie;
|
||||
use pallet_transaction_payment::Multiplier;
|
||||
use parity_scale_codec::Encode;
|
||||
use runtime_common::MinimumMultiplier;
|
||||
use separator::Separatable;
|
||||
use sp_core::hexdisplay::HexDisplay;
|
||||
use sp_runtime::FixedPointNumber;
|
||||
use std::collections::HashSet;
|
||||
|
||||
#[test]
|
||||
fn nis_hold_reason_encoding_is_correct() {
|
||||
assert_eq!(RuntimeHoldReason::Nis(pallet_nis::HoldReason::NftReceipt).encode(), [38, 0]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn remove_keys_weight_is_sensible() {
|
||||
use runtime_common::crowdloan::WeightInfo;
|
||||
let max_weight = <Runtime as crowdloan::Config>::WeightInfo::refund(RemoveKeysLimit::get());
|
||||
// Max remove keys limit should be no more than half the total block weight.
|
||||
assert!((max_weight * 2).all_lt(BlockWeights::get().max_block));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn sample_size_is_sensible() {
|
||||
use runtime_common::auctions::WeightInfo;
|
||||
// Need to clean up all samples at the end of an auction.
|
||||
let samples: BlockNumber = EndingPeriod::get() / SampleLength::get();
|
||||
let max_weight: Weight = RocksDbWeight::get().reads_writes(samples.into(), samples.into());
|
||||
// Max sample cleanup should be no more than half the total block weight.
|
||||
assert!((max_weight * 2).all_lt(BlockWeights::get().max_block));
|
||||
assert!((<Runtime as auctions::Config>::WeightInfo::on_initialize() * 2)
|
||||
.all_lt(BlockWeights::get().max_block));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn payout_weight_portion() {
|
||||
use pallet_staking::WeightInfo;
|
||||
let payout_weight =
|
||||
<Runtime as pallet_staking::Config>::WeightInfo::payout_stakers_alive_staked(
|
||||
MaxNominatorRewardedPerValidator::get(),
|
||||
)
|
||||
.ref_time() as f64;
|
||||
let block_weight = BlockWeights::get().max_block.ref_time() as f64;
|
||||
|
||||
println!(
|
||||
"a full payout takes {:.2} of the block weight [{} / {}]",
|
||||
payout_weight / block_weight,
|
||||
payout_weight,
|
||||
block_weight
|
||||
);
|
||||
assert!(payout_weight * 2f64 < block_weight);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[ignore]
|
||||
fn block_cost() {
|
||||
let max_block_weight = BlockWeights::get().max_block;
|
||||
let raw_fee = WeightToFee::weight_to_fee(&max_block_weight);
|
||||
|
||||
println!(
|
||||
"Full Block weight == {} // WeightToFee(full_block) == {} plank",
|
||||
max_block_weight,
|
||||
raw_fee.separated_string(),
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[ignore]
|
||||
fn transfer_cost_min_multiplier() {
|
||||
let min_multiplier = MinimumMultiplier::get();
|
||||
let call = pallet_balances::Call::<Runtime>::transfer_keep_alive {
|
||||
dest: Charlie.to_account_id().into(),
|
||||
value: Default::default(),
|
||||
};
|
||||
let info = call.get_dispatch_info();
|
||||
// convert to outer call.
|
||||
let call = RuntimeCall::Balances(call);
|
||||
let len = call.using_encoded(|e| e.len()) as u32;
|
||||
|
||||
let mut ext = sp_io::TestExternalities::new_empty();
|
||||
let mut test_with_multiplier = |m| {
|
||||
ext.execute_with(|| {
|
||||
pallet_transaction_payment::NextFeeMultiplier::<Runtime>::put(m);
|
||||
let fee = TransactionPayment::compute_fee(len, &info, 0);
|
||||
println!(
|
||||
"weight = {:?} // multiplier = {:?} // full transfer fee = {:?}",
|
||||
info.weight.ref_time().separated_string(),
|
||||
pallet_transaction_payment::NextFeeMultiplier::<Runtime>::get(),
|
||||
fee.separated_string(),
|
||||
);
|
||||
});
|
||||
};
|
||||
|
||||
test_with_multiplier(min_multiplier);
|
||||
test_with_multiplier(Multiplier::saturating_from_rational(1, 1u128));
|
||||
test_with_multiplier(Multiplier::saturating_from_rational(1, 1_000u128));
|
||||
test_with_multiplier(Multiplier::saturating_from_rational(1, 1_000_000u128));
|
||||
test_with_multiplier(Multiplier::saturating_from_rational(1, 1_000_000_000u128));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn nominator_limit() {
|
||||
use pallet_election_provider_multi_phase::WeightInfo;
|
||||
// starting point of the nominators.
|
||||
let all_voters: u32 = 10_000;
|
||||
|
||||
// assuming we want around 5k candidates and 1k active validators.
|
||||
let all_targets: u32 = 5_000;
|
||||
let desired: u32 = 1_000;
|
||||
let weight_with = |active| {
|
||||
<Runtime as pallet_election_provider_multi_phase::Config>::WeightInfo::submit_unsigned(
|
||||
all_voters.max(active),
|
||||
all_targets,
|
||||
active,
|
||||
desired,
|
||||
)
|
||||
};
|
||||
|
||||
let mut active = 1;
|
||||
while weight_with(active).all_lte(OffchainSolutionWeightLimit::get()) || active == all_voters {
|
||||
active += 1;
|
||||
}
|
||||
|
||||
println!("can support {} nominators to yield a weight of {}", active, weight_with(active));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn call_size() {
|
||||
RuntimeCall::assert_size_under(256);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn check_whitelist() {
|
||||
let whitelist: HashSet<String> = AllPalletsWithSystem::whitelisted_storage_keys()
|
||||
.iter()
|
||||
.map(|e| HexDisplay::from(&e.key).to_string())
|
||||
.collect();
|
||||
|
||||
// Block number
|
||||
assert!(whitelist.contains("26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac"));
|
||||
// Total issuance
|
||||
assert!(whitelist.contains("c2261276cc9d1f8598ea4b6a74b15c2f57c875e4cff74148e4628f264b974c80"));
|
||||
// Execution phase
|
||||
assert!(whitelist.contains("26aa394eea5630e07c48ae0c9558cef7ff553b5a9862a516939d82b3d3d8661a"));
|
||||
// Event count
|
||||
assert!(whitelist.contains("26aa394eea5630e07c48ae0c9558cef70a98fdbe9ce6c55837576c60c7af3850"));
|
||||
// System events
|
||||
assert!(whitelist.contains("26aa394eea5630e07c48ae0c9558cef780d41e5e16056765bc8461851072c9d7"));
|
||||
// Configuration ActiveConfig
|
||||
assert!(whitelist.contains("06de3d8a54d27e44a9d5ce189618f22db4b49d95320d9021994c850f25b8e385"));
|
||||
// XcmPallet VersionDiscoveryQueue
|
||||
assert!(whitelist.contains("1405f2411d0af5a7ff397e7c9dc68d194a222ba0333561192e474c59ed8e30e1"));
|
||||
// XcmPallet SafeXcmVersion
|
||||
assert!(whitelist.contains("1405f2411d0af5a7ff397e7c9dc68d196323ae84c43568be0d1394d5d0d522c4"));
|
||||
}
|
||||
@@ -1,108 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Polkadot.
|
||||
|
||||
// Polkadot 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.
|
||||
|
||||
// Polkadot 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 Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `frame_benchmarking::baseline`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-06-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `runner-e8ezs4ez-project-163-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./target/production/polkadot
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=kusama-dev
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --no-storage-info
|
||||
// --no-median-slopes
|
||||
// --no-min-squares
|
||||
// --pallet=frame_benchmarking::baseline
|
||||
// --extrinsic=*
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --header=./file_header.txt
|
||||
// --output=./runtime/kusama/src/weights/frame_benchmarking_baseline.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 `frame_benchmarking::baseline`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> frame_benchmarking::baseline::WeightInfo for WeightInfo<T> {
|
||||
/// The range of component `i` is `[0, 1000000]`.
|
||||
fn addition(_i: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 173_000 picoseconds.
|
||||
Weight::from_parts(235_396, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
/// The range of component `i` is `[0, 1000000]`.
|
||||
fn subtraction(_i: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 177_000 picoseconds.
|
||||
Weight::from_parts(228_745, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
/// The range of component `i` is `[0, 1000000]`.
|
||||
fn multiplication(_i: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 178_000 picoseconds.
|
||||
Weight::from_parts(233_063, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
/// The range of component `i` is `[0, 1000000]`.
|
||||
fn division(_i: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 167_000 picoseconds.
|
||||
Weight::from_parts(224_853, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
fn hashing() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 23_298_471_000 picoseconds.
|
||||
Weight::from_parts(23_321_832_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
/// The range of component `i` is `[0, 100]`.
|
||||
fn sr25519_verification(i: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 228_000 picoseconds.
|
||||
Weight::from_parts(8_448_493, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
// Standard Error: 18_878
|
||||
.saturating_add(Weight::from_parts(55_611_437, 0).saturating_mul(i.into()))
|
||||
}
|
||||
}
|
||||
@@ -1,83 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Polkadot.
|
||||
|
||||
// Polkadot 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.
|
||||
|
||||
// Polkadot 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 Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `frame_election_provider_support`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-06-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `runner-e8ezs4ez-project-163-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./target/production/polkadot
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=kusama-dev
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --no-storage-info
|
||||
// --no-median-slopes
|
||||
// --no-min-squares
|
||||
// --pallet=frame_election_provider_support
|
||||
// --extrinsic=*
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --header=./file_header.txt
|
||||
// --output=./runtime/kusama/src/weights/
|
||||
|
||||
#![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 `frame_election_provider_support`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> frame_election_provider_support::WeightInfo for WeightInfo<T> {
|
||||
/// The range of component `v` is `[1000, 2000]`.
|
||||
/// The range of component `t` is `[500, 1000]`.
|
||||
/// The range of component `d` is `[5, 16]`.
|
||||
fn phragmen(v: u32, _t: u32, d: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 6_647_123_000 picoseconds.
|
||||
Weight::from_parts(6_809_648_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
// Standard Error: 139_689
|
||||
.saturating_add(Weight::from_parts(6_171_199, 0).saturating_mul(v.into()))
|
||||
// Standard Error: 14_281_333
|
||||
.saturating_add(Weight::from_parts(1_423_059_328, 0).saturating_mul(d.into()))
|
||||
}
|
||||
/// The range of component `v` is `[1000, 2000]`.
|
||||
/// The range of component `t` is `[500, 1000]`.
|
||||
/// The range of component `d` is `[5, 16]`.
|
||||
fn phragmms(v: u32, _t: u32, d: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 4_616_850_000 picoseconds.
|
||||
Weight::from_parts(4_769_028_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
// Standard Error: 123_691
|
||||
.saturating_add(Weight::from_parts(4_925_892, 0).saturating_mul(v.into()))
|
||||
// Standard Error: 12_645_798
|
||||
.saturating_add(Weight::from_parts(1_357_902_261, 0).saturating_mul(d.into()))
|
||||
}
|
||||
}
|
||||
@@ -1,147 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Polkadot.
|
||||
|
||||
// Polkadot 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.
|
||||
|
||||
// Polkadot 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 Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `frame_system`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-06-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `runner-e8ezs4ez-project-163-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./target/production/polkadot
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=kusama-dev
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --no-storage-info
|
||||
// --no-median-slopes
|
||||
// --no-min-squares
|
||||
// --pallet=frame_system
|
||||
// --extrinsic=*
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --header=./file_header.txt
|
||||
// --output=./runtime/kusama/src/weights/
|
||||
|
||||
#![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 `frame_system`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> frame_system::WeightInfo for WeightInfo<T> {
|
||||
/// 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_951_000 picoseconds.
|
||||
Weight::from_parts(2_015_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
// Standard Error: 1
|
||||
.saturating_add(Weight::from_parts(431, 0).saturating_mul(b.into()))
|
||||
}
|
||||
/// The range of component `b` is `[0, 3932160]`.
|
||||
fn remark_with_event(b: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 7_410_000 picoseconds.
|
||||
Weight::from_parts(7_603_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
// Standard Error: 3
|
||||
.saturating_add(Weight::from_parts(1_793, 0).saturating_mul(b.into()))
|
||||
}
|
||||
/// 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 {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `1485`
|
||||
// Minimum execution time: 3_736_000 picoseconds.
|
||||
Weight::from_parts(3_922_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 1485))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: System Digest (r:1 w:1)
|
||||
/// Proof Skipped: System Digest (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: unknown `0x3a636f6465` (r:0 w:1)
|
||||
/// Proof Skipped: unknown `0x3a636f6465` (r:0 w:1)
|
||||
fn set_code() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `1485`
|
||||
// Minimum execution time: 93_052_017_000 picoseconds.
|
||||
Weight::from_parts(98_271_042_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)
|
||||
/// 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 {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_100_000 picoseconds.
|
||||
Weight::from_parts(2_131_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
// Standard Error: 1_975
|
||||
.saturating_add(Weight::from_parts(744_852, 0).saturating_mul(i.into()))
|
||||
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into())))
|
||||
}
|
||||
/// 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 {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_089_000 picoseconds.
|
||||
Weight::from_parts(2_129_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
// Standard Error: 1_093
|
||||
.saturating_add(Weight::from_parts(568_923, 0).saturating_mul(i.into()))
|
||||
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into())))
|
||||
}
|
||||
/// 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 {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `105 + p * (69 ±0)`
|
||||
// Estimated: `118 + p * (70 ±0)`
|
||||
// Minimum execution time: 3_913_000 picoseconds.
|
||||
Weight::from_parts(4_056_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 118))
|
||||
// Standard Error: 2_452
|
||||
.saturating_add(Weight::from_parts(1_281_244, 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()))
|
||||
}
|
||||
}
|
||||
@@ -1,69 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
//! A list of the different weight modules for our runtime.
|
||||
|
||||
pub mod frame_election_provider_support;
|
||||
pub mod frame_system;
|
||||
pub mod pallet_bags_list;
|
||||
pub mod pallet_balances;
|
||||
pub mod pallet_balances_nis_counterpart_balances;
|
||||
pub mod pallet_bounties;
|
||||
pub mod pallet_child_bounties;
|
||||
pub mod pallet_collective_council;
|
||||
pub mod pallet_collective_technical_committee;
|
||||
pub mod pallet_conviction_voting;
|
||||
pub mod pallet_democracy;
|
||||
pub mod pallet_election_provider_multi_phase;
|
||||
pub mod pallet_elections_phragmen;
|
||||
pub mod pallet_fast_unstake;
|
||||
pub mod pallet_identity;
|
||||
pub mod pallet_im_online;
|
||||
pub mod pallet_indices;
|
||||
pub mod pallet_membership;
|
||||
pub mod pallet_message_queue;
|
||||
pub mod pallet_multisig;
|
||||
pub mod pallet_nis;
|
||||
pub mod pallet_nomination_pools;
|
||||
pub mod pallet_preimage;
|
||||
pub mod pallet_proxy;
|
||||
pub mod pallet_ranked_collective;
|
||||
pub mod pallet_referenda_fellowship_referenda;
|
||||
pub mod pallet_referenda_referenda;
|
||||
pub mod pallet_scheduler;
|
||||
pub mod pallet_session;
|
||||
pub mod pallet_society;
|
||||
pub mod pallet_staking;
|
||||
pub mod pallet_timestamp;
|
||||
pub mod pallet_tips;
|
||||
pub mod pallet_treasury;
|
||||
pub mod pallet_utility;
|
||||
pub mod pallet_vesting;
|
||||
pub mod pallet_whitelist;
|
||||
pub mod pallet_xcm;
|
||||
pub mod runtime_common_auctions;
|
||||
pub mod runtime_common_claims;
|
||||
pub mod runtime_common_crowdloan;
|
||||
pub mod runtime_common_paras_registrar;
|
||||
pub mod runtime_common_slots;
|
||||
pub mod runtime_parachains_configuration;
|
||||
pub mod runtime_parachains_disputes;
|
||||
pub mod runtime_parachains_disputes_slashing;
|
||||
pub mod runtime_parachains_hrmp;
|
||||
pub mod runtime_parachains_inclusion;
|
||||
pub mod runtime_parachains_initializer;
|
||||
pub mod runtime_parachains_paras;
|
||||
pub mod runtime_parachains_paras_inherent;
|
||||
pub mod xcm;
|
||||
@@ -1,109 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Polkadot.
|
||||
|
||||
// Polkadot 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.
|
||||
|
||||
// Polkadot 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 Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pallet_bags_list`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-06-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `runner-e8ezs4ez-project-163-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./target/production/polkadot
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=kusama-dev
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --no-storage-info
|
||||
// --no-median-slopes
|
||||
// --no-min-squares
|
||||
// --pallet=pallet_bags_list
|
||||
// --extrinsic=*
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --header=./file_header.txt
|
||||
// --output=./runtime/kusama/src/weights/
|
||||
|
||||
#![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_bags_list`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_bags_list::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: Staking Bonded (r:1 w:0)
|
||||
/// Proof: Staking Bonded (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen)
|
||||
/// Storage: Staking Ledger (r:1 w:0)
|
||||
/// Proof: Staking Ledger (max_values: None, max_size: Some(1091), added: 3566, mode: MaxEncodedLen)
|
||||
/// Storage: VoterList ListNodes (r:4 w:4)
|
||||
/// Proof: VoterList ListNodes (max_values: None, max_size: Some(154), added: 2629, mode: MaxEncodedLen)
|
||||
/// Storage: VoterList ListBags (r:1 w:1)
|
||||
/// Proof: VoterList ListBags (max_values: None, max_size: Some(82), added: 2557, mode: MaxEncodedLen)
|
||||
fn rebag_non_terminal() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `1654`
|
||||
// Estimated: `11506`
|
||||
// Minimum execution time: 60_661_000 picoseconds.
|
||||
Weight::from_parts(62_784_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 11506))
|
||||
.saturating_add(T::DbWeight::get().reads(7))
|
||||
.saturating_add(T::DbWeight::get().writes(5))
|
||||
}
|
||||
/// Storage: Staking Bonded (r:1 w:0)
|
||||
/// Proof: Staking Bonded (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen)
|
||||
/// Storage: Staking Ledger (r:1 w:0)
|
||||
/// Proof: Staking Ledger (max_values: None, max_size: Some(1091), added: 3566, mode: MaxEncodedLen)
|
||||
/// Storage: VoterList ListNodes (r:3 w:3)
|
||||
/// Proof: VoterList ListNodes (max_values: None, max_size: Some(154), added: 2629, mode: MaxEncodedLen)
|
||||
/// Storage: VoterList ListBags (r:2 w:2)
|
||||
/// Proof: VoterList ListBags (max_values: None, max_size: Some(82), added: 2557, mode: MaxEncodedLen)
|
||||
fn rebag_terminal() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `1548`
|
||||
// Estimated: `8877`
|
||||
// Minimum execution time: 58_537_000 picoseconds.
|
||||
Weight::from_parts(60_665_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 8877))
|
||||
.saturating_add(T::DbWeight::get().reads(7))
|
||||
.saturating_add(T::DbWeight::get().writes(5))
|
||||
}
|
||||
/// Storage: VoterList ListNodes (r:4 w:4)
|
||||
/// Proof: VoterList ListNodes (max_values: None, max_size: Some(154), added: 2629, mode: MaxEncodedLen)
|
||||
/// Storage: Staking Bonded (r:2 w:0)
|
||||
/// Proof: Staking Bonded (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen)
|
||||
/// Storage: Staking Ledger (r:2 w:0)
|
||||
/// Proof: Staking Ledger (max_values: None, max_size: Some(1091), added: 3566, mode: MaxEncodedLen)
|
||||
/// Storage: VoterList CounterForListNodes (r:1 w:1)
|
||||
/// Proof: VoterList CounterForListNodes (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: VoterList ListBags (r:1 w:1)
|
||||
/// Proof: VoterList ListBags (max_values: None, max_size: Some(82), added: 2557, mode: MaxEncodedLen)
|
||||
fn put_in_front_of() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `1857`
|
||||
// Estimated: `11506`
|
||||
// Minimum execution time: 66_168_000 picoseconds.
|
||||
Weight::from_parts(67_855_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 11506))
|
||||
.saturating_add(T::DbWeight::get().reads(10))
|
||||
.saturating_add(T::DbWeight::get().writes(6))
|
||||
}
|
||||
}
|
||||
@@ -1,99 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Polkadot.
|
||||
|
||||
// Polkadot 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.
|
||||
|
||||
// Polkadot 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 Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
//! Autogenerated weights for `pallet_balances`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2022-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./target/production/polkadot
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=kusama-dev
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --pallet=pallet_balances
|
||||
// --extrinsic=*
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --header=./file_header.txt
|
||||
// --output=./runtime/kusama/src/weights/
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
|
||||
use frame_support::{traits::Get, weights::Weight};
|
||||
use sp_std::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pallet_balances`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn transfer_allow_death() -> Weight {
|
||||
// Minimum execution time: 40_902 nanoseconds.
|
||||
Weight::from_parts(41_638_000 as u64, 0)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as u64))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as u64))
|
||||
}
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn transfer_keep_alive() -> Weight {
|
||||
// Minimum execution time: 30_093 nanoseconds.
|
||||
Weight::from_parts(30_732_000 as u64, 0)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as u64))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as u64))
|
||||
}
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn force_set_balance_creating() -> Weight {
|
||||
// Minimum execution time: 23_901 nanoseconds.
|
||||
Weight::from_parts(24_238_000 as u64, 0)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as u64))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as u64))
|
||||
}
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn force_set_balance_killing() -> Weight {
|
||||
// Minimum execution time: 26_402 nanoseconds.
|
||||
Weight::from_parts(27_026_000 as u64, 0)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as u64))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as u64))
|
||||
}
|
||||
// Storage: System Account (r:2 w:2)
|
||||
fn force_transfer() -> Weight {
|
||||
// Minimum execution time: 40_328 nanoseconds.
|
||||
Weight::from_parts(41_242_000 as u64, 0)
|
||||
.saturating_add(T::DbWeight::get().reads(2 as u64))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as u64))
|
||||
}
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn transfer_all() -> Weight {
|
||||
// Minimum execution time: 35_401 nanoseconds.
|
||||
Weight::from_parts(36_122_000 as u64, 0)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as u64))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as u64))
|
||||
}
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn force_unreserve() -> Weight {
|
||||
// Minimum execution time: 20_178 nanoseconds.
|
||||
Weight::from_parts(20_435_000 as u64, 0)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as u64))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as u64))
|
||||
}
|
||||
fn upgrade_accounts(_: u32) -> Weight {
|
||||
Weight::from_parts(0, 0)
|
||||
}
|
||||
}
|
||||
@@ -1,154 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Polkadot.
|
||||
|
||||
// Polkadot 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.
|
||||
|
||||
// Polkadot 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 Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pallet_balances`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-06-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `runner-e8ezs4ez-project-163-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./target/production/polkadot
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=kusama-dev
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --no-storage-info
|
||||
// --no-median-slopes
|
||||
// --no-min-squares
|
||||
// --pallet=pallet_balances
|
||||
// --extrinsic=*
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --header=./file_header.txt
|
||||
// --output=./runtime/kusama/src/weights/
|
||||
|
||||
#![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_balances`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
|
||||
/// 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 {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 55_712_000 picoseconds.
|
||||
Weight::from_parts(56_594_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)
|
||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
fn transfer_keep_alive() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 42_461_000 picoseconds.
|
||||
Weight::from_parts(43_407_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)
|
||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
fn force_set_balance_creating() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `174`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 15_909_000 picoseconds.
|
||||
Weight::from_parts(16_376_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)
|
||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
fn force_set_balance_killing() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `174`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 23_026_000 picoseconds.
|
||||
Weight::from_parts(23_599_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)
|
||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
fn force_transfer() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `103`
|
||||
// Estimated: `6196`
|
||||
// Minimum execution time: 57_520_000 picoseconds.
|
||||
Weight::from_parts(58_933_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)
|
||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
fn transfer_all() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 51_663_000 picoseconds.
|
||||
Weight::from_parts(52_494_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)
|
||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
fn force_unreserve() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `174`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 18_726_000 picoseconds.
|
||||
Weight::from_parts(19_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: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]`.
|
||||
/// 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: 18_041_000 picoseconds.
|
||||
Weight::from_parts(18_377_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 990))
|
||||
// Standard Error: 12_295
|
||||
.saturating_add(Weight::from_parts(16_146_961, 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()))
|
||||
}
|
||||
}
|
||||
@@ -1,178 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Polkadot.
|
||||
|
||||
// Polkadot 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.
|
||||
|
||||
// Polkadot 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 Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pallet_balances`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-06-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `runner-e8ezs4ez-project-163-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./target/production/polkadot
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=kusama-dev
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --no-storage-info
|
||||
// --no-median-slopes
|
||||
// --no-min-squares
|
||||
// --pallet=pallet_balances
|
||||
// --extrinsic=*
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --header=./file_header.txt
|
||||
// --output=./runtime/kusama/src/weights/
|
||||
|
||||
#![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_balances`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: NisCounterpartBalances TotalIssuance (r:1 w:1)
|
||||
/// Proof: NisCounterpartBalances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen)
|
||||
/// Storage: NisCounterpartBalances Account (r:2 w:2)
|
||||
/// Proof: NisCounterpartBalances Account (max_values: None, max_size: Some(112), added: 2587, 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_allow_death() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `219`
|
||||
// Estimated: `6164`
|
||||
// Minimum execution time: 56_458_000 picoseconds.
|
||||
Weight::from_parts(57_881_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6164))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
/// Storage: NisCounterpartBalances TotalIssuance (r:1 w:0)
|
||||
/// Proof: NisCounterpartBalances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen)
|
||||
/// Storage: NisCounterpartBalances Account (r:2 w:2)
|
||||
/// Proof: NisCounterpartBalances Account (max_values: None, max_size: Some(112), added: 2587, 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_keep_alive() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `219`
|
||||
// Estimated: `6164`
|
||||
// Minimum execution time: 43_014_000 picoseconds.
|
||||
Weight::from_parts(44_098_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6164))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: NisCounterpartBalances Account (r:1 w:1)
|
||||
/// Proof: NisCounterpartBalances Account (max_values: None, max_size: Some(112), added: 2587, mode: MaxEncodedLen)
|
||||
fn force_set_balance_creating() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `217`
|
||||
// Estimated: `3577`
|
||||
// Minimum execution time: 14_712_000 picoseconds.
|
||||
Weight::from_parts(15_189_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3577))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: NisCounterpartBalances Account (r:1 w:1)
|
||||
/// Proof: NisCounterpartBalances Account (max_values: None, max_size: Some(112), added: 2587, mode: MaxEncodedLen)
|
||||
/// Storage: System Account (r:1 w:1)
|
||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
/// Storage: NisCounterpartBalances TotalIssuance (r:1 w:1)
|
||||
/// Proof: NisCounterpartBalances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen)
|
||||
fn force_set_balance_killing() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `393`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 25_131_000 picoseconds.
|
||||
Weight::from_parts(25_796_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3593))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: NisCounterpartBalances TotalIssuance (r:1 w:1)
|
||||
/// Proof: NisCounterpartBalances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen)
|
||||
/// Storage: NisCounterpartBalances Account (r:2 w:2)
|
||||
/// Proof: NisCounterpartBalances Account (max_values: None, max_size: Some(112), added: 2587, mode: MaxEncodedLen)
|
||||
/// 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 {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `322`
|
||||
// Estimated: `6196`
|
||||
// Minimum execution time: 58_350_000 picoseconds.
|
||||
Weight::from_parts(59_738_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6196))
|
||||
.saturating_add(T::DbWeight::get().reads(5))
|
||||
.saturating_add(T::DbWeight::get().writes(5))
|
||||
}
|
||||
/// Storage: NisCounterpartBalances Account (r:2 w:2)
|
||||
/// Proof: NisCounterpartBalances Account (max_values: None, max_size: Some(112), added: 2587, mode: MaxEncodedLen)
|
||||
/// Storage: NisCounterpartBalances TotalIssuance (r:1 w:0)
|
||||
/// Proof: NisCounterpartBalances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, 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_all() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `219`
|
||||
// Estimated: `6164`
|
||||
// Minimum execution time: 52_544_000 picoseconds.
|
||||
Weight::from_parts(53_454_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6164))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: NisCounterpartBalances Account (r:1 w:1)
|
||||
/// Proof: NisCounterpartBalances Account (max_values: None, max_size: Some(112), added: 2587, mode: MaxEncodedLen)
|
||||
/// 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 {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `391`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 20_615_000 picoseconds.
|
||||
Weight::from_parts(21_215_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3593))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: NisCounterpartBalances Account (r:999 w:999)
|
||||
/// Proof: NisCounterpartBalances Account (max_values: None, max_size: Some(112), added: 2587, mode: MaxEncodedLen)
|
||||
/// 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]`.
|
||||
/// The range of component `u` is `[1, 1000]`.
|
||||
fn upgrade_accounts(u: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0 + u * (256 ±0)`
|
||||
// Estimated: `990 + u * (2603 ±0)`
|
||||
// Minimum execution time: 20_150_000 picoseconds.
|
||||
Weight::from_parts(20_438_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 990))
|
||||
// Standard Error: 26_020
|
||||
.saturating_add(Weight::from_parts(18_369_413, 0).saturating_mul(u.into()))
|
||||
.saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(u.into())))
|
||||
.saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(u.into())))
|
||||
.saturating_add(Weight::from_parts(0, 2603).saturating_mul(u.into()))
|
||||
}
|
||||
}
|
||||
@@ -1,230 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Polkadot.
|
||||
|
||||
// Polkadot 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.
|
||||
|
||||
// Polkadot 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 Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pallet_bounties`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-06-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `runner-e8ezs4ez-project-163-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./target/production/polkadot
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=kusama-dev
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --no-storage-info
|
||||
// --no-median-slopes
|
||||
// --no-min-squares
|
||||
// --pallet=pallet_bounties
|
||||
// --extrinsic=*
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --header=./file_header.txt
|
||||
// --output=./runtime/kusama/src/weights/
|
||||
|
||||
#![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_bounties`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_bounties::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: Bounties BountyCount (r:1 w:1)
|
||||
/// Proof: Bounties BountyCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: System Account (r:1 w:1)
|
||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
/// Storage: Bounties BountyDescriptions (r:0 w:1)
|
||||
/// Proof: Bounties BountyDescriptions (max_values: None, max_size: Some(16400), added: 18875, mode: MaxEncodedLen)
|
||||
/// Storage: Bounties Bounties (r:0 w:1)
|
||||
/// Proof: Bounties Bounties (max_values: None, max_size: Some(177), added: 2652, mode: MaxEncodedLen)
|
||||
/// The range of component `d` is `[0, 16384]`.
|
||||
fn propose_bounty(d: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `177`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 28_620_000 picoseconds.
|
||||
Weight::from_parts(30_319_265, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3593))
|
||||
// Standard Error: 7
|
||||
.saturating_add(Weight::from_parts(715, 0).saturating_mul(d.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
/// Storage: Bounties Bounties (r:1 w:1)
|
||||
/// Proof: Bounties Bounties (max_values: None, max_size: Some(177), added: 2652, mode: MaxEncodedLen)
|
||||
/// Storage: Bounties BountyApprovals (r:1 w:1)
|
||||
/// Proof: Bounties BountyApprovals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen)
|
||||
fn approve_bounty() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `269`
|
||||
// Estimated: `3642`
|
||||
// Minimum execution time: 10_397_000 picoseconds.
|
||||
Weight::from_parts(10_777_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3642))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: Bounties Bounties (r:1 w:1)
|
||||
/// Proof: Bounties Bounties (max_values: None, max_size: Some(177), added: 2652, mode: MaxEncodedLen)
|
||||
fn propose_curator() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `289`
|
||||
// Estimated: `3642`
|
||||
// Minimum execution time: 9_065_000 picoseconds.
|
||||
Weight::from_parts(9_477_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3642))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: Bounties Bounties (r:1 w:1)
|
||||
/// Proof: Bounties Bounties (max_values: None, max_size: Some(177), added: 2652, mode: MaxEncodedLen)
|
||||
/// Storage: System Account (r:1 w:1)
|
||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
fn unassign_curator() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `465`
|
||||
// Estimated: `3642`
|
||||
// Minimum execution time: 42_565_000 picoseconds.
|
||||
Weight::from_parts(43_956_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3642))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: Bounties Bounties (r:1 w:1)
|
||||
/// Proof: Bounties Bounties (max_values: None, max_size: Some(177), added: 2652, mode: MaxEncodedLen)
|
||||
/// Storage: System Account (r:1 w:1)
|
||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
fn accept_curator() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `461`
|
||||
// Estimated: `3642`
|
||||
// Minimum execution time: 27_461_000 picoseconds.
|
||||
Weight::from_parts(28_307_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3642))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: Bounties Bounties (r:1 w:1)
|
||||
/// Proof: Bounties Bounties (max_values: None, max_size: Some(177), added: 2652, mode: MaxEncodedLen)
|
||||
/// Storage: ChildBounties ParentChildBounties (r:1 w:0)
|
||||
/// Proof: ChildBounties ParentChildBounties (max_values: None, max_size: Some(16), added: 2491, mode: MaxEncodedLen)
|
||||
fn award_bounty() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `405`
|
||||
// Estimated: `3642`
|
||||
// Minimum execution time: 19_269_000 picoseconds.
|
||||
Weight::from_parts(19_884_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3642))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: Bounties Bounties (r:1 w:1)
|
||||
/// Proof: Bounties Bounties (max_values: None, max_size: Some(177), added: 2652, mode: MaxEncodedLen)
|
||||
/// Storage: System Account (r:3 w:3)
|
||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
/// Storage: ChildBounties ChildrenCuratorFees (r:1 w:1)
|
||||
/// Proof: ChildBounties ChildrenCuratorFees (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen)
|
||||
/// Storage: Bounties BountyDescriptions (r:0 w:1)
|
||||
/// Proof: Bounties BountyDescriptions (max_values: None, max_size: Some(16400), added: 18875, mode: MaxEncodedLen)
|
||||
fn claim_bounty() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `769`
|
||||
// Estimated: `8799`
|
||||
// Minimum execution time: 120_844_000 picoseconds.
|
||||
Weight::from_parts(125_606_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 8799))
|
||||
.saturating_add(T::DbWeight::get().reads(5))
|
||||
.saturating_add(T::DbWeight::get().writes(6))
|
||||
}
|
||||
/// Storage: Bounties Bounties (r:1 w:1)
|
||||
/// Proof: Bounties Bounties (max_values: None, max_size: Some(177), added: 2652, mode: MaxEncodedLen)
|
||||
/// Storage: ChildBounties ParentChildBounties (r:1 w:0)
|
||||
/// Proof: ChildBounties ParentChildBounties (max_values: None, max_size: Some(16), added: 2491, mode: MaxEncodedLen)
|
||||
/// Storage: System Account (r:1 w:1)
|
||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
/// Storage: Bounties BountyDescriptions (r:0 w:1)
|
||||
/// Proof: Bounties BountyDescriptions (max_values: None, max_size: Some(16400), added: 18875, mode: MaxEncodedLen)
|
||||
fn close_bounty_proposed() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `449`
|
||||
// Estimated: `3642`
|
||||
// Minimum execution time: 47_439_000 picoseconds.
|
||||
Weight::from_parts(48_838_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3642))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: Bounties Bounties (r:1 w:1)
|
||||
/// Proof: Bounties Bounties (max_values: None, max_size: Some(177), added: 2652, mode: MaxEncodedLen)
|
||||
/// Storage: ChildBounties ParentChildBounties (r:1 w:0)
|
||||
/// Proof: ChildBounties ParentChildBounties (max_values: None, max_size: Some(16), added: 2491, mode: MaxEncodedLen)
|
||||
/// Storage: System Account (r:2 w:2)
|
||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
/// Storage: Bounties BountyDescriptions (r:0 w:1)
|
||||
/// Proof: Bounties BountyDescriptions (max_values: None, max_size: Some(16400), added: 18875, mode: MaxEncodedLen)
|
||||
fn close_bounty_active() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `685`
|
||||
// Estimated: `6196`
|
||||
// Minimum execution time: 81_354_000 picoseconds.
|
||||
Weight::from_parts(83_515_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6196))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
/// Storage: Bounties Bounties (r:1 w:1)
|
||||
/// Proof: Bounties Bounties (max_values: None, max_size: Some(177), added: 2652, mode: MaxEncodedLen)
|
||||
fn extend_bounty_expiry() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `325`
|
||||
// Estimated: `3642`
|
||||
// Minimum execution time: 14_850_000 picoseconds.
|
||||
Weight::from_parts(15_365_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3642))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: Bounties BountyApprovals (r:1 w:1)
|
||||
/// Proof: Bounties BountyApprovals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen)
|
||||
/// Storage: Bounties Bounties (r:100 w:100)
|
||||
/// Proof: Bounties Bounties (max_values: None, max_size: Some(177), added: 2652, mode: MaxEncodedLen)
|
||||
/// Storage: System Account (r:200 w:200)
|
||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
/// The range of component `b` is `[0, 100]`.
|
||||
fn spend_funds(b: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0 + b * (297 ±0)`
|
||||
// Estimated: `1887 + b * (5206 ±0)`
|
||||
// Minimum execution time: 4_606_000 picoseconds.
|
||||
Weight::from_parts(4_691_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 1887))
|
||||
// Standard Error: 15_735
|
||||
.saturating_add(Weight::from_parts(44_695_416, 0).saturating_mul(b.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(b.into())))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
.saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(b.into())))
|
||||
.saturating_add(Weight::from_parts(0, 5206).saturating_mul(b.into()))
|
||||
}
|
||||
}
|
||||
@@ -1,202 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Polkadot.
|
||||
|
||||
// Polkadot 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.
|
||||
|
||||
// Polkadot 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 Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pallet_child_bounties`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-06-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `runner-e8ezs4ez-project-163-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./target/production/polkadot
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=kusama-dev
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --no-storage-info
|
||||
// --no-median-slopes
|
||||
// --no-min-squares
|
||||
// --pallet=pallet_child_bounties
|
||||
// --extrinsic=*
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --header=./file_header.txt
|
||||
// --output=./runtime/kusama/src/weights/
|
||||
|
||||
#![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_child_bounties`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_child_bounties::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: ChildBounties ParentChildBounties (r:1 w:1)
|
||||
/// Proof: ChildBounties ParentChildBounties (max_values: None, max_size: Some(16), added: 2491, mode: MaxEncodedLen)
|
||||
/// Storage: Bounties Bounties (r:1 w:0)
|
||||
/// Proof: Bounties Bounties (max_values: None, max_size: Some(177), added: 2652, mode: MaxEncodedLen)
|
||||
/// Storage: System Account (r:2 w:2)
|
||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
/// Storage: ChildBounties ChildBountyCount (r:1 w:1)
|
||||
/// Proof: ChildBounties ChildBountyCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: ChildBounties ChildBountyDescriptions (r:0 w:1)
|
||||
/// Proof: ChildBounties ChildBountyDescriptions (max_values: None, max_size: Some(16400), added: 18875, mode: MaxEncodedLen)
|
||||
/// Storage: ChildBounties ChildBounties (r:0 w:1)
|
||||
/// Proof: ChildBounties ChildBounties (max_values: None, max_size: Some(145), added: 2620, mode: MaxEncodedLen)
|
||||
/// The range of component `d` is `[0, 16384]`.
|
||||
fn add_child_bounty(d: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `545`
|
||||
// Estimated: `6196`
|
||||
// Minimum execution time: 69_355_000 picoseconds.
|
||||
Weight::from_parts(72_208_416, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6196))
|
||||
// Standard Error: 10
|
||||
.saturating_add(Weight::from_parts(705, 0).saturating_mul(d.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(5))
|
||||
.saturating_add(T::DbWeight::get().writes(6))
|
||||
}
|
||||
/// Storage: Bounties Bounties (r:1 w:0)
|
||||
/// Proof: Bounties Bounties (max_values: None, max_size: Some(177), added: 2652, mode: MaxEncodedLen)
|
||||
/// Storage: ChildBounties ChildBounties (r:1 w:1)
|
||||
/// Proof: ChildBounties ChildBounties (max_values: None, max_size: Some(145), added: 2620, mode: MaxEncodedLen)
|
||||
/// Storage: ChildBounties ChildrenCuratorFees (r:1 w:1)
|
||||
/// Proof: ChildBounties ChildrenCuratorFees (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen)
|
||||
fn propose_curator() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `599`
|
||||
// Estimated: `3642`
|
||||
// Minimum execution time: 17_313_000 picoseconds.
|
||||
Weight::from_parts(18_161_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3642))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: Bounties Bounties (r:1 w:0)
|
||||
/// Proof: Bounties Bounties (max_values: None, max_size: Some(177), added: 2652, mode: MaxEncodedLen)
|
||||
/// Storage: ChildBounties ChildBounties (r:1 w:1)
|
||||
/// Proof: ChildBounties ChildBounties (max_values: None, max_size: Some(145), added: 2620, mode: MaxEncodedLen)
|
||||
/// Storage: System Account (r:1 w:1)
|
||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
fn accept_curator() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `745`
|
||||
// Estimated: `3642`
|
||||
// Minimum execution time: 32_629_000 picoseconds.
|
||||
Weight::from_parts(33_843_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3642))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: ChildBounties ChildBounties (r:1 w:1)
|
||||
/// Proof: ChildBounties ChildBounties (max_values: None, max_size: Some(145), added: 2620, mode: MaxEncodedLen)
|
||||
/// Storage: Bounties Bounties (r:1 w:0)
|
||||
/// Proof: Bounties Bounties (max_values: None, max_size: Some(177), added: 2652, mode: MaxEncodedLen)
|
||||
/// Storage: System Account (r:1 w:1)
|
||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
fn unassign_curator() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `745`
|
||||
// Estimated: `3642`
|
||||
// Minimum execution time: 47_994_000 picoseconds.
|
||||
Weight::from_parts(49_346_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3642))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: Bounties Bounties (r:1 w:0)
|
||||
/// Proof: Bounties Bounties (max_values: None, max_size: Some(177), added: 2652, mode: MaxEncodedLen)
|
||||
/// Storage: ChildBounties ChildBounties (r:1 w:1)
|
||||
/// Proof: ChildBounties ChildBounties (max_values: None, max_size: Some(145), added: 2620, mode: MaxEncodedLen)
|
||||
fn award_child_bounty() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `642`
|
||||
// Estimated: `3642`
|
||||
// Minimum execution time: 21_866_000 picoseconds.
|
||||
Weight::from_parts(22_532_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3642))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: ChildBounties ChildBounties (r:1 w:1)
|
||||
/// Proof: ChildBounties ChildBounties (max_values: None, max_size: Some(145), added: 2620, mode: MaxEncodedLen)
|
||||
/// Storage: System Account (r:3 w:3)
|
||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
/// Storage: ChildBounties ParentChildBounties (r:1 w:1)
|
||||
/// Proof: ChildBounties ParentChildBounties (max_values: None, max_size: Some(16), added: 2491, mode: MaxEncodedLen)
|
||||
/// Storage: ChildBounties ChildBountyDescriptions (r:0 w:1)
|
||||
/// Proof: ChildBounties ChildBountyDescriptions (max_values: None, max_size: Some(16400), added: 18875, mode: MaxEncodedLen)
|
||||
fn claim_child_bounty() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `614`
|
||||
// Estimated: `8799`
|
||||
// Minimum execution time: 116_595_000 picoseconds.
|
||||
Weight::from_parts(118_921_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 8799))
|
||||
.saturating_add(T::DbWeight::get().reads(5))
|
||||
.saturating_add(T::DbWeight::get().writes(6))
|
||||
}
|
||||
/// Storage: Bounties Bounties (r:1 w:0)
|
||||
/// Proof: Bounties Bounties (max_values: None, max_size: Some(177), added: 2652, mode: MaxEncodedLen)
|
||||
/// Storage: ChildBounties ChildBounties (r:1 w:1)
|
||||
/// Proof: ChildBounties ChildBounties (max_values: None, max_size: Some(145), added: 2620, mode: MaxEncodedLen)
|
||||
/// Storage: ChildBounties ChildrenCuratorFees (r:1 w:1)
|
||||
/// Proof: ChildBounties ChildrenCuratorFees (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen)
|
||||
/// Storage: ChildBounties ParentChildBounties (r:1 w:1)
|
||||
/// Proof: ChildBounties ParentChildBounties (max_values: None, max_size: Some(16), added: 2491, mode: MaxEncodedLen)
|
||||
/// Storage: System Account (r:2 w:2)
|
||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
/// Storage: ChildBounties ChildBountyDescriptions (r:0 w:1)
|
||||
/// Proof: ChildBounties ChildBountyDescriptions (max_values: None, max_size: Some(16400), added: 18875, mode: MaxEncodedLen)
|
||||
fn close_child_bounty_added() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `845`
|
||||
// Estimated: `6196`
|
||||
// Minimum execution time: 76_806_000 picoseconds.
|
||||
Weight::from_parts(79_568_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6196))
|
||||
.saturating_add(T::DbWeight::get().reads(6))
|
||||
.saturating_add(T::DbWeight::get().writes(6))
|
||||
}
|
||||
/// Storage: Bounties Bounties (r:1 w:0)
|
||||
/// Proof: Bounties Bounties (max_values: None, max_size: Some(177), added: 2652, mode: MaxEncodedLen)
|
||||
/// Storage: ChildBounties ChildBounties (r:1 w:1)
|
||||
/// Proof: ChildBounties ChildBounties (max_values: None, max_size: Some(145), added: 2620, mode: MaxEncodedLen)
|
||||
/// Storage: System Account (r:3 w:3)
|
||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
/// Storage: ChildBounties ChildrenCuratorFees (r:1 w:1)
|
||||
/// Proof: ChildBounties ChildrenCuratorFees (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen)
|
||||
/// Storage: ChildBounties ParentChildBounties (r:1 w:1)
|
||||
/// Proof: ChildBounties ParentChildBounties (max_values: None, max_size: Some(16), added: 2491, mode: MaxEncodedLen)
|
||||
/// Storage: ChildBounties ChildBountyDescriptions (r:0 w:1)
|
||||
/// Proof: ChildBounties ChildBountyDescriptions (max_values: None, max_size: Some(16400), added: 18875, mode: MaxEncodedLen)
|
||||
fn close_child_bounty_active() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `1032`
|
||||
// Estimated: `8799`
|
||||
// Minimum execution time: 93_885_000 picoseconds.
|
||||
Weight::from_parts(96_680_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 8799))
|
||||
.saturating_add(T::DbWeight::get().reads(7))
|
||||
.saturating_add(T::DbWeight::get().writes(7))
|
||||
}
|
||||
}
|
||||
@@ -1,322 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Polkadot.
|
||||
|
||||
// Polkadot 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.
|
||||
|
||||
// Polkadot 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 Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
//! Autogenerated weights for `pallet_collective`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-03-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./target/production/polkadot
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=kusama-dev
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --pallet=pallet_collective
|
||||
// --extrinsic=*
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --header=./file_header.txt
|
||||
// --output=./runtime/kusama/src/weights/
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
|
||||
use frame_support::{traits::Get, weights::Weight};
|
||||
use sp_std::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pallet_collective`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_collective::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: Council Members (r:1 w:1)
|
||||
/// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Council Proposals (r:1 w:0)
|
||||
/// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Council Voting (r:100 w:100)
|
||||
/// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Council Prime (r:0 w:1)
|
||||
/// Proof Skipped: Council 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]`.
|
||||
/// 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: `19164 + m * (7799 ±17) + p * (10110 ±17)`
|
||||
// Minimum execution time: 17_032_000 picoseconds.
|
||||
Weight::from_parts(17_263_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 19164))
|
||||
// Standard Error: 51_363
|
||||
.saturating_add(Weight::from_parts(5_779_193, 0).saturating_mul(m.into()))
|
||||
// Standard Error: 51_363
|
||||
.saturating_add(Weight::from_parts(8_434_866, 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, 7799).saturating_mul(m.into()))
|
||||
.saturating_add(Weight::from_parts(0, 10110).saturating_mul(p.into()))
|
||||
}
|
||||
/// Storage: Council Members (r:1 w:0)
|
||||
/// Proof Skipped: Council 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]`.
|
||||
/// The range of component `b` is `[2, 1024]`.
|
||||
/// The range of component `m` is `[1, 100]`.
|
||||
fn execute(b: u32, m: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `136 + m * (32 ±0)`
|
||||
// Estimated: `1622 + m * (32 ±0)`
|
||||
// Minimum execution time: 15_686_000 picoseconds.
|
||||
Weight::from_parts(15_185_500, 0)
|
||||
.saturating_add(Weight::from_parts(0, 1622))
|
||||
// Standard Error: 26
|
||||
.saturating_add(Weight::from_parts(1_363, 0).saturating_mul(b.into()))
|
||||
// Standard Error: 277
|
||||
.saturating_add(Weight::from_parts(15_720, 0).saturating_mul(m.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into()))
|
||||
}
|
||||
/// Storage: Council Members (r:1 w:0)
|
||||
/// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Council ProposalOf (r:1 w:0)
|
||||
/// Proof Skipped: Council 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]`.
|
||||
/// The range of component `b` is `[2, 1024]`.
|
||||
/// The range of component `m` is `[1, 100]`.
|
||||
fn propose_execute(b: u32, m: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `136 + m * (32 ±0)`
|
||||
// Estimated: `5224 + m * (64 ±0)`
|
||||
// Minimum execution time: 18_314_000 picoseconds.
|
||||
Weight::from_parts(17_659_522, 0)
|
||||
.saturating_add(Weight::from_parts(0, 5224))
|
||||
// Standard Error: 22
|
||||
.saturating_add(Weight::from_parts(1_153, 0).saturating_mul(b.into()))
|
||||
// Standard Error: 237
|
||||
.saturating_add(Weight::from_parts(25_439, 0).saturating_mul(m.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into()))
|
||||
}
|
||||
/// Storage: Council Members (r:1 w:0)
|
||||
/// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Council ProposalOf (r:1 w:1)
|
||||
/// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Council Proposals (r:1 w:1)
|
||||
/// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Council ProposalCount (r:1 w:1)
|
||||
/// Proof Skipped: Council ProposalCount (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Council Voting (r:0 w:1)
|
||||
/// Proof Skipped: Council 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]`.
|
||||
/// 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 {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `426 + m * (32 ±0) + p * (36 ±0)`
|
||||
// Estimated: `9685 + m * (165 ±0) + p * (180 ±0)`
|
||||
// Minimum execution time: 23_916_000 picoseconds.
|
||||
Weight::from_parts(25_192_989, 0)
|
||||
.saturating_add(Weight::from_parts(0, 9685))
|
||||
// Standard Error: 50
|
||||
.saturating_add(Weight::from_parts(2_327, 0).saturating_mul(b.into()))
|
||||
// Standard Error: 528
|
||||
.saturating_add(Weight::from_parts(17_763, 0).saturating_mul(m.into()))
|
||||
// Standard Error: 522
|
||||
.saturating_add(Weight::from_parts(116_903, 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, 165).saturating_mul(m.into()))
|
||||
.saturating_add(Weight::from_parts(0, 180).saturating_mul(p.into()))
|
||||
}
|
||||
/// Storage: Council Members (r:1 w:0)
|
||||
/// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Council Voting (r:1 w:1)
|
||||
/// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured)
|
||||
/// The range of component `m` is `[5, 100]`.
|
||||
/// The range of component `m` is `[5, 100]`.
|
||||
fn vote(m: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `875 + m * (64 ±0)`
|
||||
// Estimated: `6698 + m * (128 ±0)`
|
||||
// Minimum execution time: 21_641_000 picoseconds.
|
||||
Weight::from_parts(22_373_888, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6698))
|
||||
// Standard Error: 299
|
||||
.saturating_add(Weight::from_parts(41_168, 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, 128).saturating_mul(m.into()))
|
||||
}
|
||||
/// Storage: Council Voting (r:1 w:1)
|
||||
/// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Council Members (r:1 w:0)
|
||||
/// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Council Proposals (r:1 w:1)
|
||||
/// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Council ProposalOf (r:0 w:1)
|
||||
/// Proof Skipped: Council 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]`.
|
||||
/// 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 {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `464 + m * (64 ±0) + p * (36 ±0)`
|
||||
// Estimated: `8211 + m * (260 ±0) + p * (144 ±0)`
|
||||
// Minimum execution time: 26_158_000 picoseconds.
|
||||
Weight::from_parts(27_675_242, 0)
|
||||
.saturating_add(Weight::from_parts(0, 8211))
|
||||
// Standard Error: 845
|
||||
.saturating_add(Weight::from_parts(10_799, 0).saturating_mul(m.into()))
|
||||
// Standard Error: 824
|
||||
.saturating_add(Weight::from_parts(141_199, 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, 260).saturating_mul(m.into()))
|
||||
.saturating_add(Weight::from_parts(0, 144).saturating_mul(p.into()))
|
||||
}
|
||||
/// Storage: Council Voting (r:1 w:1)
|
||||
/// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Council Members (r:1 w:0)
|
||||
/// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Council ProposalOf (r:1 w:1)
|
||||
/// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Council Proposals (r:1 w:1)
|
||||
/// Proof Skipped: Council 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]`.
|
||||
/// 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: `766 + b * (1 ±0) + m * (64 ±0) + p * (40 ±0)`
|
||||
// Estimated: `12372 + b * (4 ±0) + m * (264 ±0) + p * (160 ±0)`
|
||||
// Minimum execution time: 37_601_000 picoseconds.
|
||||
Weight::from_parts(41_302_278, 0)
|
||||
.saturating_add(Weight::from_parts(0, 12372))
|
||||
// Standard Error: 67
|
||||
.saturating_add(Weight::from_parts(1_608, 0).saturating_mul(b.into()))
|
||||
// Standard Error: 716
|
||||
.saturating_add(Weight::from_parts(14_628, 0).saturating_mul(m.into()))
|
||||
// Standard Error: 698
|
||||
.saturating_add(Weight::from_parts(129_997, 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, 4).saturating_mul(b.into()))
|
||||
.saturating_add(Weight::from_parts(0, 264).saturating_mul(m.into()))
|
||||
.saturating_add(Weight::from_parts(0, 160).saturating_mul(p.into()))
|
||||
}
|
||||
/// Storage: Council Voting (r:1 w:1)
|
||||
/// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Council Members (r:1 w:0)
|
||||
/// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Council Prime (r:1 w:0)
|
||||
/// Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Council Proposals (r:1 w:1)
|
||||
/// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Council ProposalOf (r:0 w:1)
|
||||
/// Proof Skipped: Council 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]`.
|
||||
/// The range of component `m` is `[4, 100]`.
|
||||
/// The range of component `p` is `[1, 100]`.
|
||||
fn close_disapproved(m: u32, p: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `484 + m * (64 ±0) + p * (36 ±0)`
|
||||
// Estimated: `10240 + m * (325 ±0) + p * (180 ±0)`
|
||||
// Minimum execution time: 29_185_000 picoseconds.
|
||||
Weight::from_parts(30_594_183, 0)
|
||||
.saturating_add(Weight::from_parts(0, 10240))
|
||||
// Standard Error: 865
|
||||
.saturating_add(Weight::from_parts(30_165, 0).saturating_mul(m.into()))
|
||||
// Standard Error: 844
|
||||
.saturating_add(Weight::from_parts(131_623, 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, 325).saturating_mul(m.into()))
|
||||
.saturating_add(Weight::from_parts(0, 180).saturating_mul(p.into()))
|
||||
}
|
||||
/// Storage: Council Voting (r:1 w:1)
|
||||
/// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Council Members (r:1 w:0)
|
||||
/// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Council Prime (r:1 w:0)
|
||||
/// Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Council ProposalOf (r:1 w:1)
|
||||
/// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Council Proposals (r:1 w:1)
|
||||
/// Proof Skipped: Council 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]`.
|
||||
/// 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 {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `786 + b * (1 ±0) + m * (64 ±0) + p * (40 ±0)`
|
||||
// Estimated: `14575 + b * (5 ±0) + m * (330 ±0) + p * (200 ±0)`
|
||||
// Minimum execution time: 43_157_000 picoseconds.
|
||||
Weight::from_parts(43_691_874, 0)
|
||||
.saturating_add(Weight::from_parts(0, 14575))
|
||||
// Standard Error: 61
|
||||
.saturating_add(Weight::from_parts(1_862, 0).saturating_mul(b.into()))
|
||||
// Standard Error: 654
|
||||
.saturating_add(Weight::from_parts(17_183, 0).saturating_mul(m.into()))
|
||||
// Standard Error: 638
|
||||
.saturating_add(Weight::from_parts(133_193, 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, 5).saturating_mul(b.into()))
|
||||
.saturating_add(Weight::from_parts(0, 330).saturating_mul(m.into()))
|
||||
.saturating_add(Weight::from_parts(0, 200).saturating_mul(p.into()))
|
||||
}
|
||||
/// Storage: Council Proposals (r:1 w:1)
|
||||
/// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Council Voting (r:0 w:1)
|
||||
/// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Council ProposalOf (r:0 w:1)
|
||||
/// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured)
|
||||
/// The range of component `p` is `[1, 100]`.
|
||||
/// The range of component `p` is `[1, 100]`.
|
||||
fn disapprove_proposal(p: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `293 + p * (32 ±0)`
|
||||
// Estimated: `2364 + p * (96 ±0)`
|
||||
// Minimum execution time: 14_666_000 picoseconds.
|
||||
Weight::from_parts(16_623_386, 0)
|
||||
.saturating_add(Weight::from_parts(0, 2364))
|
||||
// Standard Error: 430
|
||||
.saturating_add(Weight::from_parts(111_461, 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, 96).saturating_mul(p.into()))
|
||||
}
|
||||
}
|
||||
@@ -1,322 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Polkadot.
|
||||
|
||||
// Polkadot 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.
|
||||
|
||||
// Polkadot 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 Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
//! Autogenerated weights for `pallet_collective`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-03-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./target/production/polkadot
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=kusama-dev
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --pallet=pallet_collective
|
||||
// --extrinsic=*
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --header=./file_header.txt
|
||||
// --output=./runtime/kusama/src/weights/
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
|
||||
use frame_support::{traits::Get, weights::Weight};
|
||||
use sp_std::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pallet_collective`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_collective::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: TechnicalCommittee Members (r:1 w:1)
|
||||
/// Proof Skipped: TechnicalCommittee Members (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: TechnicalCommittee Proposals (r:1 w:0)
|
||||
/// Proof Skipped: TechnicalCommittee Proposals (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: TechnicalCommittee Voting (r:100 w:100)
|
||||
/// Proof Skipped: TechnicalCommittee Voting (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: TechnicalCommittee Prime (r:0 w:1)
|
||||
/// Proof Skipped: TechnicalCommittee 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]`.
|
||||
/// 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: `19320 + m * (7799 ±16) + p * (10110 ±16)`
|
||||
// Minimum execution time: 17_755_000 picoseconds.
|
||||
Weight::from_parts(18_022_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 19320))
|
||||
// Standard Error: 48_475
|
||||
.saturating_add(Weight::from_parts(5_505_299, 0).saturating_mul(m.into()))
|
||||
// Standard Error: 48_475
|
||||
.saturating_add(Weight::from_parts(8_260_850, 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, 7799).saturating_mul(m.into()))
|
||||
.saturating_add(Weight::from_parts(0, 10110).saturating_mul(p.into()))
|
||||
}
|
||||
/// Storage: TechnicalCommittee Members (r:1 w:0)
|
||||
/// Proof Skipped: TechnicalCommittee 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]`.
|
||||
/// The range of component `b` is `[2, 1024]`.
|
||||
/// The range of component `m` is `[1, 100]`.
|
||||
fn execute(b: u32, m: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `175 + m * (32 ±0)`
|
||||
// Estimated: `1661 + m * (32 ±0)`
|
||||
// Minimum execution time: 16_765_000 picoseconds.
|
||||
Weight::from_parts(15_653_912, 0)
|
||||
.saturating_add(Weight::from_parts(0, 1661))
|
||||
// Standard Error: 25
|
||||
.saturating_add(Weight::from_parts(1_539, 0).saturating_mul(b.into()))
|
||||
// Standard Error: 261
|
||||
.saturating_add(Weight::from_parts(17_896, 0).saturating_mul(m.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into()))
|
||||
}
|
||||
/// Storage: TechnicalCommittee Members (r:1 w:0)
|
||||
/// Proof Skipped: TechnicalCommittee Members (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: TechnicalCommittee ProposalOf (r:1 w:0)
|
||||
/// Proof Skipped: TechnicalCommittee 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]`.
|
||||
/// The range of component `b` is `[2, 1024]`.
|
||||
/// The range of component `m` is `[1, 100]`.
|
||||
fn propose_execute(b: u32, m: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `175 + m * (32 ±0)`
|
||||
// Estimated: `5302 + m * (64 ±0)`
|
||||
// Minimum execution time: 19_194_000 picoseconds.
|
||||
Weight::from_parts(18_366_867, 0)
|
||||
.saturating_add(Weight::from_parts(0, 5302))
|
||||
// Standard Error: 19
|
||||
.saturating_add(Weight::from_parts(1_342, 0).saturating_mul(b.into()))
|
||||
// Standard Error: 200
|
||||
.saturating_add(Weight::from_parts(22_738, 0).saturating_mul(m.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into()))
|
||||
}
|
||||
/// Storage: TechnicalCommittee Members (r:1 w:0)
|
||||
/// Proof Skipped: TechnicalCommittee Members (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: TechnicalCommittee ProposalOf (r:1 w:1)
|
||||
/// Proof Skipped: TechnicalCommittee ProposalOf (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: TechnicalCommittee Proposals (r:1 w:1)
|
||||
/// Proof Skipped: TechnicalCommittee Proposals (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: TechnicalCommittee ProposalCount (r:1 w:1)
|
||||
/// Proof Skipped: TechnicalCommittee ProposalCount (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: TechnicalCommittee Voting (r:0 w:1)
|
||||
/// Proof Skipped: TechnicalCommittee 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]`.
|
||||
/// 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 {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `465 + m * (32 ±0) + p * (36 ±0)`
|
||||
// Estimated: `9880 + m * (165 ±0) + p * (180 ±0)`
|
||||
// Minimum execution time: 24_958_000 picoseconds.
|
||||
Weight::from_parts(25_925_520, 0)
|
||||
.saturating_add(Weight::from_parts(0, 9880))
|
||||
// Standard Error: 54
|
||||
.saturating_add(Weight::from_parts(2_430, 0).saturating_mul(b.into()))
|
||||
// Standard Error: 570
|
||||
.saturating_add(Weight::from_parts(17_303, 0).saturating_mul(m.into()))
|
||||
// Standard Error: 563
|
||||
.saturating_add(Weight::from_parts(119_736, 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, 165).saturating_mul(m.into()))
|
||||
.saturating_add(Weight::from_parts(0, 180).saturating_mul(p.into()))
|
||||
}
|
||||
/// Storage: TechnicalCommittee Members (r:1 w:0)
|
||||
/// Proof Skipped: TechnicalCommittee Members (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: TechnicalCommittee Voting (r:1 w:1)
|
||||
/// Proof Skipped: TechnicalCommittee Voting (max_values: None, max_size: None, mode: Measured)
|
||||
/// The range of component `m` is `[5, 100]`.
|
||||
/// The range of component `m` is `[5, 100]`.
|
||||
fn vote(m: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `914 + m * (64 ±0)`
|
||||
// Estimated: `6776 + m * (128 ±0)`
|
||||
// Minimum execution time: 22_620_000 picoseconds.
|
||||
Weight::from_parts(23_356_968, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6776))
|
||||
// Standard Error: 273
|
||||
.saturating_add(Weight::from_parts(40_919, 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, 128).saturating_mul(m.into()))
|
||||
}
|
||||
/// Storage: TechnicalCommittee Voting (r:1 w:1)
|
||||
/// Proof Skipped: TechnicalCommittee Voting (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: TechnicalCommittee Members (r:1 w:0)
|
||||
/// Proof Skipped: TechnicalCommittee Members (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: TechnicalCommittee Proposals (r:1 w:1)
|
||||
/// Proof Skipped: TechnicalCommittee Proposals (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: TechnicalCommittee ProposalOf (r:0 w:1)
|
||||
/// Proof Skipped: TechnicalCommittee 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]`.
|
||||
/// 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 {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `503 + m * (64 ±0) + p * (36 ±0)`
|
||||
// Estimated: `8367 + m * (260 ±0) + p * (144 ±0)`
|
||||
// Minimum execution time: 27_667_000 picoseconds.
|
||||
Weight::from_parts(29_094_490, 0)
|
||||
.saturating_add(Weight::from_parts(0, 8367))
|
||||
// Standard Error: 842
|
||||
.saturating_add(Weight::from_parts(25_691, 0).saturating_mul(m.into()))
|
||||
// Standard Error: 821
|
||||
.saturating_add(Weight::from_parts(133_244, 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, 260).saturating_mul(m.into()))
|
||||
.saturating_add(Weight::from_parts(0, 144).saturating_mul(p.into()))
|
||||
}
|
||||
/// Storage: TechnicalCommittee Voting (r:1 w:1)
|
||||
/// Proof Skipped: TechnicalCommittee Voting (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: TechnicalCommittee Members (r:1 w:0)
|
||||
/// Proof Skipped: TechnicalCommittee Members (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: TechnicalCommittee ProposalOf (r:1 w:1)
|
||||
/// Proof Skipped: TechnicalCommittee ProposalOf (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: TechnicalCommittee Proposals (r:1 w:1)
|
||||
/// Proof Skipped: TechnicalCommittee 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]`.
|
||||
/// 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: `805 + b * (1 ±0) + m * (64 ±0) + p * (40 ±0)`
|
||||
// Estimated: `12528 + b * (4 ±0) + m * (264 ±0) + p * (160 ±0)`
|
||||
// Minimum execution time: 41_678_000 picoseconds.
|
||||
Weight::from_parts(42_218_269, 0)
|
||||
.saturating_add(Weight::from_parts(0, 12528))
|
||||
// Standard Error: 59
|
||||
.saturating_add(Weight::from_parts(1_661, 0).saturating_mul(b.into()))
|
||||
// Standard Error: 624
|
||||
.saturating_add(Weight::from_parts(16_946, 0).saturating_mul(m.into()))
|
||||
// Standard Error: 608
|
||||
.saturating_add(Weight::from_parts(129_170, 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, 4).saturating_mul(b.into()))
|
||||
.saturating_add(Weight::from_parts(0, 264).saturating_mul(m.into()))
|
||||
.saturating_add(Weight::from_parts(0, 160).saturating_mul(p.into()))
|
||||
}
|
||||
/// Storage: TechnicalCommittee Voting (r:1 w:1)
|
||||
/// Proof Skipped: TechnicalCommittee Voting (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: TechnicalCommittee Members (r:1 w:0)
|
||||
/// Proof Skipped: TechnicalCommittee Members (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: TechnicalCommittee Prime (r:1 w:0)
|
||||
/// Proof Skipped: TechnicalCommittee Prime (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: TechnicalCommittee Proposals (r:1 w:1)
|
||||
/// Proof Skipped: TechnicalCommittee Proposals (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: TechnicalCommittee ProposalOf (r:0 w:1)
|
||||
/// Proof Skipped: TechnicalCommittee 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]`.
|
||||
/// The range of component `m` is `[4, 100]`.
|
||||
/// The range of component `p` is `[1, 100]`.
|
||||
fn close_disapproved(m: u32, p: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `523 + m * (64 ±0) + p * (36 ±0)`
|
||||
// Estimated: `10435 + m * (325 ±0) + p * (180 ±0)`
|
||||
// Minimum execution time: 30_447_000 picoseconds.
|
||||
Weight::from_parts(32_661_910, 0)
|
||||
.saturating_add(Weight::from_parts(0, 10435))
|
||||
// Standard Error: 531
|
||||
.saturating_add(Weight::from_parts(29_960, 0).saturating_mul(m.into()))
|
||||
// Standard Error: 517
|
||||
.saturating_add(Weight::from_parts(120_475, 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, 325).saturating_mul(m.into()))
|
||||
.saturating_add(Weight::from_parts(0, 180).saturating_mul(p.into()))
|
||||
}
|
||||
/// Storage: TechnicalCommittee Voting (r:1 w:1)
|
||||
/// Proof Skipped: TechnicalCommittee Voting (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: TechnicalCommittee Members (r:1 w:0)
|
||||
/// Proof Skipped: TechnicalCommittee Members (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: TechnicalCommittee Prime (r:1 w:0)
|
||||
/// Proof Skipped: TechnicalCommittee Prime (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: TechnicalCommittee ProposalOf (r:1 w:1)
|
||||
/// Proof Skipped: TechnicalCommittee ProposalOf (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: TechnicalCommittee Proposals (r:1 w:1)
|
||||
/// Proof Skipped: TechnicalCommittee 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]`.
|
||||
/// 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 {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `825 + b * (1 ±0) + m * (64 ±0) + p * (40 ±0)`
|
||||
// Estimated: `14770 + b * (5 ±0) + m * (330 ±0) + p * (200 ±0)`
|
||||
// Minimum execution time: 44_068_000 picoseconds.
|
||||
Weight::from_parts(44_673_420, 0)
|
||||
.saturating_add(Weight::from_parts(0, 14770))
|
||||
// Standard Error: 59
|
||||
.saturating_add(Weight::from_parts(1_779, 0).saturating_mul(b.into()))
|
||||
// Standard Error: 625
|
||||
.saturating_add(Weight::from_parts(17_794, 0).saturating_mul(m.into()))
|
||||
// Standard Error: 609
|
||||
.saturating_add(Weight::from_parts(134_062, 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, 5).saturating_mul(b.into()))
|
||||
.saturating_add(Weight::from_parts(0, 330).saturating_mul(m.into()))
|
||||
.saturating_add(Weight::from_parts(0, 200).saturating_mul(p.into()))
|
||||
}
|
||||
/// Storage: TechnicalCommittee Proposals (r:1 w:1)
|
||||
/// Proof Skipped: TechnicalCommittee Proposals (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: TechnicalCommittee Voting (r:0 w:1)
|
||||
/// Proof Skipped: TechnicalCommittee Voting (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: TechnicalCommittee ProposalOf (r:0 w:1)
|
||||
/// Proof Skipped: TechnicalCommittee ProposalOf (max_values: None, max_size: None, mode: Measured)
|
||||
/// The range of component `p` is `[1, 100]`.
|
||||
/// The range of component `p` is `[1, 100]`.
|
||||
fn disapprove_proposal(p: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `332 + p * (32 ±0)`
|
||||
// Estimated: `2481 + p * (96 ±0)`
|
||||
// Minimum execution time: 15_528_000 picoseconds.
|
||||
Weight::from_parts(17_434_864, 0)
|
||||
.saturating_add(Weight::from_parts(0, 2481))
|
||||
// Standard Error: 405
|
||||
.saturating_add(Weight::from_parts(111_909, 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, 96).saturating_mul(p.into()))
|
||||
}
|
||||
}
|
||||
@@ -1,195 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Polkadot.
|
||||
|
||||
// Polkadot 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.
|
||||
|
||||
// Polkadot 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 Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pallet_conviction_voting`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-06-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `runner-e8ezs4ez-project-163-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./target/production/polkadot
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=kusama-dev
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --no-storage-info
|
||||
// --no-median-slopes
|
||||
// --no-min-squares
|
||||
// --pallet=pallet_conviction_voting
|
||||
// --extrinsic=*
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --header=./file_header.txt
|
||||
// --output=./runtime/kusama/src/weights/
|
||||
|
||||
#![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_conviction_voting`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_conviction_voting::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: Referenda ReferendumInfoFor (r:1 w:1)
|
||||
/// Proof: Referenda ReferendumInfoFor (max_values: None, max_size: Some(936), added: 3411, mode: MaxEncodedLen)
|
||||
/// Storage: ConvictionVoting VotingFor (r:1 w:1)
|
||||
/// Proof: ConvictionVoting VotingFor (max_values: None, max_size: Some(27241), added: 29716, mode: MaxEncodedLen)
|
||||
/// Storage: ConvictionVoting ClassLocksFor (r:1 w:1)
|
||||
/// Proof: ConvictionVoting ClassLocksFor (max_values: None, max_size: Some(311), added: 2786, mode: MaxEncodedLen)
|
||||
/// Storage: Balances Locks (r:1 w:1)
|
||||
/// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen)
|
||||
/// Storage: Balances Freezes (r:1 w:0)
|
||||
/// Proof: Balances Freezes (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen)
|
||||
/// Storage: Scheduler Agenda (r:1 w:1)
|
||||
/// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen)
|
||||
fn vote_new() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `13445`
|
||||
// Estimated: `42428`
|
||||
// Minimum execution time: 151_077_000 picoseconds.
|
||||
Weight::from_parts(165_283_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 42428))
|
||||
.saturating_add(T::DbWeight::get().reads(6))
|
||||
.saturating_add(T::DbWeight::get().writes(5))
|
||||
}
|
||||
/// Storage: Referenda ReferendumInfoFor (r:1 w:1)
|
||||
/// Proof: Referenda ReferendumInfoFor (max_values: None, max_size: Some(936), added: 3411, mode: MaxEncodedLen)
|
||||
/// Storage: ConvictionVoting VotingFor (r:1 w:1)
|
||||
/// Proof: ConvictionVoting VotingFor (max_values: None, max_size: Some(27241), added: 29716, mode: MaxEncodedLen)
|
||||
/// Storage: ConvictionVoting ClassLocksFor (r:1 w:1)
|
||||
/// Proof: ConvictionVoting ClassLocksFor (max_values: None, max_size: Some(311), added: 2786, mode: MaxEncodedLen)
|
||||
/// Storage: Balances Locks (r:1 w:1)
|
||||
/// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen)
|
||||
/// Storage: Balances Freezes (r:1 w:0)
|
||||
/// Proof: Balances Freezes (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen)
|
||||
/// Storage: Scheduler Agenda (r:2 w:2)
|
||||
/// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen)
|
||||
fn vote_existing() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `14166`
|
||||
// Estimated: `83866`
|
||||
// Minimum execution time: 232_420_000 picoseconds.
|
||||
Weight::from_parts(244_439_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 83866))
|
||||
.saturating_add(T::DbWeight::get().reads(7))
|
||||
.saturating_add(T::DbWeight::get().writes(6))
|
||||
}
|
||||
/// Storage: ConvictionVoting VotingFor (r:1 w:1)
|
||||
/// Proof: ConvictionVoting VotingFor (max_values: None, max_size: Some(27241), added: 29716, mode: MaxEncodedLen)
|
||||
/// Storage: Referenda ReferendumInfoFor (r:1 w:1)
|
||||
/// Proof: Referenda ReferendumInfoFor (max_values: None, max_size: Some(936), added: 3411, mode: MaxEncodedLen)
|
||||
/// Storage: Scheduler Agenda (r:2 w:2)
|
||||
/// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen)
|
||||
fn remove_vote() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `13918`
|
||||
// Estimated: `83866`
|
||||
// Minimum execution time: 205_017_000 picoseconds.
|
||||
Weight::from_parts(216_594_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 83866))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
/// Storage: ConvictionVoting VotingFor (r:1 w:1)
|
||||
/// Proof: ConvictionVoting VotingFor (max_values: None, max_size: Some(27241), added: 29716, mode: MaxEncodedLen)
|
||||
/// Storage: Referenda ReferendumInfoFor (r:1 w:0)
|
||||
/// Proof: Referenda ReferendumInfoFor (max_values: None, max_size: Some(936), added: 3411, mode: MaxEncodedLen)
|
||||
fn remove_other_vote() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `13004`
|
||||
// Estimated: `30706`
|
||||
// Minimum execution time: 84_226_000 picoseconds.
|
||||
Weight::from_parts(91_255_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 30706))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: ConvictionVoting VotingFor (r:2 w:2)
|
||||
/// Proof: ConvictionVoting VotingFor (max_values: None, max_size: Some(27241), added: 29716, mode: MaxEncodedLen)
|
||||
/// Storage: Referenda ReferendumInfoFor (r:512 w:512)
|
||||
/// Proof: Referenda ReferendumInfoFor (max_values: None, max_size: Some(936), added: 3411, mode: MaxEncodedLen)
|
||||
/// Storage: Scheduler Agenda (r:2 w:2)
|
||||
/// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen)
|
||||
/// Storage: ConvictionVoting ClassLocksFor (r:1 w:1)
|
||||
/// Proof: ConvictionVoting ClassLocksFor (max_values: None, max_size: Some(311), added: 2786, mode: MaxEncodedLen)
|
||||
/// Storage: Balances Locks (r:1 w:1)
|
||||
/// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen)
|
||||
/// Storage: Balances Freezes (r:1 w:0)
|
||||
/// Proof: Balances Freezes (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen)
|
||||
/// The range of component `r` is `[0, 512]`.
|
||||
fn delegate(r: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `29640 + r * (365 ±0)`
|
||||
// Estimated: `83866 + r * (3411 ±0)`
|
||||
// Minimum execution time: 78_708_000 picoseconds.
|
||||
Weight::from_parts(2_053_488_615, 0)
|
||||
.saturating_add(Weight::from_parts(0, 83866))
|
||||
// Standard Error: 179_271
|
||||
.saturating_add(Weight::from_parts(47_806_482, 0).saturating_mul(r.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(7))
|
||||
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into())))
|
||||
.saturating_add(T::DbWeight::get().writes(6))
|
||||
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into())))
|
||||
.saturating_add(Weight::from_parts(0, 3411).saturating_mul(r.into()))
|
||||
}
|
||||
/// Storage: ConvictionVoting VotingFor (r:2 w:2)
|
||||
/// Proof: ConvictionVoting VotingFor (max_values: None, max_size: Some(27241), added: 29716, mode: MaxEncodedLen)
|
||||
/// Storage: Referenda ReferendumInfoFor (r:512 w:512)
|
||||
/// Proof: Referenda ReferendumInfoFor (max_values: None, max_size: Some(936), added: 3411, mode: MaxEncodedLen)
|
||||
/// Storage: Scheduler Agenda (r:2 w:2)
|
||||
/// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen)
|
||||
/// The range of component `r` is `[0, 512]`.
|
||||
fn undelegate(r: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `29555 + r * (365 ±0)`
|
||||
// Estimated: `83866 + r * (3411 ±0)`
|
||||
// Minimum execution time: 45_232_000 picoseconds.
|
||||
Weight::from_parts(2_045_021_014, 0)
|
||||
.saturating_add(Weight::from_parts(0, 83866))
|
||||
// Standard Error: 185_130
|
||||
.saturating_add(Weight::from_parts(47_896_011, 0).saturating_mul(r.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into())))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into())))
|
||||
.saturating_add(Weight::from_parts(0, 3411).saturating_mul(r.into()))
|
||||
}
|
||||
/// Storage: ConvictionVoting VotingFor (r:1 w:1)
|
||||
/// Proof: ConvictionVoting VotingFor (max_values: None, max_size: Some(27241), added: 29716, mode: MaxEncodedLen)
|
||||
/// Storage: ConvictionVoting ClassLocksFor (r:1 w:1)
|
||||
/// Proof: ConvictionVoting ClassLocksFor (max_values: None, max_size: Some(311), added: 2786, mode: MaxEncodedLen)
|
||||
/// Storage: Balances Locks (r:1 w:1)
|
||||
/// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen)
|
||||
/// Storage: Balances Freezes (r:1 w:0)
|
||||
/// Proof: Balances Freezes (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen)
|
||||
fn unlock() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `12218`
|
||||
// Estimated: `30706`
|
||||
// Minimum execution time: 116_446_000 picoseconds.
|
||||
Weight::from_parts(124_043_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 30706))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
}
|
||||
@@ -1,513 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Polkadot.
|
||||
|
||||
// Polkadot 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.
|
||||
|
||||
// Polkadot 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 Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
//! Autogenerated weights for `pallet_democracy`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-03-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./target/production/polkadot
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=kusama-dev
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --pallet=pallet_democracy
|
||||
// --extrinsic=*
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --header=./file_header.txt
|
||||
// --output=./runtime/kusama/src/weights/
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
|
||||
use frame_support::{traits::Get, weights::Weight};
|
||||
use sp_std::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pallet_democracy`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_democracy::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: Democracy PublicPropCount (r:1 w:1)
|
||||
/// Proof: Democracy PublicPropCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: Democracy PublicProps (r:1 w:1)
|
||||
/// Proof: Democracy PublicProps (max_values: Some(1), max_size: Some(16702), added: 17197, mode: MaxEncodedLen)
|
||||
/// Storage: Democracy Blacklist (r:1 w:0)
|
||||
/// Proof: Democracy Blacklist (max_values: None, max_size: Some(3238), added: 5713, mode: MaxEncodedLen)
|
||||
/// Storage: Democracy DepositOf (r:0 w:1)
|
||||
/// Proof: Democracy DepositOf (max_values: None, max_size: Some(3230), added: 5705, mode: MaxEncodedLen)
|
||||
fn propose() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `4768`
|
||||
// Estimated: `26379`
|
||||
// Minimum execution time: 35_098_000 picoseconds.
|
||||
Weight::from_parts(35_696_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 26379))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: Democracy DepositOf (r:1 w:1)
|
||||
/// Proof: Democracy DepositOf (max_values: None, max_size: Some(3230), added: 5705, mode: MaxEncodedLen)
|
||||
fn second() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `3523`
|
||||
// Estimated: `6695`
|
||||
// Minimum execution time: 32_218_000 picoseconds.
|
||||
Weight::from_parts(32_458_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6695))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: Democracy ReferendumInfoOf (r:1 w:1)
|
||||
/// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen)
|
||||
/// Storage: Democracy VotingOf (r:1 w:1)
|
||||
/// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen)
|
||||
/// Storage: Balances Locks (r:1 w:1)
|
||||
/// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen)
|
||||
fn vote_new() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `3437`
|
||||
// Estimated: `15690`
|
||||
// Minimum execution time: 46_641_000 picoseconds.
|
||||
Weight::from_parts(47_324_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 15690))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: Democracy ReferendumInfoOf (r:1 w:1)
|
||||
/// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen)
|
||||
/// Storage: Democracy VotingOf (r:1 w:1)
|
||||
/// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen)
|
||||
/// Storage: Balances Locks (r:1 w:1)
|
||||
/// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen)
|
||||
fn vote_existing() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `3459`
|
||||
// Estimated: `15690`
|
||||
// Minimum execution time: 47_172_000 picoseconds.
|
||||
Weight::from_parts(47_732_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 15690))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: Democracy ReferendumInfoOf (r:1 w:1)
|
||||
/// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen)
|
||||
/// Storage: Democracy Cancellations (r:1 w:1)
|
||||
/// Proof: Democracy Cancellations (max_values: None, max_size: Some(33), added: 2508, mode: MaxEncodedLen)
|
||||
/// Storage: Democracy MetadataOf (r:1 w:1)
|
||||
/// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen)
|
||||
fn emergency_cancel() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `333`
|
||||
// Estimated: `10682`
|
||||
// Minimum execution time: 25_744_000 picoseconds.
|
||||
Weight::from_parts(26_226_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 10682))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: Democracy PublicProps (r:1 w:1)
|
||||
/// Proof: Democracy PublicProps (max_values: Some(1), max_size: Some(16702), added: 17197, mode: MaxEncodedLen)
|
||||
/// Storage: Democracy DepositOf (r:1 w:1)
|
||||
/// Proof: Democracy DepositOf (max_values: None, max_size: Some(3230), added: 5705, mode: MaxEncodedLen)
|
||||
/// Storage: System Account (r:1 w:1)
|
||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
/// Storage: Democracy MetadataOf (r:3 w:1)
|
||||
/// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen)
|
||||
/// Storage: Democracy NextExternal (r:1 w:1)
|
||||
/// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen)
|
||||
/// Storage: Democracy ReferendumInfoOf (r:1 w:1)
|
||||
/// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen)
|
||||
/// Storage: Democracy Blacklist (r:0 w:1)
|
||||
/// Proof: Democracy Blacklist (max_values: None, max_size: Some(3238), added: 5713, mode: MaxEncodedLen)
|
||||
fn blacklist() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `5877`
|
||||
// Estimated: `42332`
|
||||
// Minimum execution time: 88_365_000 picoseconds.
|
||||
Weight::from_parts(90_080_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 42332))
|
||||
.saturating_add(T::DbWeight::get().reads(8))
|
||||
.saturating_add(T::DbWeight::get().writes(7))
|
||||
}
|
||||
/// Storage: Democracy NextExternal (r:1 w:1)
|
||||
/// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen)
|
||||
/// Storage: Democracy Blacklist (r:1 w:0)
|
||||
/// Proof: Democracy Blacklist (max_values: None, max_size: Some(3238), added: 5713, mode: MaxEncodedLen)
|
||||
fn external_propose() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `3383`
|
||||
// Estimated: `8320`
|
||||
// Minimum execution time: 12_868_000 picoseconds.
|
||||
Weight::from_parts(13_178_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 8320))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: Democracy NextExternal (r:0 w:1)
|
||||
/// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen)
|
||||
fn external_propose_majority() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 3_714_000 picoseconds.
|
||||
Weight::from_parts(3_895_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: Democracy NextExternal (r:0 w:1)
|
||||
/// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen)
|
||||
fn external_propose_default() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 3_565_000 picoseconds.
|
||||
Weight::from_parts(3_831_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: Democracy NextExternal (r:1 w:1)
|
||||
/// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen)
|
||||
/// Storage: Democracy ReferendumCount (r:1 w:1)
|
||||
/// Proof: Democracy ReferendumCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: Democracy MetadataOf (r:1 w:2)
|
||||
/// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen)
|
||||
/// Storage: Democracy ReferendumInfoOf (r:0 w:1)
|
||||
/// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen)
|
||||
fn fast_track() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `253`
|
||||
// Estimated: `6624`
|
||||
// Minimum execution time: 26_453_000 picoseconds.
|
||||
Weight::from_parts(26_938_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6624))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(5))
|
||||
}
|
||||
/// Storage: Democracy NextExternal (r:1 w:1)
|
||||
/// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen)
|
||||
/// Storage: Democracy Blacklist (r:1 w:1)
|
||||
/// Proof: Democracy Blacklist (max_values: None, max_size: Some(3238), added: 5713, mode: MaxEncodedLen)
|
||||
/// Storage: Democracy MetadataOf (r:1 w:1)
|
||||
/// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen)
|
||||
fn veto_external() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `3486`
|
||||
// Estimated: `11838`
|
||||
// Minimum execution time: 30_869_000 picoseconds.
|
||||
Weight::from_parts(31_397_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 11838))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: Democracy PublicProps (r:1 w:1)
|
||||
/// Proof: Democracy PublicProps (max_values: Some(1), max_size: Some(16702), added: 17197, mode: MaxEncodedLen)
|
||||
/// Storage: Democracy DepositOf (r:1 w:1)
|
||||
/// Proof: Democracy DepositOf (max_values: None, max_size: Some(3230), added: 5705, mode: MaxEncodedLen)
|
||||
/// Storage: System Account (r:1 w:1)
|
||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
/// Storage: Democracy MetadataOf (r:1 w:1)
|
||||
/// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen)
|
||||
fn cancel_proposal() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `5788`
|
||||
// Estimated: `31993`
|
||||
// Minimum execution time: 72_692_000 picoseconds.
|
||||
Weight::from_parts(73_692_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 31993))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
/// Storage: Democracy MetadataOf (r:1 w:1)
|
||||
/// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen)
|
||||
/// Storage: Democracy ReferendumInfoOf (r:0 w:1)
|
||||
/// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen)
|
||||
fn cancel_referendum() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `238`
|
||||
// Estimated: `3518`
|
||||
// Minimum execution time: 19_506_000 picoseconds.
|
||||
Weight::from_parts(19_823_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3518))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: Democracy LowestUnbaked (r:1 w:1)
|
||||
/// Proof: Democracy LowestUnbaked (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: Democracy ReferendumCount (r:1 w:0)
|
||||
/// Proof: Democracy ReferendumCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: Democracy ReferendumInfoOf (r:99 w:0)
|
||||
/// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen)
|
||||
/// The range of component `r` is `[0, 99]`.
|
||||
fn on_initialize_base(r: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `211 + r * (86 ±0)`
|
||||
// Estimated: `3968 + r * (2676 ±0)`
|
||||
// Minimum execution time: 6_019_000 picoseconds.
|
||||
Weight::from_parts(9_632_674, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3968))
|
||||
// Standard Error: 6_651
|
||||
.saturating_add(Weight::from_parts(2_769_264, 0).saturating_mul(r.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into())))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
.saturating_add(Weight::from_parts(0, 2676).saturating_mul(r.into()))
|
||||
}
|
||||
/// Storage: Democracy LowestUnbaked (r:1 w:1)
|
||||
/// Proof: Democracy LowestUnbaked (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: Democracy ReferendumCount (r:1 w:0)
|
||||
/// Proof: Democracy ReferendumCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: Democracy LastTabledWasExternal (r:1 w:0)
|
||||
/// Proof: Democracy LastTabledWasExternal (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen)
|
||||
/// Storage: Democracy NextExternal (r:1 w:0)
|
||||
/// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen)
|
||||
/// Storage: Democracy PublicProps (r:1 w:0)
|
||||
/// Proof: Democracy PublicProps (max_values: Some(1), max_size: Some(16702), added: 17197, mode: MaxEncodedLen)
|
||||
/// Storage: Democracy ReferendumInfoOf (r:99 w:0)
|
||||
/// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen)
|
||||
/// The range of component `r` is `[0, 99]`.
|
||||
fn on_initialize_base_with_launch_period(r: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `211 + r * (86 ±0)`
|
||||
// Estimated: `25258 + r * (2676 ±0)`
|
||||
// Minimum execution time: 9_143_000 picoseconds.
|
||||
Weight::from_parts(12_247_629, 0)
|
||||
.saturating_add(Weight::from_parts(0, 25258))
|
||||
// Standard Error: 6_077
|
||||
.saturating_add(Weight::from_parts(2_764_547, 0).saturating_mul(r.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(5))
|
||||
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into())))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
.saturating_add(Weight::from_parts(0, 2676).saturating_mul(r.into()))
|
||||
}
|
||||
/// Storage: Democracy VotingOf (r:3 w:3)
|
||||
/// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen)
|
||||
/// Storage: Democracy ReferendumInfoOf (r:99 w:99)
|
||||
/// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen)
|
||||
/// Storage: Balances Locks (r:1 w:1)
|
||||
/// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen)
|
||||
/// The range of component `r` is `[0, 99]`.
|
||||
fn delegate(r: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `797 + r * (108 ±0)`
|
||||
// Estimated: `25554 + r * (2676 ±0)`
|
||||
// Minimum execution time: 41_153_000 picoseconds.
|
||||
Weight::from_parts(42_787_487, 0)
|
||||
.saturating_add(Weight::from_parts(0, 25554))
|
||||
// Standard Error: 7_883
|
||||
.saturating_add(Weight::from_parts(3_862_521, 0).saturating_mul(r.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into())))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into())))
|
||||
.saturating_add(Weight::from_parts(0, 2676).saturating_mul(r.into()))
|
||||
}
|
||||
/// Storage: Democracy VotingOf (r:2 w:2)
|
||||
/// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen)
|
||||
/// Storage: Democracy ReferendumInfoOf (r:99 w:99)
|
||||
/// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen)
|
||||
/// The range of component `r` is `[0, 99]`.
|
||||
fn undelegate(r: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `460 + r * (108 ±0)`
|
||||
// Estimated: `14520 + r * (2676 ±0)`
|
||||
// Minimum execution time: 20_767_000 picoseconds.
|
||||
Weight::from_parts(21_768_239, 0)
|
||||
.saturating_add(Weight::from_parts(0, 14520))
|
||||
// Standard Error: 9_791
|
||||
.saturating_add(Weight::from_parts(3_862_103, 0).saturating_mul(r.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into())))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into())))
|
||||
.saturating_add(Weight::from_parts(0, 2676).saturating_mul(r.into()))
|
||||
}
|
||||
/// Storage: Democracy PublicProps (r:0 w:1)
|
||||
/// Proof: Democracy PublicProps (max_values: Some(1), max_size: Some(16702), added: 17197, mode: MaxEncodedLen)
|
||||
fn clear_public_proposals() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 3_663_000 picoseconds.
|
||||
Weight::from_parts(3_798_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: Democracy VotingOf (r:1 w:1)
|
||||
/// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen)
|
||||
/// Storage: Balances Locks (r:1 w:1)
|
||||
/// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, 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 `r` is `[0, 99]`.
|
||||
fn unlock_remove(r: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `530`
|
||||
// Estimated: `15617`
|
||||
// Minimum execution time: 19_923_000 picoseconds.
|
||||
Weight::from_parts(25_945_279, 0)
|
||||
.saturating_add(Weight::from_parts(0, 15617))
|
||||
// Standard Error: 1_366
|
||||
.saturating_add(Weight::from_parts(22_003, 0).saturating_mul(r.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: Democracy VotingOf (r:1 w:1)
|
||||
/// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen)
|
||||
/// Storage: Balances Locks (r:1 w:1)
|
||||
/// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, 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 `r` is `[0, 99]`.
|
||||
fn unlock_set(r: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `531 + r * (22 ±0)`
|
||||
// Estimated: `15617`
|
||||
// Minimum execution time: 24_393_000 picoseconds.
|
||||
Weight::from_parts(25_690_593, 0)
|
||||
.saturating_add(Weight::from_parts(0, 15617))
|
||||
// Standard Error: 553
|
||||
.saturating_add(Weight::from_parts(59_042, 0).saturating_mul(r.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: Democracy ReferendumInfoOf (r:1 w:1)
|
||||
/// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen)
|
||||
/// Storage: Democracy VotingOf (r:1 w:1)
|
||||
/// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen)
|
||||
/// The range of component `r` is `[1, 100]`.
|
||||
fn remove_vote(r: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `695 + r * (26 ±0)`
|
||||
// Estimated: `10926`
|
||||
// Minimum execution time: 15_551_000 picoseconds.
|
||||
Weight::from_parts(17_809_948, 0)
|
||||
.saturating_add(Weight::from_parts(0, 10926))
|
||||
// Standard Error: 1_907
|
||||
.saturating_add(Weight::from_parts(86_496, 0).saturating_mul(r.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: Democracy ReferendumInfoOf (r:1 w:1)
|
||||
/// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen)
|
||||
/// Storage: Democracy VotingOf (r:1 w:1)
|
||||
/// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen)
|
||||
/// The range of component `r` is `[1, 100]`.
|
||||
fn remove_other_vote(r: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `695 + r * (26 ±0)`
|
||||
// Estimated: `10926`
|
||||
// Minimum execution time: 16_027_000 picoseconds.
|
||||
Weight::from_parts(17_860_077, 0)
|
||||
.saturating_add(Weight::from_parts(0, 10926))
|
||||
// Standard Error: 1_950
|
||||
.saturating_add(Weight::from_parts(87_722, 0).saturating_mul(r.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: Democracy NextExternal (r:1 w:0)
|
||||
/// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen)
|
||||
/// Storage: Preimage StatusFor (r:1 w:0)
|
||||
/// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen)
|
||||
/// Storage: Democracy MetadataOf (r:0 w:1)
|
||||
/// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen)
|
||||
fn set_external_metadata() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `323`
|
||||
// Estimated: `5173`
|
||||
// Minimum execution time: 17_551_000 picoseconds.
|
||||
Weight::from_parts(17_776_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 5173))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: Democracy NextExternal (r:1 w:0)
|
||||
/// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen)
|
||||
/// Storage: Democracy MetadataOf (r:1 w:1)
|
||||
/// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen)
|
||||
fn clear_external_metadata() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `253`
|
||||
// Estimated: `5135`
|
||||
// Minimum execution time: 16_020_000 picoseconds.
|
||||
Weight::from_parts(16_477_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 5135))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: Democracy PublicProps (r:1 w:0)
|
||||
/// Proof: Democracy PublicProps (max_values: Some(1), max_size: Some(16702), added: 17197, mode: MaxEncodedLen)
|
||||
/// Storage: Preimage StatusFor (r:1 w:0)
|
||||
/// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen)
|
||||
/// Storage: Democracy MetadataOf (r:0 w:1)
|
||||
/// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen)
|
||||
fn set_proposal_metadata() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `4855`
|
||||
// Estimated: `21743`
|
||||
// Minimum execution time: 33_144_000 picoseconds.
|
||||
Weight::from_parts(33_457_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 21743))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: Democracy PublicProps (r:1 w:0)
|
||||
/// Proof: Democracy PublicProps (max_values: Some(1), max_size: Some(16702), added: 17197, mode: MaxEncodedLen)
|
||||
/// Storage: Democracy MetadataOf (r:1 w:1)
|
||||
/// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen)
|
||||
fn clear_proposal_metadata() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `4789`
|
||||
// Estimated: `21705`
|
||||
// Minimum execution time: 31_022_000 picoseconds.
|
||||
Weight::from_parts(31_534_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 21705))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: Preimage StatusFor (r:1 w:0)
|
||||
/// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen)
|
||||
/// Storage: Democracy MetadataOf (r:0 w:1)
|
||||
/// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen)
|
||||
fn set_referendum_metadata() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `144`
|
||||
// Estimated: `3556`
|
||||
// Minimum execution time: 14_512_000 picoseconds.
|
||||
Weight::from_parts(14_769_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3556))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: Democracy ReferendumInfoOf (r:1 w:0)
|
||||
/// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen)
|
||||
/// Storage: Democracy MetadataOf (r:1 w:1)
|
||||
/// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen)
|
||||
fn clear_referendum_metadata() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `269`
|
||||
// Estimated: `7184`
|
||||
// Minimum execution time: 17_966_000 picoseconds.
|
||||
Weight::from_parts(18_270_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 7184))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
}
|
||||
@@ -1,272 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Polkadot.
|
||||
|
||||
// Polkadot 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.
|
||||
|
||||
// Polkadot 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 Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pallet_election_provider_multi_phase`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-06-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `runner-e8ezs4ez-project-163-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./target/production/polkadot
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=kusama-dev
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --no-storage-info
|
||||
// --no-median-slopes
|
||||
// --no-min-squares
|
||||
// --pallet=pallet_election_provider_multi_phase
|
||||
// --extrinsic=*
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --header=./file_header.txt
|
||||
// --output=./runtime/kusama/src/weights/
|
||||
|
||||
#![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_election_provider_multi_phase`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_election_provider_multi_phase::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: Staking CurrentEra (r:1 w:0)
|
||||
/// Proof: Staking CurrentEra (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: Staking CurrentPlannedSession (r:1 w:0)
|
||||
/// Proof: Staking CurrentPlannedSession (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: Staking ErasStartSessionIndex (r:1 w:0)
|
||||
/// Proof: Staking ErasStartSessionIndex (max_values: None, max_size: Some(16), added: 2491, mode: MaxEncodedLen)
|
||||
/// Storage: Babe EpochIndex (r:1 w:0)
|
||||
/// Proof: Babe EpochIndex (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen)
|
||||
/// Storage: Babe GenesisSlot (r:1 w:0)
|
||||
/// Proof: Babe GenesisSlot (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen)
|
||||
/// Storage: Babe CurrentSlot (r:1 w:0)
|
||||
/// Proof: Babe CurrentSlot (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen)
|
||||
/// Storage: Staking ForceEra (r:1 w:0)
|
||||
/// Proof: Staking ForceEra (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen)
|
||||
/// Storage: ElectionProviderMultiPhase CurrentPhase (r:1 w:0)
|
||||
/// Proof Skipped: ElectionProviderMultiPhase CurrentPhase (max_values: Some(1), max_size: None, mode: Measured)
|
||||
fn on_initialize_nothing() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `959`
|
||||
// Estimated: `3481`
|
||||
// Minimum execution time: 21_207_000 picoseconds.
|
||||
Weight::from_parts(22_059_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3481))
|
||||
.saturating_add(T::DbWeight::get().reads(8))
|
||||
}
|
||||
/// Storage: ElectionProviderMultiPhase Round (r:1 w:0)
|
||||
/// Proof Skipped: ElectionProviderMultiPhase Round (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: ElectionProviderMultiPhase CurrentPhase (r:1 w:1)
|
||||
/// Proof Skipped: ElectionProviderMultiPhase CurrentPhase (max_values: Some(1), max_size: None, mode: Measured)
|
||||
fn on_initialize_open_signed() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `80`
|
||||
// Estimated: `1565`
|
||||
// Minimum execution time: 11_472_000 picoseconds.
|
||||
Weight::from_parts(11_772_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 1565))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: ElectionProviderMultiPhase Round (r:1 w:0)
|
||||
/// Proof Skipped: ElectionProviderMultiPhase Round (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: ElectionProviderMultiPhase CurrentPhase (r:1 w:1)
|
||||
/// Proof Skipped: ElectionProviderMultiPhase CurrentPhase (max_values: Some(1), max_size: None, mode: Measured)
|
||||
fn on_initialize_open_unsigned() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `80`
|
||||
// Estimated: `1565`
|
||||
// Minimum execution time: 12_466_000 picoseconds.
|
||||
Weight::from_parts(12_954_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 1565))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: System Account (r:1 w:1)
|
||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
/// Storage: ElectionProviderMultiPhase QueuedSolution (r:0 w:1)
|
||||
/// Proof Skipped: ElectionProviderMultiPhase QueuedSolution (max_values: Some(1), max_size: None, mode: Measured)
|
||||
fn finalize_signed_phase_accept_solution() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `174`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 31_347_000 picoseconds.
|
||||
Weight::from_parts(32_088_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3593))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: System Account (r:1 w:1)
|
||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
fn finalize_signed_phase_reject_solution() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `174`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 21_061_000 picoseconds.
|
||||
Weight::from_parts(21_819_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3593))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: ElectionProviderMultiPhase SnapshotMetadata (r:0 w:1)
|
||||
/// Proof Skipped: ElectionProviderMultiPhase SnapshotMetadata (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: ElectionProviderMultiPhase DesiredTargets (r:0 w:1)
|
||||
/// Proof Skipped: ElectionProviderMultiPhase DesiredTargets (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: ElectionProviderMultiPhase Snapshot (r:0 w:1)
|
||||
/// Proof Skipped: ElectionProviderMultiPhase Snapshot (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// The range of component `v` is `[1000, 2000]`.
|
||||
/// The range of component `t` is `[500, 1000]`.
|
||||
fn create_snapshot_internal(v: u32, _t: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 796_200_000 picoseconds.
|
||||
Weight::from_parts(848_268_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
// Standard Error: 6_942
|
||||
.saturating_add(Weight::from_parts(625_196, 0).saturating_mul(v.into()))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: ElectionProviderMultiPhase SignedSubmissionIndices (r:1 w:1)
|
||||
/// Proof Skipped: ElectionProviderMultiPhase SignedSubmissionIndices (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: ElectionProviderMultiPhase SignedSubmissionNextIndex (r:1 w:1)
|
||||
/// Proof Skipped: ElectionProviderMultiPhase SignedSubmissionNextIndex (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: ElectionProviderMultiPhase SnapshotMetadata (r:1 w:1)
|
||||
/// Proof Skipped: ElectionProviderMultiPhase SnapshotMetadata (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: ElectionProviderMultiPhase SignedSubmissionsMap (r:1 w:0)
|
||||
/// Proof Skipped: ElectionProviderMultiPhase SignedSubmissionsMap (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: System BlockWeight (r:1 w:1)
|
||||
/// Proof: System BlockWeight (max_values: Some(1), max_size: Some(48), added: 543, mode: MaxEncodedLen)
|
||||
/// Storage: ElectionProviderMultiPhase QueuedSolution (r:1 w:1)
|
||||
/// Proof Skipped: ElectionProviderMultiPhase QueuedSolution (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: ElectionProviderMultiPhase Round (r:1 w:1)
|
||||
/// Proof Skipped: ElectionProviderMultiPhase Round (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: ElectionProviderMultiPhase CurrentPhase (r:1 w:1)
|
||||
/// Proof Skipped: ElectionProviderMultiPhase CurrentPhase (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: ElectionProviderMultiPhase DesiredTargets (r:0 w:1)
|
||||
/// Proof Skipped: ElectionProviderMultiPhase DesiredTargets (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: ElectionProviderMultiPhase Snapshot (r:0 w:1)
|
||||
/// Proof Skipped: ElectionProviderMultiPhase Snapshot (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// The range of component `a` is `[500, 800]`.
|
||||
/// The range of component `d` is `[200, 400]`.
|
||||
fn elect_queued(a: u32, d: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `832 + a * (1152 ±0) + d * (47 ±0)`
|
||||
// Estimated: `4282 + a * (1152 ±0) + d * (48 ±0)`
|
||||
// Minimum execution time: 598_364_000 picoseconds.
|
||||
Weight::from_parts(3_028_177, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4282))
|
||||
// Standard Error: 29_462
|
||||
.saturating_add(Weight::from_parts(1_292_240, 0).saturating_mul(a.into()))
|
||||
// Standard Error: 44_163
|
||||
.saturating_add(Weight::from_parts(113_479, 0).saturating_mul(d.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(8))
|
||||
.saturating_add(T::DbWeight::get().writes(9))
|
||||
.saturating_add(Weight::from_parts(0, 1152).saturating_mul(a.into()))
|
||||
.saturating_add(Weight::from_parts(0, 48).saturating_mul(d.into()))
|
||||
}
|
||||
/// Storage: ElectionProviderMultiPhase CurrentPhase (r:1 w:0)
|
||||
/// Proof Skipped: ElectionProviderMultiPhase CurrentPhase (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: ElectionProviderMultiPhase SnapshotMetadata (r:1 w:0)
|
||||
/// Proof Skipped: ElectionProviderMultiPhase SnapshotMetadata (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: TransactionPayment NextFeeMultiplier (r:1 w:0)
|
||||
/// Proof: TransactionPayment NextFeeMultiplier (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen)
|
||||
/// Storage: ElectionProviderMultiPhase SignedSubmissionIndices (r:1 w:1)
|
||||
/// Proof Skipped: ElectionProviderMultiPhase SignedSubmissionIndices (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: ElectionProviderMultiPhase SignedSubmissionNextIndex (r:1 w:1)
|
||||
/// Proof Skipped: ElectionProviderMultiPhase SignedSubmissionNextIndex (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: ElectionProviderMultiPhase SignedSubmissionsMap (r:0 w:1)
|
||||
/// Proof Skipped: ElectionProviderMultiPhase SignedSubmissionsMap (max_values: None, max_size: None, mode: Measured)
|
||||
fn submit() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `1170`
|
||||
// Estimated: `2655`
|
||||
// Minimum execution time: 50_887_000 picoseconds.
|
||||
Weight::from_parts(53_335_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 2655))
|
||||
.saturating_add(T::DbWeight::get().reads(5))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: ElectionProviderMultiPhase CurrentPhase (r:1 w:0)
|
||||
/// Proof Skipped: ElectionProviderMultiPhase CurrentPhase (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: ElectionProviderMultiPhase Round (r:1 w:0)
|
||||
/// Proof Skipped: ElectionProviderMultiPhase Round (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: ElectionProviderMultiPhase DesiredTargets (r:1 w:0)
|
||||
/// Proof Skipped: ElectionProviderMultiPhase DesiredTargets (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: ElectionProviderMultiPhase QueuedSolution (r:1 w:1)
|
||||
/// Proof Skipped: ElectionProviderMultiPhase QueuedSolution (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: ElectionProviderMultiPhase SnapshotMetadata (r:1 w:0)
|
||||
/// Proof Skipped: ElectionProviderMultiPhase SnapshotMetadata (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: ElectionProviderMultiPhase Snapshot (r:1 w:0)
|
||||
/// Proof Skipped: ElectionProviderMultiPhase Snapshot (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: ElectionProviderMultiPhase MinimumUntrustedScore (r:1 w:0)
|
||||
/// Proof Skipped: ElectionProviderMultiPhase MinimumUntrustedScore (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// The range of component `v` is `[1000, 2000]`.
|
||||
/// The range of component `t` is `[500, 1000]`.
|
||||
/// The range of component `a` is `[500, 800]`.
|
||||
/// The range of component `d` is `[200, 400]`.
|
||||
fn submit_unsigned(v: u32, t: u32, a: u32, _d: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `185 + t * (32 ±0) + v * (809 ±0)`
|
||||
// Estimated: `1670 + t * (32 ±0) + v * (809 ±0)`
|
||||
// Minimum execution time: 9_246_269_000 picoseconds.
|
||||
Weight::from_parts(9_558_256_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 1670))
|
||||
// Standard Error: 40_767
|
||||
.saturating_add(Weight::from_parts(476_361, 0).saturating_mul(v.into()))
|
||||
// Standard Error: 120_810
|
||||
.saturating_add(Weight::from_parts(7_762_441, 0).saturating_mul(a.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(7))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
.saturating_add(Weight::from_parts(0, 32).saturating_mul(t.into()))
|
||||
.saturating_add(Weight::from_parts(0, 809).saturating_mul(v.into()))
|
||||
}
|
||||
/// Storage: ElectionProviderMultiPhase DesiredTargets (r:1 w:0)
|
||||
/// Proof Skipped: ElectionProviderMultiPhase DesiredTargets (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: ElectionProviderMultiPhase Snapshot (r:1 w:0)
|
||||
/// Proof Skipped: ElectionProviderMultiPhase Snapshot (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: ElectionProviderMultiPhase Round (r:1 w:0)
|
||||
/// Proof Skipped: ElectionProviderMultiPhase Round (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: ElectionProviderMultiPhase MinimumUntrustedScore (r:1 w:0)
|
||||
/// Proof Skipped: ElectionProviderMultiPhase MinimumUntrustedScore (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// The range of component `v` is `[1000, 2000]`.
|
||||
/// The range of component `t` is `[500, 1000]`.
|
||||
/// The range of component `a` is `[500, 800]`.
|
||||
/// The range of component `d` is `[200, 400]`.
|
||||
fn feasibility_check(v: u32, t: u32, a: u32, _d: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `160 + t * (32 ±0) + v * (809 ±0)`
|
||||
// Estimated: `1645 + t * (32 ±0) + v * (809 ±0)`
|
||||
// Minimum execution time: 7_414_707_000 picoseconds.
|
||||
Weight::from_parts(7_699_413_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 1645))
|
||||
// Standard Error: 29_542
|
||||
.saturating_add(Weight::from_parts(312_856, 0).saturating_mul(v.into()))
|
||||
// Standard Error: 87_545
|
||||
.saturating_add(Weight::from_parts(5_993_730, 0).saturating_mul(a.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(Weight::from_parts(0, 32).saturating_mul(t.into()))
|
||||
.saturating_add(Weight::from_parts(0, 809).saturating_mul(v.into()))
|
||||
}
|
||||
}
|
||||
@@ -1,303 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Polkadot.
|
||||
|
||||
// Polkadot 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.
|
||||
|
||||
// Polkadot 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 Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
//! Autogenerated weights for `pallet_elections_phragmen`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-03-16, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./target/production/polkadot
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=kusama-dev
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --pallet=pallet_elections_phragmen
|
||||
// --extrinsic=*
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --header=./file_header.txt
|
||||
// --output=./runtime/kusama/src/weights/
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
|
||||
use frame_support::{traits::Get, weights::Weight};
|
||||
use sp_std::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pallet_elections_phragmen`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_elections_phragmen::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: PhragmenElection Candidates (r:1 w:0)
|
||||
/// Proof Skipped: PhragmenElection Candidates (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: PhragmenElection Members (r:1 w:0)
|
||||
/// Proof Skipped: PhragmenElection Members (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: PhragmenElection RunnersUp (r:1 w:0)
|
||||
/// Proof Skipped: PhragmenElection RunnersUp (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: PhragmenElection Voting (r:1 w:1)
|
||||
/// Proof Skipped: PhragmenElection Voting (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Balances Locks (r:1 w:1)
|
||||
/// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen)
|
||||
/// The range of component `v` is `[1, 16]`.
|
||||
fn vote_equal(v: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `403 + v * (80 ±0)`
|
||||
// Estimated: `14292 + v * (320 ±0)`
|
||||
// Minimum execution time: 27_353_000 picoseconds.
|
||||
Weight::from_parts(28_103_445, 0)
|
||||
.saturating_add(Weight::from_parts(0, 14292))
|
||||
// Standard Error: 4_556
|
||||
.saturating_add(Weight::from_parts(117_766, 0).saturating_mul(v.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(5))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
.saturating_add(Weight::from_parts(0, 320).saturating_mul(v.into()))
|
||||
}
|
||||
/// Storage: PhragmenElection Candidates (r:1 w:0)
|
||||
/// Proof Skipped: PhragmenElection Candidates (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: PhragmenElection Members (r:1 w:0)
|
||||
/// Proof Skipped: PhragmenElection Members (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: PhragmenElection RunnersUp (r:1 w:0)
|
||||
/// Proof Skipped: PhragmenElection RunnersUp (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: PhragmenElection Voting (r:1 w:1)
|
||||
/// Proof Skipped: PhragmenElection Voting (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Balances Locks (r:1 w:1)
|
||||
/// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen)
|
||||
/// The range of component `v` is `[2, 16]`.
|
||||
fn vote_more(v: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `371 + v * (80 ±0)`
|
||||
// Estimated: `14164 + v * (320 ±0)`
|
||||
// Minimum execution time: 36_885_000 picoseconds.
|
||||
Weight::from_parts(37_769_975, 0)
|
||||
.saturating_add(Weight::from_parts(0, 14164))
|
||||
// Standard Error: 6_586
|
||||
.saturating_add(Weight::from_parts(123_567, 0).saturating_mul(v.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(5))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
.saturating_add(Weight::from_parts(0, 320).saturating_mul(v.into()))
|
||||
}
|
||||
/// Storage: PhragmenElection Candidates (r:1 w:0)
|
||||
/// Proof Skipped: PhragmenElection Candidates (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: PhragmenElection Members (r:1 w:0)
|
||||
/// Proof Skipped: PhragmenElection Members (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: PhragmenElection RunnersUp (r:1 w:0)
|
||||
/// Proof Skipped: PhragmenElection RunnersUp (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: PhragmenElection Voting (r:1 w:1)
|
||||
/// Proof Skipped: PhragmenElection Voting (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Balances Locks (r:1 w:1)
|
||||
/// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen)
|
||||
/// The range of component `v` is `[2, 16]`.
|
||||
fn vote_less(v: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `403 + v * (80 ±0)`
|
||||
// Estimated: `14292 + v * (320 ±0)`
|
||||
// Minimum execution time: 36_610_000 picoseconds.
|
||||
Weight::from_parts(37_524_808, 0)
|
||||
.saturating_add(Weight::from_parts(0, 14292))
|
||||
// Standard Error: 6_164
|
||||
.saturating_add(Weight::from_parts(147_944, 0).saturating_mul(v.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(5))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
.saturating_add(Weight::from_parts(0, 320).saturating_mul(v.into()))
|
||||
}
|
||||
/// Storage: PhragmenElection Voting (r:1 w:1)
|
||||
/// Proof Skipped: PhragmenElection Voting (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Balances Locks (r:1 w:1)
|
||||
/// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen)
|
||||
fn remove_voter() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `925`
|
||||
// Estimated: `9154`
|
||||
// Minimum execution time: 33_052_000 picoseconds.
|
||||
Weight::from_parts(33_677_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 9154))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: PhragmenElection Candidates (r:1 w:1)
|
||||
/// Proof Skipped: PhragmenElection Candidates (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: PhragmenElection Members (r:1 w:0)
|
||||
/// Proof Skipped: PhragmenElection Members (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: PhragmenElection RunnersUp (r:1 w:0)
|
||||
/// Proof Skipped: PhragmenElection RunnersUp (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// The range of component `c` is `[1, 1000]`.
|
||||
fn submit_candidacy(c: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `2712 + c * (48 ±0)`
|
||||
// Estimated: `12585 + c * (144 ±0)`
|
||||
// Minimum execution time: 32_163_000 picoseconds.
|
||||
Weight::from_parts(24_757_419, 0)
|
||||
.saturating_add(Weight::from_parts(0, 12585))
|
||||
// Standard Error: 902
|
||||
.saturating_add(Weight::from_parts(79_765, 0).saturating_mul(c.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
.saturating_add(Weight::from_parts(0, 144).saturating_mul(c.into()))
|
||||
}
|
||||
/// Storage: PhragmenElection Candidates (r:1 w:1)
|
||||
/// Proof Skipped: PhragmenElection Candidates (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// The range of component `c` is `[1, 1000]`.
|
||||
fn renounce_candidacy_candidate(c: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `284 + c * (48 ±0)`
|
||||
// Estimated: `1756 + c * (48 ±0)`
|
||||
// Minimum execution time: 24_805_000 picoseconds.
|
||||
Weight::from_parts(17_940_635, 0)
|
||||
.saturating_add(Weight::from_parts(0, 1756))
|
||||
// Standard Error: 888
|
||||
.saturating_add(Weight::from_parts(59_369, 0).saturating_mul(c.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
.saturating_add(Weight::from_parts(0, 48).saturating_mul(c.into()))
|
||||
}
|
||||
/// Storage: PhragmenElection Members (r:1 w:1)
|
||||
/// Proof Skipped: PhragmenElection Members (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: PhragmenElection RunnersUp (r:1 w:1)
|
||||
/// Proof Skipped: PhragmenElection RunnersUp (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Council Prime (r:1 w:1)
|
||||
/// Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Council Proposals (r:1 w:0)
|
||||
/// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Council Members (r:0 w:1)
|
||||
/// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured)
|
||||
fn renounce_candidacy_members() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `2986`
|
||||
// Estimated: `20870`
|
||||
// Minimum execution time: 42_908_000 picoseconds.
|
||||
Weight::from_parts(43_409_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 20870))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
/// Storage: PhragmenElection RunnersUp (r:1 w:1)
|
||||
/// Proof Skipped: PhragmenElection RunnersUp (max_values: Some(1), max_size: None, mode: Measured)
|
||||
fn renounce_candidacy_runners_up() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `1681`
|
||||
// Estimated: `3166`
|
||||
// Minimum execution time: 27_419_000 picoseconds.
|
||||
Weight::from_parts(27_912_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3166))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: Benchmark Override (r:0 w:0)
|
||||
/// Proof Skipped: Benchmark Override (max_values: None, max_size: None, mode: Measured)
|
||||
fn remove_member_without_replacement() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_000_000_000_000 picoseconds.
|
||||
Weight::from_parts(2_000_000_000_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
/// Storage: PhragmenElection Members (r:1 w:1)
|
||||
/// Proof Skipped: PhragmenElection Members (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: System Account (r:1 w:1)
|
||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
/// Storage: PhragmenElection RunnersUp (r:1 w:1)
|
||||
/// Proof Skipped: PhragmenElection RunnersUp (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Council Prime (r:1 w:1)
|
||||
/// Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Council Proposals (r:1 w:0)
|
||||
/// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Council Members (r:0 w:1)
|
||||
/// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured)
|
||||
fn remove_member_with_replacement() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `2986`
|
||||
// Estimated: `24463`
|
||||
// Minimum execution time: 57_465_000 picoseconds.
|
||||
Weight::from_parts(58_107_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 24463))
|
||||
.saturating_add(T::DbWeight::get().reads(5))
|
||||
.saturating_add(T::DbWeight::get().writes(5))
|
||||
}
|
||||
/// Storage: PhragmenElection Voting (r:10001 w:10000)
|
||||
/// Proof Skipped: PhragmenElection Voting (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: PhragmenElection Members (r:1 w:0)
|
||||
/// Proof Skipped: PhragmenElection Members (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: PhragmenElection RunnersUp (r:1 w:0)
|
||||
/// Proof Skipped: PhragmenElection RunnersUp (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: PhragmenElection Candidates (r:1 w:0)
|
||||
/// Proof Skipped: PhragmenElection Candidates (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Balances Locks (r:10000 w:10000)
|
||||
/// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen)
|
||||
/// Storage: System Account (r:10000 w:10000)
|
||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
/// The range of component `v` is `[5000, 10000]`.
|
||||
/// The range of component `d` is `[0, 5000]`.
|
||||
fn clean_defunct_voters(v: u32, _d: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `35989 + v * (808 ±0)`
|
||||
// Estimated: `154956 + v * (12084 ±0)`
|
||||
// Minimum execution time: 319_677_473_000 picoseconds.
|
||||
Weight::from_parts(320_382_361_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 154956))
|
||||
// Standard Error: 270_292
|
||||
.saturating_add(Weight::from_parts(38_671_603, 0).saturating_mul(v.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(v.into())))
|
||||
.saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(v.into())))
|
||||
.saturating_add(Weight::from_parts(0, 12084).saturating_mul(v.into()))
|
||||
}
|
||||
/// Storage: PhragmenElection Candidates (r:1 w:1)
|
||||
/// Proof Skipped: PhragmenElection Candidates (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: PhragmenElection Members (r:1 w:1)
|
||||
/// Proof Skipped: PhragmenElection Members (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: PhragmenElection RunnersUp (r:1 w:1)
|
||||
/// Proof Skipped: PhragmenElection RunnersUp (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: PhragmenElection Voting (r:10001 w:0)
|
||||
/// Proof Skipped: PhragmenElection Voting (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Council Proposals (r:1 w:0)
|
||||
/// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: System Account (r:962 w:962)
|
||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
/// Storage: PhragmenElection ElectionRounds (r:1 w:1)
|
||||
/// Proof Skipped: PhragmenElection ElectionRounds (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Council Members (r:0 w:1)
|
||||
/// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Council Prime (r:0 w:1)
|
||||
/// Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// The range of component `c` is `[1, 1000]`.
|
||||
/// The range of component `v` is `[1, 10000]`.
|
||||
/// The range of component `e` is `[10000, 160000]`.
|
||||
fn election_phragmen(c: u32, v: u32, e: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0 + v * (607 ±0) + e * (28 ±0)`
|
||||
// Estimated: `4839313 + v * (5481 ±4) + e * (123 ±0) + c * (2560 ±0)`
|
||||
// Minimum execution time: 30_795_431_000 picoseconds.
|
||||
Weight::from_parts(30_861_700_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4839313))
|
||||
// Standard Error: 482_348
|
||||
.saturating_add(Weight::from_parts(37_626_560, 0).saturating_mul(v.into()))
|
||||
// Standard Error: 30_954
|
||||
.saturating_add(Weight::from_parts(2_016_889, 0).saturating_mul(e.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(265))
|
||||
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(c.into())))
|
||||
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(v.into())))
|
||||
.saturating_add(T::DbWeight::get().writes(6))
|
||||
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(c.into())))
|
||||
.saturating_add(Weight::from_parts(0, 5481).saturating_mul(v.into()))
|
||||
.saturating_add(Weight::from_parts(0, 123).saturating_mul(e.into()))
|
||||
.saturating_add(Weight::from_parts(0, 2560).saturating_mul(c.into()))
|
||||
}
|
||||
}
|
||||
@@ -1,203 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Polkadot.
|
||||
|
||||
// Polkadot 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.
|
||||
|
||||
// Polkadot 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 Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pallet_fast_unstake`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-06-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `runner-e8ezs4ez-project-163-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./target/production/polkadot
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=kusama-dev
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --no-storage-info
|
||||
// --no-median-slopes
|
||||
// --no-min-squares
|
||||
// --pallet=pallet_fast_unstake
|
||||
// --extrinsic=*
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --header=./file_header.txt
|
||||
// --output=./runtime/kusama/src/weights/
|
||||
|
||||
#![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_fast_unstake`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_fast_unstake::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: FastUnstake ErasToCheckPerBlock (r:1 w:0)
|
||||
/// Proof: FastUnstake ErasToCheckPerBlock (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: Staking ValidatorCount (r:1 w:0)
|
||||
/// Proof: Staking ValidatorCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: FastUnstake Head (r:1 w:1)
|
||||
/// Proof: FastUnstake Head (max_values: Some(1), max_size: Some(3191), added: 3686, mode: MaxEncodedLen)
|
||||
/// Storage: FastUnstake CounterForQueue (r:1 w:0)
|
||||
/// Proof: FastUnstake CounterForQueue (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: ElectionProviderMultiPhase CurrentPhase (r:1 w:0)
|
||||
/// Proof Skipped: ElectionProviderMultiPhase CurrentPhase (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Staking CurrentEra (r:1 w:0)
|
||||
/// Proof: Staking CurrentEra (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: Staking SlashingSpans (r:64 w:0)
|
||||
/// Proof Skipped: Staking SlashingSpans (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Staking Bonded (r:64 w:64)
|
||||
/// Proof: Staking Bonded (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen)
|
||||
/// Storage: Staking Validators (r:64 w:0)
|
||||
/// Proof: Staking Validators (max_values: None, max_size: Some(45), added: 2520, mode: MaxEncodedLen)
|
||||
/// Storage: Staking Nominators (r:64 w:0)
|
||||
/// Proof: Staking Nominators (max_values: None, max_size: Some(814), added: 3289, mode: MaxEncodedLen)
|
||||
/// Storage: System Account (r:64 w:64)
|
||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
/// Storage: Balances Locks (r:64 w:64)
|
||||
/// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen)
|
||||
/// Storage: Balances Freezes (r:64 w:0)
|
||||
/// Proof: Balances Freezes (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen)
|
||||
/// Storage: Staking Ledger (r:0 w:64)
|
||||
/// Proof: Staking Ledger (max_values: None, max_size: Some(1091), added: 3566, mode: MaxEncodedLen)
|
||||
/// Storage: Staking Payee (r:0 w:64)
|
||||
/// Proof: Staking Payee (max_values: None, max_size: Some(73), added: 2548, mode: MaxEncodedLen)
|
||||
/// The range of component `b` is `[1, 64]`.
|
||||
fn on_idle_unstake(b: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `1176 + b * (343 ±0)`
|
||||
// Estimated: `4676 + b * (3774 ±0)`
|
||||
// Minimum execution time: 90_522_000 picoseconds.
|
||||
Weight::from_parts(30_621_885, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4676))
|
||||
// Standard Error: 35_474
|
||||
.saturating_add(Weight::from_parts(58_149_619, 0).saturating_mul(b.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(6))
|
||||
.saturating_add(T::DbWeight::get().reads((7_u64).saturating_mul(b.into())))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
.saturating_add(T::DbWeight::get().writes((5_u64).saturating_mul(b.into())))
|
||||
.saturating_add(Weight::from_parts(0, 3774).saturating_mul(b.into()))
|
||||
}
|
||||
/// Storage: FastUnstake ErasToCheckPerBlock (r:1 w:0)
|
||||
/// Proof: FastUnstake ErasToCheckPerBlock (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: Staking ValidatorCount (r:1 w:0)
|
||||
/// Proof: Staking ValidatorCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: FastUnstake Head (r:1 w:1)
|
||||
/// Proof: FastUnstake Head (max_values: Some(1), max_size: Some(3191), added: 3686, mode: MaxEncodedLen)
|
||||
/// Storage: FastUnstake CounterForQueue (r:1 w:0)
|
||||
/// Proof: FastUnstake CounterForQueue (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: ElectionProviderMultiPhase CurrentPhase (r:1 w:0)
|
||||
/// Proof Skipped: ElectionProviderMultiPhase CurrentPhase (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Staking CurrentEra (r:1 w:0)
|
||||
/// Proof: Staking CurrentEra (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: Staking ErasStakers (r:257 w:0)
|
||||
/// Proof Skipped: Staking ErasStakers (max_values: None, max_size: None, mode: Measured)
|
||||
/// The range of component `v` is `[1, 256]`.
|
||||
/// The range of component `b` is `[1, 64]`.
|
||||
fn on_idle_check(v: u32, b: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `1344 + b * (48 ±0) + v * (18487 ±0)`
|
||||
// Estimated: `4676 + b * (49 ±0) + v * (20963 ±0)`
|
||||
// Minimum execution time: 1_633_429_000 picoseconds.
|
||||
Weight::from_parts(1_647_031_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4676))
|
||||
// Standard Error: 14_231_088
|
||||
.saturating_add(Weight::from_parts(454_485_752, 0).saturating_mul(v.into()))
|
||||
// Standard Error: 56_940_204
|
||||
.saturating_add(Weight::from_parts(1_784_096_716, 0).saturating_mul(b.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(7))
|
||||
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(v.into())))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
.saturating_add(Weight::from_parts(0, 49).saturating_mul(b.into()))
|
||||
.saturating_add(Weight::from_parts(0, 20963).saturating_mul(v.into()))
|
||||
}
|
||||
/// Storage: FastUnstake ErasToCheckPerBlock (r:1 w:0)
|
||||
/// Proof: FastUnstake ErasToCheckPerBlock (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: Staking Ledger (r:1 w:1)
|
||||
/// Proof: Staking Ledger (max_values: None, max_size: Some(1091), added: 3566, mode: MaxEncodedLen)
|
||||
/// Storage: FastUnstake Queue (r:1 w:1)
|
||||
/// Proof: FastUnstake Queue (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen)
|
||||
/// Storage: FastUnstake Head (r:1 w:0)
|
||||
/// Proof: FastUnstake Head (max_values: Some(1), max_size: Some(3191), added: 3686, mode: MaxEncodedLen)
|
||||
/// Storage: Staking Bonded (r:1 w:0)
|
||||
/// Proof: Staking Bonded (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen)
|
||||
/// Storage: Staking Validators (r:1 w:0)
|
||||
/// Proof: Staking Validators (max_values: None, max_size: Some(45), added: 2520, mode: MaxEncodedLen)
|
||||
/// Storage: Staking Nominators (r:1 w:1)
|
||||
/// Proof: Staking Nominators (max_values: None, max_size: Some(814), added: 3289, mode: MaxEncodedLen)
|
||||
/// Storage: Staking CounterForNominators (r:1 w:1)
|
||||
/// Proof: Staking CounterForNominators (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: VoterList ListNodes (r:1 w:1)
|
||||
/// Proof: VoterList ListNodes (max_values: None, max_size: Some(154), added: 2629, mode: MaxEncodedLen)
|
||||
/// Storage: VoterList ListBags (r:1 w:1)
|
||||
/// Proof: VoterList ListBags (max_values: None, max_size: Some(82), added: 2557, mode: MaxEncodedLen)
|
||||
/// Storage: VoterList CounterForListNodes (r:1 w:1)
|
||||
/// Proof: VoterList CounterForListNodes (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: Staking CurrentEra (r:1 w:0)
|
||||
/// Proof: Staking CurrentEra (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: Balances Locks (r:1 w:1)
|
||||
/// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen)
|
||||
/// Storage: Balances Freezes (r:1 w:0)
|
||||
/// Proof: Balances Freezes (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen)
|
||||
/// Storage: FastUnstake CounterForQueue (r:1 w:1)
|
||||
/// Proof: FastUnstake CounterForQueue (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
fn register_fast_unstake() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `1826`
|
||||
// Estimated: `4764`
|
||||
// Minimum execution time: 120_577_000 picoseconds.
|
||||
Weight::from_parts(123_610_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4764))
|
||||
.saturating_add(T::DbWeight::get().reads(15))
|
||||
.saturating_add(T::DbWeight::get().writes(9))
|
||||
}
|
||||
/// Storage: FastUnstake ErasToCheckPerBlock (r:1 w:0)
|
||||
/// Proof: FastUnstake ErasToCheckPerBlock (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: Staking Ledger (r:1 w:0)
|
||||
/// Proof: Staking Ledger (max_values: None, max_size: Some(1091), added: 3566, mode: MaxEncodedLen)
|
||||
/// Storage: FastUnstake Queue (r:1 w:1)
|
||||
/// Proof: FastUnstake Queue (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen)
|
||||
/// Storage: FastUnstake Head (r:1 w:0)
|
||||
/// Proof: FastUnstake Head (max_values: Some(1), max_size: Some(3191), added: 3686, mode: MaxEncodedLen)
|
||||
/// Storage: FastUnstake CounterForQueue (r:1 w:1)
|
||||
/// Proof: FastUnstake CounterForQueue (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
fn deregister() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `1084`
|
||||
// Estimated: `4676`
|
||||
// Minimum execution time: 42_258_000 picoseconds.
|
||||
Weight::from_parts(43_647_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4676))
|
||||
.saturating_add(T::DbWeight::get().reads(5))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: FastUnstake ErasToCheckPerBlock (r:0 w:1)
|
||||
/// Proof: FastUnstake ErasToCheckPerBlock (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
fn control() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_524_000 picoseconds.
|
||||
Weight::from_parts(2_654_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
}
|
||||
@@ -1,359 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Polkadot.
|
||||
|
||||
// Polkadot 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.
|
||||
|
||||
// Polkadot 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 Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pallet_identity`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-06-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `runner-e8ezs4ez-project-163-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./target/production/polkadot
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=kusama-dev
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --no-storage-info
|
||||
// --no-median-slopes
|
||||
// --no-min-squares
|
||||
// --pallet=pallet_identity
|
||||
// --extrinsic=*
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --header=./file_header.txt
|
||||
// --output=./runtime/kusama/src/weights/
|
||||
|
||||
#![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_identity`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_identity::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: Identity Registrars (r:1 w:1)
|
||||
/// Proof: Identity Registrars (max_values: Some(1), max_size: Some(1141), added: 1636, mode: MaxEncodedLen)
|
||||
/// The range of component `r` is `[1, 19]`.
|
||||
fn add_registrar(r: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `32 + r * (57 ±0)`
|
||||
// Estimated: `2626`
|
||||
// Minimum execution time: 11_854_000 picoseconds.
|
||||
Weight::from_parts(12_968_221, 0)
|
||||
.saturating_add(Weight::from_parts(0, 2626))
|
||||
// Standard Error: 5_813
|
||||
.saturating_add(Weight::from_parts(102_873, 0).saturating_mul(r.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: Identity IdentityOf (r:1 w:1)
|
||||
/// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen)
|
||||
/// The range of component `r` is `[1, 20]`.
|
||||
/// The range of component `x` is `[0, 100]`.
|
||||
fn set_identity(r: u32, x: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `442 + r * (5 ±0)`
|
||||
// Estimated: `11003`
|
||||
// Minimum execution time: 32_800_000 picoseconds.
|
||||
Weight::from_parts(28_706_621, 0)
|
||||
.saturating_add(Weight::from_parts(0, 11003))
|
||||
// Standard Error: 12_190
|
||||
.saturating_add(Weight::from_parts(261_969, 0).saturating_mul(r.into()))
|
||||
// Standard Error: 2_378
|
||||
.saturating_add(Weight::from_parts(500_617, 0).saturating_mul(x.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: Identity IdentityOf (r:1 w:0)
|
||||
/// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen)
|
||||
/// Storage: Identity SubsOf (r:1 w:1)
|
||||
/// Proof: Identity SubsOf (max_values: None, max_size: Some(3258), added: 5733, mode: MaxEncodedLen)
|
||||
/// Storage: Identity SuperOf (r:100 w:100)
|
||||
/// Proof: Identity SuperOf (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen)
|
||||
/// The range of component `s` is `[0, 100]`.
|
||||
fn set_subs_new(s: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `101`
|
||||
// Estimated: `11003 + s * (2589 ±0)`
|
||||
// Minimum execution time: 8_815_000 picoseconds.
|
||||
Weight::from_parts(21_946_444, 0)
|
||||
.saturating_add(Weight::from_parts(0, 11003))
|
||||
// Standard Error: 5_757
|
||||
.saturating_add(Weight::from_parts(3_241_262, 0).saturating_mul(s.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(s.into())))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into())))
|
||||
.saturating_add(Weight::from_parts(0, 2589).saturating_mul(s.into()))
|
||||
}
|
||||
/// Storage: Identity IdentityOf (r:1 w:0)
|
||||
/// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen)
|
||||
/// Storage: Identity SubsOf (r:1 w:1)
|
||||
/// Proof: Identity SubsOf (max_values: None, max_size: Some(3258), added: 5733, mode: MaxEncodedLen)
|
||||
/// Storage: Identity SuperOf (r:0 w:100)
|
||||
/// Proof: Identity SuperOf (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen)
|
||||
/// The range of component `p` is `[0, 100]`.
|
||||
fn set_subs_old(p: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `194 + p * (32 ±0)`
|
||||
// Estimated: `11003`
|
||||
// Minimum execution time: 8_892_000 picoseconds.
|
||||
Weight::from_parts(21_343_974, 0)
|
||||
.saturating_add(Weight::from_parts(0, 11003))
|
||||
// Standard Error: 5_109
|
||||
.saturating_add(Weight::from_parts(1_410_415, 0).saturating_mul(p.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into())))
|
||||
}
|
||||
/// Storage: Identity SubsOf (r:1 w:1)
|
||||
/// Proof: Identity SubsOf (max_values: None, max_size: Some(3258), added: 5733, mode: MaxEncodedLen)
|
||||
/// Storage: Identity IdentityOf (r:1 w:1)
|
||||
/// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen)
|
||||
/// Storage: Identity SuperOf (r:0 w:100)
|
||||
/// Proof: Identity SuperOf (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen)
|
||||
/// The range of component `r` is `[1, 20]`.
|
||||
/// The range of component `s` is `[0, 100]`.
|
||||
/// The range of component `x` is `[0, 100]`.
|
||||
fn clear_identity(r: u32, s: u32, x: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `469 + r * (5 ±0) + s * (32 ±0) + x * (66 ±0)`
|
||||
// Estimated: `11003`
|
||||
// Minimum execution time: 60_331_000 picoseconds.
|
||||
Weight::from_parts(29_115_598, 0)
|
||||
.saturating_add(Weight::from_parts(0, 11003))
|
||||
// Standard Error: 21_877
|
||||
.saturating_add(Weight::from_parts(216_644, 0).saturating_mul(r.into()))
|
||||
// Standard Error: 4_272
|
||||
.saturating_add(Weight::from_parts(1_420_433, 0).saturating_mul(s.into()))
|
||||
// Standard Error: 4_272
|
||||
.saturating_add(Weight::from_parts(311_436, 0).saturating_mul(x.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into())))
|
||||
}
|
||||
/// Storage: Identity Registrars (r:1 w:0)
|
||||
/// Proof: Identity Registrars (max_values: Some(1), max_size: Some(1141), added: 1636, mode: MaxEncodedLen)
|
||||
/// Storage: Identity IdentityOf (r:1 w:1)
|
||||
/// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen)
|
||||
/// The range of component `r` is `[1, 20]`.
|
||||
/// The range of component `x` is `[0, 100]`.
|
||||
fn request_judgement(r: u32, x: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `367 + r * (57 ±0) + x * (66 ±0)`
|
||||
// Estimated: `11003`
|
||||
// Minimum execution time: 33_470_000 picoseconds.
|
||||
Weight::from_parts(32_277_730, 0)
|
||||
.saturating_add(Weight::from_parts(0, 11003))
|
||||
// Standard Error: 4_577
|
||||
.saturating_add(Weight::from_parts(121_062, 0).saturating_mul(r.into()))
|
||||
// Standard Error: 893
|
||||
.saturating_add(Weight::from_parts(496_715, 0).saturating_mul(x.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: Identity IdentityOf (r:1 w:1)
|
||||
/// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen)
|
||||
/// The range of component `r` is `[1, 20]`.
|
||||
/// The range of component `x` is `[0, 100]`.
|
||||
fn cancel_request(r: u32, x: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `398 + x * (66 ±0)`
|
||||
// Estimated: `11003`
|
||||
// Minimum execution time: 29_626_000 picoseconds.
|
||||
Weight::from_parts(28_419_375, 0)
|
||||
.saturating_add(Weight::from_parts(0, 11003))
|
||||
// Standard Error: 5_566
|
||||
.saturating_add(Weight::from_parts(143_337, 0).saturating_mul(r.into()))
|
||||
// Standard Error: 1_086
|
||||
.saturating_add(Weight::from_parts(487_332, 0).saturating_mul(x.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: Identity Registrars (r:1 w:1)
|
||||
/// Proof: Identity Registrars (max_values: Some(1), max_size: Some(1141), added: 1636, mode: MaxEncodedLen)
|
||||
/// The range of component `r` is `[1, 19]`.
|
||||
fn set_fee(r: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `89 + r * (57 ±0)`
|
||||
// Estimated: `2626`
|
||||
// Minimum execution time: 7_221_000 picoseconds.
|
||||
Weight::from_parts(7_708_979, 0)
|
||||
.saturating_add(Weight::from_parts(0, 2626))
|
||||
// Standard Error: 1_516
|
||||
.saturating_add(Weight::from_parts(101_163, 0).saturating_mul(r.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: Identity Registrars (r:1 w:1)
|
||||
/// Proof: Identity Registrars (max_values: Some(1), max_size: Some(1141), added: 1636, mode: MaxEncodedLen)
|
||||
/// The range of component `r` is `[1, 19]`.
|
||||
fn set_account_id(r: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `89 + r * (57 ±0)`
|
||||
// Estimated: `2626`
|
||||
// Minimum execution time: 7_288_000 picoseconds.
|
||||
Weight::from_parts(7_757_754, 0)
|
||||
.saturating_add(Weight::from_parts(0, 2626))
|
||||
// Standard Error: 1_365
|
||||
.saturating_add(Weight::from_parts(95_345, 0).saturating_mul(r.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: Identity Registrars (r:1 w:1)
|
||||
/// Proof: Identity Registrars (max_values: Some(1), max_size: Some(1141), added: 1636, mode: MaxEncodedLen)
|
||||
/// The range of component `r` is `[1, 19]`.
|
||||
fn set_fields(r: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `89 + r * (57 ±0)`
|
||||
// Estimated: `2626`
|
||||
// Minimum execution time: 7_204_000 picoseconds.
|
||||
Weight::from_parts(7_679_617, 0)
|
||||
.saturating_add(Weight::from_parts(0, 2626))
|
||||
// Standard Error: 1_358
|
||||
.saturating_add(Weight::from_parts(100_186, 0).saturating_mul(r.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: Identity Registrars (r:1 w:0)
|
||||
/// Proof: Identity Registrars (max_values: Some(1), max_size: Some(1141), added: 1636, mode: MaxEncodedLen)
|
||||
/// Storage: Identity IdentityOf (r:1 w:1)
|
||||
/// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen)
|
||||
/// The range of component `r` is `[1, 19]`.
|
||||
/// The range of component `x` is `[0, 100]`.
|
||||
fn provide_judgement(r: u32, x: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `445 + r * (57 ±0) + x * (66 ±0)`
|
||||
// Estimated: `11003`
|
||||
// Minimum execution time: 23_125_000 picoseconds.
|
||||
Weight::from_parts(22_392_893, 0)
|
||||
.saturating_add(Weight::from_parts(0, 11003))
|
||||
// Standard Error: 5_154
|
||||
.saturating_add(Weight::from_parts(121_813, 0).saturating_mul(r.into()))
|
||||
// Standard Error: 953
|
||||
.saturating_add(Weight::from_parts(806_355, 0).saturating_mul(x.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: Identity SubsOf (r:1 w:1)
|
||||
/// Proof: Identity SubsOf (max_values: None, max_size: Some(3258), added: 5733, mode: MaxEncodedLen)
|
||||
/// Storage: Identity IdentityOf (r:1 w:1)
|
||||
/// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen)
|
||||
/// Storage: System Account (r:1 w:1)
|
||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
/// Storage: Identity SuperOf (r:0 w:100)
|
||||
/// Proof: Identity SuperOf (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen)
|
||||
/// The range of component `r` is `[1, 20]`.
|
||||
/// The range of component `s` is `[0, 100]`.
|
||||
/// The range of component `x` is `[0, 100]`.
|
||||
fn kill_identity(r: u32, s: u32, x: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `676 + r * (5 ±0) + s * (32 ±0) + x * (66 ±0)`
|
||||
// Estimated: `11003`
|
||||
// Minimum execution time: 76_226_000 picoseconds.
|
||||
Weight::from_parts(35_456_327, 0)
|
||||
.saturating_add(Weight::from_parts(0, 11003))
|
||||
// Standard Error: 18_829
|
||||
.saturating_add(Weight::from_parts(615_512, 0).saturating_mul(r.into()))
|
||||
// Standard Error: 3_677
|
||||
.saturating_add(Weight::from_parts(1_462_016, 0).saturating_mul(s.into()))
|
||||
// Standard Error: 3_677
|
||||
.saturating_add(Weight::from_parts(328_050, 0).saturating_mul(x.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into())))
|
||||
}
|
||||
/// Storage: Identity IdentityOf (r:1 w:0)
|
||||
/// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen)
|
||||
/// Storage: Identity SuperOf (r:1 w:1)
|
||||
/// Proof: Identity SuperOf (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen)
|
||||
/// Storage: Identity SubsOf (r:1 w:1)
|
||||
/// Proof: Identity SubsOf (max_values: None, max_size: Some(3258), added: 5733, mode: MaxEncodedLen)
|
||||
/// The range of component `s` is `[0, 99]`.
|
||||
fn add_sub(s: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `475 + s * (36 ±0)`
|
||||
// Estimated: `11003`
|
||||
// Minimum execution time: 29_381_000 picoseconds.
|
||||
Weight::from_parts(33_288_068, 0)
|
||||
.saturating_add(Weight::from_parts(0, 11003))
|
||||
// Standard Error: 1_624
|
||||
.saturating_add(Weight::from_parts(120_173, 0).saturating_mul(s.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: Identity IdentityOf (r:1 w:0)
|
||||
/// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen)
|
||||
/// Storage: Identity SuperOf (r:1 w:1)
|
||||
/// Proof: Identity SuperOf (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen)
|
||||
/// The range of component `s` is `[1, 100]`.
|
||||
fn rename_sub(s: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `591 + s * (3 ±0)`
|
||||
// Estimated: `11003`
|
||||
// Minimum execution time: 12_418_000 picoseconds.
|
||||
Weight::from_parts(13_798_930, 0)
|
||||
.saturating_add(Weight::from_parts(0, 11003))
|
||||
// Standard Error: 856
|
||||
.saturating_add(Weight::from_parts(43_306, 0).saturating_mul(s.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: Identity IdentityOf (r:1 w:0)
|
||||
/// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen)
|
||||
/// Storage: Identity SuperOf (r:1 w:1)
|
||||
/// Proof: Identity SuperOf (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen)
|
||||
/// Storage: Identity SubsOf (r:1 w:1)
|
||||
/// Proof: Identity SubsOf (max_values: None, max_size: Some(3258), added: 5733, mode: MaxEncodedLen)
|
||||
/// The range of component `s` is `[1, 100]`.
|
||||
fn remove_sub(s: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `638 + s * (35 ±0)`
|
||||
// Estimated: `11003`
|
||||
// Minimum execution time: 33_242_000 picoseconds.
|
||||
Weight::from_parts(36_552_253, 0)
|
||||
.saturating_add(Weight::from_parts(0, 11003))
|
||||
// Standard Error: 2_385
|
||||
.saturating_add(Weight::from_parts(98_359, 0).saturating_mul(s.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: Identity SuperOf (r:1 w:1)
|
||||
/// Proof: Identity SuperOf (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen)
|
||||
/// Storage: Identity SubsOf (r:1 w:1)
|
||||
/// Proof: Identity SubsOf (max_values: None, max_size: Some(3258), added: 5733, mode: MaxEncodedLen)
|
||||
/// Storage: System Account (r:1 w:0)
|
||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
/// The range of component `s` is `[0, 99]`.
|
||||
fn quit_sub(s: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `704 + s * (37 ±0)`
|
||||
// Estimated: `6723`
|
||||
// Minimum execution time: 24_017_000 picoseconds.
|
||||
Weight::from_parts(27_149_414, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6723))
|
||||
// Standard Error: 1_769
|
||||
.saturating_add(Weight::from_parts(79_539, 0).saturating_mul(s.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
}
|
||||
@@ -1,77 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Polkadot.
|
||||
|
||||
// Polkadot 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.
|
||||
|
||||
// Polkadot 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 Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pallet_im_online`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-06-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `runner-e8ezs4ez-project-163-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./target/production/polkadot
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=kusama-dev
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --no-storage-info
|
||||
// --no-median-slopes
|
||||
// --no-min-squares
|
||||
// --pallet=pallet_im_online
|
||||
// --extrinsic=*
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --header=./file_header.txt
|
||||
// --output=./runtime/kusama/src/weights/
|
||||
|
||||
#![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_im_online`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_im_online::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: Session Validators (r:1 w:0)
|
||||
/// Proof Skipped: Session Validators (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Session CurrentIndex (r:1 w:0)
|
||||
/// Proof Skipped: Session CurrentIndex (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: ImOnline Keys (r:1 w:0)
|
||||
/// Proof: ImOnline Keys (max_values: Some(1), max_size: Some(320002), added: 320497, mode: MaxEncodedLen)
|
||||
/// Storage: ImOnline ReceivedHeartbeats (r:1 w:1)
|
||||
/// Proof: ImOnline ReceivedHeartbeats (max_values: None, max_size: Some(25), added: 2500, mode: MaxEncodedLen)
|
||||
/// Storage: ImOnline AuthoredBlocks (r:1 w:0)
|
||||
/// Proof: ImOnline AuthoredBlocks (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen)
|
||||
/// The range of component `k` is `[1, 1000]`.
|
||||
fn validate_unsigned_and_then_heartbeat(k: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `361 + k * (32 ±0)`
|
||||
// Estimated: `321487 + k * (1761 ±0)`
|
||||
// Minimum execution time: 82_038_000 picoseconds.
|
||||
Weight::from_parts(100_726_620, 0)
|
||||
.saturating_add(Weight::from_parts(0, 321487))
|
||||
// Standard Error: 600
|
||||
.saturating_add(Weight::from_parts(30_346, 0).saturating_mul(k.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
.saturating_add(Weight::from_parts(0, 1761).saturating_mul(k.into()))
|
||||
}
|
||||
}
|
||||
@@ -1,117 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Polkadot.
|
||||
|
||||
// Polkadot 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.
|
||||
|
||||
// Polkadot 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 Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pallet_indices`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-06-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `runner-e8ezs4ez-project-163-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./target/production/polkadot
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=kusama-dev
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --no-storage-info
|
||||
// --no-median-slopes
|
||||
// --no-min-squares
|
||||
// --pallet=pallet_indices
|
||||
// --extrinsic=*
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --header=./file_header.txt
|
||||
// --output=./runtime/kusama/src/weights/
|
||||
|
||||
#![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_indices`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_indices::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: Indices Accounts (r:1 w:1)
|
||||
/// Proof: Indices Accounts (max_values: None, max_size: Some(69), added: 2544, mode: MaxEncodedLen)
|
||||
fn claim() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `142`
|
||||
// Estimated: `3534`
|
||||
// Minimum execution time: 25_322_000 picoseconds.
|
||||
Weight::from_parts(26_124_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3534))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: Indices Accounts (r:1 w:1)
|
||||
/// Proof: Indices Accounts (max_values: None, max_size: Some(69), added: 2544, 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 {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `341`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 36_790_000 picoseconds.
|
||||
Weight::from_parts(37_218_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3593))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: Indices Accounts (r:1 w:1)
|
||||
/// Proof: Indices Accounts (max_values: None, max_size: Some(69), added: 2544, mode: MaxEncodedLen)
|
||||
fn free() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `238`
|
||||
// Estimated: `3534`
|
||||
// Minimum execution time: 25_968_000 picoseconds.
|
||||
Weight::from_parts(26_450_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3534))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: Indices Accounts (r:1 w:1)
|
||||
/// Proof: Indices Accounts (max_values: None, max_size: Some(69), added: 2544, mode: MaxEncodedLen)
|
||||
/// Storage: System Account (r:1 w:1)
|
||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
fn force_transfer() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `341`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 27_734_000 picoseconds.
|
||||
Weight::from_parts(28_523_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3593))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: Indices Accounts (r:1 w:1)
|
||||
/// Proof: Indices Accounts (max_values: None, max_size: Some(69), added: 2544, mode: MaxEncodedLen)
|
||||
fn freeze() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `238`
|
||||
// Estimated: `3534`
|
||||
// Minimum execution time: 27_980_000 picoseconds.
|
||||
Weight::from_parts(28_448_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3534))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
}
|
||||
@@ -1,202 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Polkadot.
|
||||
|
||||
// Polkadot 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.
|
||||
|
||||
// Polkadot 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 Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
//! Autogenerated weights for `pallet_membership`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-03-16, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./target/production/polkadot
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=kusama-dev
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --pallet=pallet_membership
|
||||
// --extrinsic=*
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --header=./file_header.txt
|
||||
// --output=./runtime/kusama/src/weights/
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
|
||||
use frame_support::{traits::Get, weights::Weight};
|
||||
use sp_std::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pallet_membership`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_membership::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: TechnicalMembership Members (r:1 w:1)
|
||||
/// Proof: TechnicalMembership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen)
|
||||
/// Storage: TechnicalCommittee Proposals (r:1 w:0)
|
||||
/// Proof Skipped: TechnicalCommittee Proposals (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: TechnicalCommittee Members (r:0 w:1)
|
||||
/// Proof Skipped: TechnicalCommittee Members (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: TechnicalCommittee Prime (r:0 w:1)
|
||||
/// Proof Skipped: TechnicalCommittee Prime (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// The range of component `m` is `[1, 99]`.
|
||||
fn add_member(m: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `208 + m * (64 ±0)`
|
||||
// Estimated: `6793 + m * (192 ±0)`
|
||||
// Minimum execution time: 15_847_000 picoseconds.
|
||||
Weight::from_parts(16_597_325, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6793))
|
||||
// Standard Error: 411
|
||||
.saturating_add(Weight::from_parts(35_801, 0).saturating_mul(m.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
.saturating_add(Weight::from_parts(0, 192).saturating_mul(m.into()))
|
||||
}
|
||||
/// Storage: TechnicalMembership Members (r:1 w:1)
|
||||
/// Proof: TechnicalMembership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen)
|
||||
/// Storage: TechnicalCommittee Proposals (r:1 w:0)
|
||||
/// Proof Skipped: TechnicalCommittee Proposals (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: TechnicalMembership Prime (r:1 w:0)
|
||||
/// Proof: TechnicalMembership Prime (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen)
|
||||
/// Storage: TechnicalCommittee Members (r:0 w:1)
|
||||
/// Proof Skipped: TechnicalCommittee Members (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: TechnicalCommittee Prime (r:0 w:1)
|
||||
/// Proof Skipped: TechnicalCommittee Prime (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// The range of component `m` is `[2, 100]`.
|
||||
fn remove_member(m: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `312 + m * (64 ±0)`
|
||||
// Estimated: `8622 + m * (192 ±0)`
|
||||
// Minimum execution time: 18_412_000 picoseconds.
|
||||
Weight::from_parts(19_251_698, 0)
|
||||
.saturating_add(Weight::from_parts(0, 8622))
|
||||
// Standard Error: 474
|
||||
.saturating_add(Weight::from_parts(32_206, 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, 192).saturating_mul(m.into()))
|
||||
}
|
||||
/// Storage: TechnicalMembership Members (r:1 w:1)
|
||||
/// Proof: TechnicalMembership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen)
|
||||
/// Storage: TechnicalCommittee Proposals (r:1 w:0)
|
||||
/// Proof Skipped: TechnicalCommittee Proposals (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: TechnicalMembership Prime (r:1 w:0)
|
||||
/// Proof: TechnicalMembership Prime (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen)
|
||||
/// Storage: TechnicalCommittee Members (r:0 w:1)
|
||||
/// Proof Skipped: TechnicalCommittee Members (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: TechnicalCommittee Prime (r:0 w:1)
|
||||
/// Proof Skipped: TechnicalCommittee Prime (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// The range of component `m` is `[2, 100]`.
|
||||
fn swap_member(m: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `312 + m * (64 ±0)`
|
||||
// Estimated: `8622 + m * (192 ±0)`
|
||||
// Minimum execution time: 18_502_000 picoseconds.
|
||||
Weight::from_parts(19_583_888, 0)
|
||||
.saturating_add(Weight::from_parts(0, 8622))
|
||||
// Standard Error: 619
|
||||
.saturating_add(Weight::from_parts(44_408, 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, 192).saturating_mul(m.into()))
|
||||
}
|
||||
/// Storage: TechnicalMembership Members (r:1 w:1)
|
||||
/// Proof: TechnicalMembership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen)
|
||||
/// Storage: TechnicalCommittee Proposals (r:1 w:0)
|
||||
/// Proof Skipped: TechnicalCommittee Proposals (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: TechnicalMembership Prime (r:1 w:0)
|
||||
/// Proof: TechnicalMembership Prime (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen)
|
||||
/// Storage: TechnicalCommittee Members (r:0 w:1)
|
||||
/// Proof Skipped: TechnicalCommittee Members (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: TechnicalCommittee Prime (r:0 w:1)
|
||||
/// Proof Skipped: TechnicalCommittee Prime (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// The range of component `m` is `[1, 100]`.
|
||||
fn reset_member(m: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `312 + m * (64 ±0)`
|
||||
// Estimated: `8622 + m * (192 ±0)`
|
||||
// Minimum execution time: 18_088_000 picoseconds.
|
||||
Weight::from_parts(19_292_324, 0)
|
||||
.saturating_add(Weight::from_parts(0, 8622))
|
||||
// Standard Error: 759
|
||||
.saturating_add(Weight::from_parts(162_348, 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, 192).saturating_mul(m.into()))
|
||||
}
|
||||
/// Storage: TechnicalMembership Members (r:1 w:1)
|
||||
/// Proof: TechnicalMembership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen)
|
||||
/// Storage: TechnicalCommittee Proposals (r:1 w:0)
|
||||
/// Proof Skipped: TechnicalCommittee Proposals (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: TechnicalMembership Prime (r:1 w:1)
|
||||
/// Proof: TechnicalMembership Prime (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen)
|
||||
/// Storage: TechnicalCommittee Members (r:0 w:1)
|
||||
/// Proof Skipped: TechnicalCommittee Members (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: TechnicalCommittee Prime (r:0 w:1)
|
||||
/// Proof Skipped: TechnicalCommittee Prime (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// The range of component `m` is `[1, 100]`.
|
||||
fn change_key(m: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `312 + m * (64 ±0)`
|
||||
// Estimated: `8622 + m * (192 ±0)`
|
||||
// Minimum execution time: 19_134_000 picoseconds.
|
||||
Weight::from_parts(20_242_466, 0)
|
||||
.saturating_add(Weight::from_parts(0, 8622))
|
||||
// Standard Error: 962
|
||||
.saturating_add(Weight::from_parts(47_779, 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, 192).saturating_mul(m.into()))
|
||||
}
|
||||
/// Storage: TechnicalMembership Members (r:1 w:0)
|
||||
/// Proof: TechnicalMembership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen)
|
||||
/// Storage: TechnicalMembership Prime (r:0 w:1)
|
||||
/// Proof: TechnicalMembership Prime (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen)
|
||||
/// Storage: TechnicalCommittee Prime (r:0 w:1)
|
||||
/// Proof Skipped: TechnicalCommittee Prime (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// The range of component `m` is `[1, 100]`.
|
||||
fn set_prime(m: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `32 + m * (32 ±0)`
|
||||
// Estimated: `4719 + m * (32 ±0)`
|
||||
// Minimum execution time: 6_726_000 picoseconds.
|
||||
Weight::from_parts(6_966_055, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4719))
|
||||
// Standard Error: 255
|
||||
.saturating_add(Weight::from_parts(13_950, 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: TechnicalMembership Prime (r:0 w:1)
|
||||
/// Proof: TechnicalMembership Prime (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen)
|
||||
/// Storage: TechnicalCommittee Prime (r:0 w:1)
|
||||
/// Proof Skipped: TechnicalCommittee 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: 3_010_000 picoseconds.
|
||||
Weight::from_parts(3_196_429, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
// Standard Error: 78
|
||||
.saturating_add(Weight::from_parts(471, 0).saturating_mul(m.into()))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
}
|
||||
@@ -1,193 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Polkadot.
|
||||
|
||||
// Polkadot 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.
|
||||
|
||||
// Polkadot 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 Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pallet_message_queue`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-06-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `runner-e8ezs4ez-project-163-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./target/production/polkadot
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=kusama-dev
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --no-storage-info
|
||||
// --no-median-slopes
|
||||
// --no-min-squares
|
||||
// --pallet=pallet_message_queue
|
||||
// --extrinsic=*
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --header=./file_header.txt
|
||||
// --output=./runtime/kusama/src/weights/
|
||||
|
||||
#![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_message_queue`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_message_queue::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: MessageQueue ServiceHead (r:1 w:0)
|
||||
/// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(6), added: 501, mode: MaxEncodedLen)
|
||||
/// Storage: MessageQueue BookStateFor (r:2 w:2)
|
||||
/// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(55), added: 2530, mode: MaxEncodedLen)
|
||||
fn ready_ring_knit() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `248`
|
||||
// Estimated: `6050`
|
||||
// Minimum execution time: 11_603_000 picoseconds.
|
||||
Weight::from_parts(11_953_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6050))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: MessageQueue BookStateFor (r:2 w:2)
|
||||
/// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(55), added: 2530, mode: MaxEncodedLen)
|
||||
/// Storage: MessageQueue ServiceHead (r:1 w:1)
|
||||
/// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(6), added: 501, mode: MaxEncodedLen)
|
||||
fn ready_ring_unknit() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `248`
|
||||
// Estimated: `6050`
|
||||
// Minimum execution time: 10_668_000 picoseconds.
|
||||
Weight::from_parts(11_105_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6050))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: MessageQueue BookStateFor (r:1 w:1)
|
||||
/// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(55), added: 2530, mode: MaxEncodedLen)
|
||||
fn service_queue_base() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `42`
|
||||
// Estimated: `3520`
|
||||
// Minimum execution time: 4_158_000 picoseconds.
|
||||
Weight::from_parts(4_379_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3520))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: MessageQueue Pages (r:1 w:1)
|
||||
/// Proof: MessageQueue Pages (max_values: None, max_size: Some(65586), added: 68061, mode: MaxEncodedLen)
|
||||
fn service_page_base_completion() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `115`
|
||||
// Estimated: `69051`
|
||||
// Minimum execution time: 5_873_000 picoseconds.
|
||||
Weight::from_parts(6_002_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 69051))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: MessageQueue Pages (r:1 w:1)
|
||||
/// Proof: MessageQueue Pages (max_values: None, max_size: Some(65586), added: 68061, mode: MaxEncodedLen)
|
||||
fn service_page_base_no_completion() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `115`
|
||||
// Estimated: `69051`
|
||||
// Minimum execution time: 6_110_000 picoseconds.
|
||||
Weight::from_parts(6_385_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 69051))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
fn service_page_item() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 92_242_000 picoseconds.
|
||||
Weight::from_parts(92_796_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
/// Storage: MessageQueue ServiceHead (r:1 w:1)
|
||||
/// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(6), added: 501, mode: MaxEncodedLen)
|
||||
/// Storage: MessageQueue BookStateFor (r:1 w:0)
|
||||
/// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(55), added: 2530, mode: MaxEncodedLen)
|
||||
fn bump_service_head() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `149`
|
||||
// Estimated: `3520`
|
||||
// Minimum execution time: 6_386_000 picoseconds.
|
||||
Weight::from_parts(6_629_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3520))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: MessageQueue BookStateFor (r:1 w:1)
|
||||
/// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(55), added: 2530, mode: MaxEncodedLen)
|
||||
/// Storage: MessageQueue Pages (r:1 w:1)
|
||||
/// Proof: MessageQueue Pages (max_values: None, max_size: Some(65586), added: 68061, mode: MaxEncodedLen)
|
||||
/// Storage: unknown `0x3a72656c61795f64697370617463685f71756575655f72656d61696e696e675f` (r:0 w:1)
|
||||
/// Proof Skipped: unknown `0x3a72656c61795f64697370617463685f71756575655f72656d61696e696e675f` (r:0 w:1)
|
||||
/// Storage: unknown `0xf5207f03cfdce586301014700e2c2593fad157e461d71fd4c1f936839a5f1f3e` (r:0 w:1)
|
||||
/// Proof Skipped: unknown `0xf5207f03cfdce586301014700e2c2593fad157e461d71fd4c1f936839a5f1f3e` (r:0 w:1)
|
||||
fn reap_page() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `65714`
|
||||
// Estimated: `69051`
|
||||
// Minimum execution time: 59_294_000 picoseconds.
|
||||
Weight::from_parts(60_608_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 69051))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
/// Storage: MessageQueue BookStateFor (r:1 w:1)
|
||||
/// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(55), added: 2530, mode: MaxEncodedLen)
|
||||
/// Storage: MessageQueue Pages (r:1 w:1)
|
||||
/// Proof: MessageQueue Pages (max_values: None, max_size: Some(65586), added: 68061, mode: MaxEncodedLen)
|
||||
/// Storage: unknown `0x3a72656c61795f64697370617463685f71756575655f72656d61696e696e675f` (r:0 w:1)
|
||||
/// Proof Skipped: unknown `0x3a72656c61795f64697370617463685f71756575655f72656d61696e696e675f` (r:0 w:1)
|
||||
/// Storage: unknown `0xf5207f03cfdce586301014700e2c2593fad157e461d71fd4c1f936839a5f1f3e` (r:0 w:1)
|
||||
/// Proof Skipped: unknown `0xf5207f03cfdce586301014700e2c2593fad157e461d71fd4c1f936839a5f1f3e` (r:0 w:1)
|
||||
fn execute_overweight_page_removed() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `65714`
|
||||
// Estimated: `69051`
|
||||
// Minimum execution time: 75_134_000 picoseconds.
|
||||
Weight::from_parts(76_729_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 69051))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
/// Storage: MessageQueue BookStateFor (r:1 w:1)
|
||||
/// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(55), added: 2530, mode: MaxEncodedLen)
|
||||
/// Storage: MessageQueue Pages (r:1 w:1)
|
||||
/// Proof: MessageQueue Pages (max_values: None, max_size: Some(65586), added: 68061, mode: MaxEncodedLen)
|
||||
/// Storage: unknown `0x3a72656c61795f64697370617463685f71756575655f72656d61696e696e675f` (r:0 w:1)
|
||||
/// Proof Skipped: unknown `0x3a72656c61795f64697370617463685f71756575655f72656d61696e696e675f` (r:0 w:1)
|
||||
/// Storage: unknown `0xf5207f03cfdce586301014700e2c2593fad157e461d71fd4c1f936839a5f1f3e` (r:0 w:1)
|
||||
/// Proof Skipped: unknown `0xf5207f03cfdce586301014700e2c2593fad157e461d71fd4c1f936839a5f1f3e` (r:0 w:1)
|
||||
fn execute_overweight_page_updated() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `65714`
|
||||
// Estimated: `69051`
|
||||
// Minimum execution time: 117_320_000 picoseconds.
|
||||
Weight::from_parts(119_640_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 69051))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
}
|
||||
@@ -1,165 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Polkadot.
|
||||
|
||||
// Polkadot 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.
|
||||
|
||||
// Polkadot 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 Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pallet_multisig`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-06-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `runner-e8ezs4ez-project-163-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./target/production/polkadot
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=kusama-dev
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --no-storage-info
|
||||
// --no-median-slopes
|
||||
// --no-min-squares
|
||||
// --pallet=pallet_multisig
|
||||
// --extrinsic=*
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --header=./file_header.txt
|
||||
// --output=./runtime/kusama/src/weights/
|
||||
|
||||
#![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_multisig`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> {
|
||||
/// The range of component `z` is `[0, 10000]`.
|
||||
fn as_multi_threshold_1(z: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 13_299_000 picoseconds.
|
||||
Weight::from_parts(14_368_762, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
// Standard Error: 5
|
||||
.saturating_add(Weight::from_parts(557, 0).saturating_mul(z.into()))
|
||||
}
|
||||
/// Storage: Multisig Multisigs (r:1 w:1)
|
||||
/// Proof: Multisig Multisigs (max_values: None, max_size: Some(3346), added: 5821, mode: MaxEncodedLen)
|
||||
/// The range of component `s` is `[2, 100]`.
|
||||
/// The range of component `z` is `[0, 10000]`.
|
||||
fn as_multi_create(s: u32, z: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `301 + s * (2 ±0)`
|
||||
// Estimated: `6811`
|
||||
// Minimum execution time: 45_147_000 picoseconds.
|
||||
Weight::from_parts(34_161_081, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6811))
|
||||
// Standard Error: 1_022
|
||||
.saturating_add(Weight::from_parts(127_000, 0).saturating_mul(s.into()))
|
||||
// Standard Error: 10
|
||||
.saturating_add(Weight::from_parts(1_553, 0).saturating_mul(z.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: Multisig Multisigs (r:1 w:1)
|
||||
/// Proof: Multisig Multisigs (max_values: None, max_size: Some(3346), added: 5821, mode: MaxEncodedLen)
|
||||
/// The range of component `s` is `[3, 100]`.
|
||||
/// The range of component `z` is `[0, 10000]`.
|
||||
fn as_multi_approve(s: u32, z: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `320`
|
||||
// Estimated: `6811`
|
||||
// Minimum execution time: 29_650_000 picoseconds.
|
||||
Weight::from_parts(20_868_716, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6811))
|
||||
// Standard Error: 1_323
|
||||
.saturating_add(Weight::from_parts(112_380, 0).saturating_mul(s.into()))
|
||||
// Standard Error: 12
|
||||
.saturating_add(Weight::from_parts(1_440, 0).saturating_mul(z.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: Multisig Multisigs (r:1 w:1)
|
||||
/// Proof: Multisig Multisigs (max_values: None, max_size: Some(3346), added: 5821, 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 `s` is `[2, 100]`.
|
||||
/// The range of component `z` is `[0, 10000]`.
|
||||
fn as_multi_complete(s: u32, z: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `426 + s * (33 ±0)`
|
||||
// Estimated: `6811`
|
||||
// Minimum execution time: 50_649_000 picoseconds.
|
||||
Weight::from_parts(34_736_758, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6811))
|
||||
// Standard Error: 1_738
|
||||
.saturating_add(Weight::from_parts(182_282, 0).saturating_mul(s.into()))
|
||||
// Standard Error: 17
|
||||
.saturating_add(Weight::from_parts(1_824, 0).saturating_mul(z.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: Multisig Multisigs (r:1 w:1)
|
||||
/// Proof: Multisig Multisigs (max_values: None, max_size: Some(3346), added: 5821, mode: MaxEncodedLen)
|
||||
/// The range of component `s` is `[2, 100]`.
|
||||
fn approve_as_multi_create(s: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `301 + s * (2 ±0)`
|
||||
// Estimated: `6811`
|
||||
// Minimum execution time: 32_162_000 picoseconds.
|
||||
Weight::from_parts(33_215_652, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6811))
|
||||
// Standard Error: 1_093
|
||||
.saturating_add(Weight::from_parts(133_715, 0).saturating_mul(s.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: Multisig Multisigs (r:1 w:1)
|
||||
/// Proof: Multisig Multisigs (max_values: None, max_size: Some(3346), added: 5821, mode: MaxEncodedLen)
|
||||
/// The range of component `s` is `[2, 100]`.
|
||||
fn approve_as_multi_approve(s: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `320`
|
||||
// Estimated: `6811`
|
||||
// Minimum execution time: 18_073_000 picoseconds.
|
||||
Weight::from_parts(19_038_713, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6811))
|
||||
// Standard Error: 681
|
||||
.saturating_add(Weight::from_parts(111_279, 0).saturating_mul(s.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: Multisig Multisigs (r:1 w:1)
|
||||
/// Proof: Multisig Multisigs (max_values: None, max_size: Some(3346), added: 5821, mode: MaxEncodedLen)
|
||||
/// The range of component `s` is `[2, 100]`.
|
||||
fn cancel_as_multi(s: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `492 + s * (1 ±0)`
|
||||
// Estimated: `6811`
|
||||
// Minimum execution time: 33_867_000 picoseconds.
|
||||
Weight::from_parts(34_896_470, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6811))
|
||||
// Standard Error: 1_002
|
||||
.saturating_add(Weight::from_parts(116_935, 0).saturating_mul(s.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
}
|
||||
@@ -1,252 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Polkadot.
|
||||
|
||||
// Polkadot 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.
|
||||
|
||||
// Polkadot 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 Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pallet_nis`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-06-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `runner-e8ezs4ez-project-163-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./target/production/polkadot
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=kusama-dev
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --no-storage-info
|
||||
// --no-median-slopes
|
||||
// --no-min-squares
|
||||
// --pallet=pallet_nis
|
||||
// --extrinsic=*
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --header=./file_header.txt
|
||||
// --output=./runtime/kusama/src/weights/
|
||||
|
||||
#![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_nis`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_nis::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: Nis Queues (r:1 w:1)
|
||||
/// Proof: Nis Queues (max_values: None, max_size: Some(48022), added: 50497, mode: MaxEncodedLen)
|
||||
/// Storage: Balances Holds (r:1 w:1)
|
||||
/// Proof: Balances Holds (max_values: None, max_size: Some(67), added: 2542, mode: MaxEncodedLen)
|
||||
/// Storage: Nis QueueTotals (r:1 w:1)
|
||||
/// Proof: Nis QueueTotals (max_values: Some(1), max_size: Some(10002), added: 10497, mode: MaxEncodedLen)
|
||||
/// The range of component `l` is `[0, 999]`.
|
||||
fn place_bid(l: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `10210 + l * (48 ±0)`
|
||||
// Estimated: `51487`
|
||||
// Minimum execution time: 49_318_000 picoseconds.
|
||||
Weight::from_parts(47_894_330, 0)
|
||||
.saturating_add(Weight::from_parts(0, 51487))
|
||||
// Standard Error: 1_184
|
||||
.saturating_add(Weight::from_parts(110_633, 0).saturating_mul(l.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: Nis Queues (r:1 w:1)
|
||||
/// Proof: Nis Queues (max_values: None, max_size: Some(48022), added: 50497, mode: MaxEncodedLen)
|
||||
/// Storage: Balances Holds (r:1 w:1)
|
||||
/// Proof: Balances Holds (max_values: None, max_size: Some(67), added: 2542, mode: MaxEncodedLen)
|
||||
/// Storage: Nis QueueTotals (r:1 w:1)
|
||||
/// Proof: Nis QueueTotals (max_values: Some(1), max_size: Some(10002), added: 10497, mode: MaxEncodedLen)
|
||||
fn place_bid_max() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `58212`
|
||||
// Estimated: `51487`
|
||||
// Minimum execution time: 162_699_000 picoseconds.
|
||||
Weight::from_parts(171_243_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 51487))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: Nis Queues (r:1 w:1)
|
||||
/// Proof: Nis Queues (max_values: None, max_size: Some(48022), added: 50497, mode: MaxEncodedLen)
|
||||
/// Storage: Balances Holds (r:1 w:1)
|
||||
/// Proof: Balances Holds (max_values: None, max_size: Some(67), added: 2542, mode: MaxEncodedLen)
|
||||
/// Storage: Nis QueueTotals (r:1 w:1)
|
||||
/// Proof: Nis QueueTotals (max_values: Some(1), max_size: Some(10002), added: 10497, mode: MaxEncodedLen)
|
||||
/// The range of component `l` is `[1, 1000]`.
|
||||
fn retract_bid(l: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `10210 + l * (48 ±0)`
|
||||
// Estimated: `51487`
|
||||
// Minimum execution time: 51_827_000 picoseconds.
|
||||
Weight::from_parts(44_282_033, 0)
|
||||
.saturating_add(Weight::from_parts(0, 51487))
|
||||
// Standard Error: 1_145
|
||||
.saturating_add(Weight::from_parts(121_058, 0).saturating_mul(l.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: Nis Summary (r:1 w:0)
|
||||
/// Proof: Nis Summary (max_values: Some(1), max_size: Some(40), added: 535, mode: MaxEncodedLen)
|
||||
/// Storage: Balances InactiveIssuance (r:1 w:0)
|
||||
/// Proof: Balances InactiveIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen)
|
||||
/// Storage: System Account (r:1 w:1)
|
||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
fn fund_deficit() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `225`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 39_765_000 picoseconds.
|
||||
Weight::from_parts(40_525_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3593))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: Nis Receipts (r:1 w:1)
|
||||
/// Proof: Nis Receipts (max_values: None, max_size: Some(81), added: 2556, mode: MaxEncodedLen)
|
||||
/// Storage: Balances Holds (r:1 w:1)
|
||||
/// Proof: Balances Holds (max_values: None, max_size: Some(67), added: 2542, mode: MaxEncodedLen)
|
||||
/// Storage: System Account (r:1 w:1)
|
||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
/// Storage: Nis Summary (r:1 w:1)
|
||||
/// Proof: Nis Summary (max_values: Some(1), max_size: Some(40), added: 535, mode: MaxEncodedLen)
|
||||
/// Storage: NisCounterpartBalances TotalIssuance (r:1 w:1)
|
||||
/// Proof: NisCounterpartBalances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen)
|
||||
/// Storage: NisCounterpartBalances Account (r:1 w:1)
|
||||
/// Proof: NisCounterpartBalances Account (max_values: None, max_size: Some(112), added: 2587, mode: MaxEncodedLen)
|
||||
fn communify() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `470`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 75_890_000 picoseconds.
|
||||
Weight::from_parts(77_519_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3593))
|
||||
.saturating_add(T::DbWeight::get().reads(6))
|
||||
.saturating_add(T::DbWeight::get().writes(6))
|
||||
}
|
||||
/// Storage: Nis Receipts (r:1 w:1)
|
||||
/// Proof: Nis Receipts (max_values: None, max_size: Some(81), added: 2556, mode: MaxEncodedLen)
|
||||
/// Storage: Nis Summary (r:1 w:1)
|
||||
/// Proof: Nis Summary (max_values: Some(1), max_size: Some(40), added: 535, mode: MaxEncodedLen)
|
||||
/// Storage: Balances InactiveIssuance (r:1 w:0)
|
||||
/// Proof: Balances InactiveIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen)
|
||||
/// Storage: System Account (r:1 w:1)
|
||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
/// Storage: NisCounterpartBalances Account (r:1 w:1)
|
||||
/// Proof: NisCounterpartBalances Account (max_values: None, max_size: Some(112), added: 2587, mode: MaxEncodedLen)
|
||||
/// Storage: NisCounterpartBalances TotalIssuance (r:1 w:1)
|
||||
/// Proof: NisCounterpartBalances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen)
|
||||
/// Storage: Balances Holds (r:1 w:1)
|
||||
/// Proof: Balances Holds (max_values: None, max_size: Some(67), added: 2542, mode: MaxEncodedLen)
|
||||
fn privatize() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `660`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 92_622_000 picoseconds.
|
||||
Weight::from_parts(94_127_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3593))
|
||||
.saturating_add(T::DbWeight::get().reads(7))
|
||||
.saturating_add(T::DbWeight::get().writes(6))
|
||||
}
|
||||
/// Storage: Nis Receipts (r:1 w:1)
|
||||
/// Proof: Nis Receipts (max_values: None, max_size: Some(81), added: 2556, mode: MaxEncodedLen)
|
||||
/// Storage: Nis Summary (r:1 w:1)
|
||||
/// Proof: Nis Summary (max_values: Some(1), max_size: Some(40), added: 535, mode: MaxEncodedLen)
|
||||
/// Storage: Balances InactiveIssuance (r:1 w:0)
|
||||
/// Proof: Balances InactiveIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen)
|
||||
/// Storage: System Account (r:1 w:0)
|
||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
/// Storage: Balances Holds (r:1 w:1)
|
||||
/// Proof: Balances Holds (max_values: None, max_size: Some(67), added: 2542, mode: MaxEncodedLen)
|
||||
fn thaw_private() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `388`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 49_336_000 picoseconds.
|
||||
Weight::from_parts(50_333_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3593))
|
||||
.saturating_add(T::DbWeight::get().reads(5))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: Nis Receipts (r:1 w:1)
|
||||
/// Proof: Nis Receipts (max_values: None, max_size: Some(81), added: 2556, mode: MaxEncodedLen)
|
||||
/// Storage: Nis Summary (r:1 w:1)
|
||||
/// Proof: Nis Summary (max_values: Some(1), max_size: Some(40), added: 535, mode: MaxEncodedLen)
|
||||
/// Storage: NisCounterpartBalances Account (r:1 w:1)
|
||||
/// Proof: NisCounterpartBalances Account (max_values: None, max_size: Some(112), added: 2587, mode: MaxEncodedLen)
|
||||
/// Storage: NisCounterpartBalances TotalIssuance (r:1 w:1)
|
||||
/// Proof: NisCounterpartBalances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen)
|
||||
/// Storage: Balances InactiveIssuance (r:1 w:0)
|
||||
/// Proof: Balances InactiveIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen)
|
||||
/// Storage: System Account (r:1 w:1)
|
||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
fn thaw_communal() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `604`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 98_220_000 picoseconds.
|
||||
Weight::from_parts(100_348_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3593))
|
||||
.saturating_add(T::DbWeight::get().reads(6))
|
||||
.saturating_add(T::DbWeight::get().writes(5))
|
||||
}
|
||||
/// Storage: Nis Summary (r:1 w:1)
|
||||
/// Proof: Nis Summary (max_values: Some(1), max_size: Some(40), added: 535, mode: MaxEncodedLen)
|
||||
/// Storage: Balances InactiveIssuance (r:1 w:0)
|
||||
/// Proof: Balances InactiveIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen)
|
||||
/// Storage: System Account (r:1 w:0)
|
||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
/// Storage: Nis QueueTotals (r:1 w:1)
|
||||
/// Proof: Nis QueueTotals (max_values: Some(1), max_size: Some(10002), added: 10497, mode: MaxEncodedLen)
|
||||
fn process_queues() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `10658`
|
||||
// Estimated: `11487`
|
||||
// Minimum execution time: 33_893_000 picoseconds.
|
||||
Weight::from_parts(37_495_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 11487))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: Nis Queues (r:1 w:1)
|
||||
/// Proof: Nis Queues (max_values: None, max_size: Some(48022), added: 50497, mode: MaxEncodedLen)
|
||||
fn process_queue() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `76`
|
||||
// Estimated: `51487`
|
||||
// Minimum execution time: 4_173_000 picoseconds.
|
||||
Weight::from_parts(4_322_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 51487))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: Nis Receipts (r:0 w:1)
|
||||
/// Proof: Nis Receipts (max_values: None, max_size: Some(81), added: 2556, mode: MaxEncodedLen)
|
||||
fn process_bid() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 6_747_000 picoseconds.
|
||||
Weight::from_parts(6_952_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
}
|
||||
@@ -1,603 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Polkadot.
|
||||
|
||||
// Polkadot 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.
|
||||
|
||||
// Polkadot 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 Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pallet_nomination_pools`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-06-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `runner-e8ezs4ez-project-163-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./target/production/polkadot
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=kusama-dev
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --no-storage-info
|
||||
// --no-median-slopes
|
||||
// --no-min-squares
|
||||
// --pallet=pallet_nomination_pools
|
||||
// --extrinsic=*
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --header=./file_header.txt
|
||||
// --output=./runtime/kusama/src/weights/
|
||||
|
||||
#![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_nomination_pools`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_nomination_pools::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: NominationPools MinJoinBond (r:1 w:0)
|
||||
/// Proof: NominationPools MinJoinBond (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen)
|
||||
/// Storage: NominationPools PoolMembers (r:1 w:1)
|
||||
/// Proof: NominationPools PoolMembers (max_values: None, max_size: Some(717), added: 3192, mode: MaxEncodedLen)
|
||||
/// Storage: NominationPools BondedPools (r:1 w:1)
|
||||
/// Proof: NominationPools BondedPools (max_values: None, max_size: Some(220), added: 2695, mode: MaxEncodedLen)
|
||||
/// Storage: Staking Bonded (r:1 w:0)
|
||||
/// Proof: Staking Bonded (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen)
|
||||
/// Storage: Staking Ledger (r:1 w:1)
|
||||
/// Proof: Staking Ledger (max_values: None, max_size: Some(1091), added: 3566, mode: MaxEncodedLen)
|
||||
/// Storage: NominationPools RewardPools (r:1 w:1)
|
||||
/// Proof: NominationPools RewardPools (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen)
|
||||
/// Storage: NominationPools GlobalMaxCommission (r:1 w:0)
|
||||
/// Proof: NominationPools GlobalMaxCommission (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: System Account (r:2 w:1)
|
||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
/// Storage: NominationPools MaxPoolMembersPerPool (r:1 w:0)
|
||||
/// Proof: NominationPools MaxPoolMembersPerPool (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: NominationPools MaxPoolMembers (r:1 w:0)
|
||||
/// Proof: NominationPools MaxPoolMembers (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: NominationPools CounterForPoolMembers (r:1 w:1)
|
||||
/// Proof: NominationPools CounterForPoolMembers (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: Balances Locks (r:1 w:1)
|
||||
/// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen)
|
||||
/// Storage: Balances Freezes (r:1 w:0)
|
||||
/// Proof: Balances Freezes (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen)
|
||||
/// Storage: VoterList ListNodes (r:3 w:3)
|
||||
/// Proof: VoterList ListNodes (max_values: None, max_size: Some(154), added: 2629, mode: MaxEncodedLen)
|
||||
/// Storage: VoterList ListBags (r:2 w:2)
|
||||
/// Proof: VoterList ListBags (max_values: None, max_size: Some(82), added: 2557, mode: MaxEncodedLen)
|
||||
fn join() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `3229`
|
||||
// Estimated: `8877`
|
||||
// Minimum execution time: 198_640_000 picoseconds.
|
||||
Weight::from_parts(205_158_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 8877))
|
||||
.saturating_add(T::DbWeight::get().reads(19))
|
||||
.saturating_add(T::DbWeight::get().writes(12))
|
||||
}
|
||||
/// Storage: NominationPools PoolMembers (r:1 w:1)
|
||||
/// Proof: NominationPools PoolMembers (max_values: None, max_size: Some(717), added: 3192, mode: MaxEncodedLen)
|
||||
/// Storage: NominationPools BondedPools (r:1 w:1)
|
||||
/// Proof: NominationPools BondedPools (max_values: None, max_size: Some(220), added: 2695, mode: MaxEncodedLen)
|
||||
/// Storage: NominationPools RewardPools (r:1 w:1)
|
||||
/// Proof: NominationPools RewardPools (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen)
|
||||
/// Storage: NominationPools GlobalMaxCommission (r:1 w:0)
|
||||
/// Proof: NominationPools GlobalMaxCommission (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: System Account (r:3 w:2)
|
||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
/// Storage: Staking Bonded (r:1 w:0)
|
||||
/// Proof: Staking Bonded (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen)
|
||||
/// Storage: Staking Ledger (r:1 w:1)
|
||||
/// Proof: Staking Ledger (max_values: None, max_size: Some(1091), added: 3566, mode: MaxEncodedLen)
|
||||
/// Storage: Balances Locks (r:1 w:1)
|
||||
/// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen)
|
||||
/// Storage: Balances Freezes (r:1 w:0)
|
||||
/// Proof: Balances Freezes (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen)
|
||||
/// Storage: VoterList ListNodes (r:3 w:3)
|
||||
/// Proof: VoterList ListNodes (max_values: None, max_size: Some(154), added: 2629, mode: MaxEncodedLen)
|
||||
/// Storage: VoterList ListBags (r:2 w:2)
|
||||
/// Proof: VoterList ListBags (max_values: None, max_size: Some(82), added: 2557, mode: MaxEncodedLen)
|
||||
fn bond_extra_transfer() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `3239`
|
||||
// Estimated: `8877`
|
||||
// Minimum execution time: 191_638_000 picoseconds.
|
||||
Weight::from_parts(200_580_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 8877))
|
||||
.saturating_add(T::DbWeight::get().reads(16))
|
||||
.saturating_add(T::DbWeight::get().writes(12))
|
||||
}
|
||||
/// Storage: NominationPools ClaimPermissions (r:1 w:0)
|
||||
/// Proof: NominationPools ClaimPermissions (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen)
|
||||
/// Storage: NominationPools PoolMembers (r:1 w:1)
|
||||
/// Proof: NominationPools PoolMembers (max_values: None, max_size: Some(717), added: 3192, mode: MaxEncodedLen)
|
||||
/// Storage: NominationPools BondedPools (r:1 w:1)
|
||||
/// Proof: NominationPools BondedPools (max_values: None, max_size: Some(220), added: 2695, mode: MaxEncodedLen)
|
||||
/// Storage: NominationPools RewardPools (r:1 w:1)
|
||||
/// Proof: NominationPools RewardPools (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen)
|
||||
/// Storage: NominationPools GlobalMaxCommission (r:1 w:0)
|
||||
/// Proof: NominationPools GlobalMaxCommission (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: System Account (r:3 w:3)
|
||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
/// Storage: Staking Bonded (r:1 w:0)
|
||||
/// Proof: Staking Bonded (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen)
|
||||
/// Storage: Staking Ledger (r:1 w:1)
|
||||
/// Proof: Staking Ledger (max_values: None, max_size: Some(1091), added: 3566, mode: MaxEncodedLen)
|
||||
/// Storage: Balances Locks (r:1 w:1)
|
||||
/// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen)
|
||||
/// Storage: Balances Freezes (r:1 w:0)
|
||||
/// Proof: Balances Freezes (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen)
|
||||
/// Storage: VoterList ListNodes (r:3 w:3)
|
||||
/// Proof: VoterList ListNodes (max_values: None, max_size: Some(154), added: 2629, mode: MaxEncodedLen)
|
||||
/// Storage: VoterList ListBags (r:2 w:2)
|
||||
/// Proof: VoterList ListBags (max_values: None, max_size: Some(82), added: 2557, mode: MaxEncodedLen)
|
||||
fn bond_extra_other() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `3304`
|
||||
// Estimated: `8877`
|
||||
// Minimum execution time: 232_697_000 picoseconds.
|
||||
Weight::from_parts(238_503_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 8877))
|
||||
.saturating_add(T::DbWeight::get().reads(17))
|
||||
.saturating_add(T::DbWeight::get().writes(13))
|
||||
}
|
||||
/// Storage: NominationPools ClaimPermissions (r:1 w:0)
|
||||
/// Proof: NominationPools ClaimPermissions (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen)
|
||||
/// Storage: NominationPools PoolMembers (r:1 w:1)
|
||||
/// Proof: NominationPools PoolMembers (max_values: None, max_size: Some(717), added: 3192, mode: MaxEncodedLen)
|
||||
/// Storage: NominationPools BondedPools (r:1 w:1)
|
||||
/// Proof: NominationPools BondedPools (max_values: None, max_size: Some(220), added: 2695, mode: MaxEncodedLen)
|
||||
/// Storage: NominationPools RewardPools (r:1 w:1)
|
||||
/// Proof: NominationPools RewardPools (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen)
|
||||
/// Storage: NominationPools GlobalMaxCommission (r:1 w:0)
|
||||
/// Proof: NominationPools GlobalMaxCommission (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: System Account (r:1 w:1)
|
||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
fn claim_payout() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `1171`
|
||||
// Estimated: `4182`
|
||||
// Minimum execution time: 79_834_000 picoseconds.
|
||||
Weight::from_parts(81_793_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4182))
|
||||
.saturating_add(T::DbWeight::get().reads(6))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
/// Storage: NominationPools PoolMembers (r:1 w:1)
|
||||
/// Proof: NominationPools PoolMembers (max_values: None, max_size: Some(717), added: 3192, mode: MaxEncodedLen)
|
||||
/// Storage: NominationPools BondedPools (r:1 w:1)
|
||||
/// Proof: NominationPools BondedPools (max_values: None, max_size: Some(220), added: 2695, mode: MaxEncodedLen)
|
||||
/// Storage: NominationPools RewardPools (r:1 w:1)
|
||||
/// Proof: NominationPools RewardPools (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen)
|
||||
/// Storage: Staking Bonded (r:1 w:0)
|
||||
/// Proof: Staking Bonded (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen)
|
||||
/// Storage: Staking Ledger (r:1 w:1)
|
||||
/// Proof: Staking Ledger (max_values: None, max_size: Some(1091), added: 3566, mode: MaxEncodedLen)
|
||||
/// Storage: NominationPools GlobalMaxCommission (r:1 w:0)
|
||||
/// Proof: NominationPools GlobalMaxCommission (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: System Account (r:2 w:1)
|
||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
/// Storage: Staking CurrentEra (r:1 w:0)
|
||||
/// Proof: Staking CurrentEra (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: Staking Nominators (r:1 w:0)
|
||||
/// Proof: Staking Nominators (max_values: None, max_size: Some(814), added: 3289, mode: MaxEncodedLen)
|
||||
/// Storage: Staking MinNominatorBond (r:1 w:0)
|
||||
/// Proof: Staking MinNominatorBond (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen)
|
||||
/// Storage: Balances Locks (r:1 w:1)
|
||||
/// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen)
|
||||
/// Storage: Balances Freezes (r:1 w:0)
|
||||
/// Proof: Balances Freezes (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen)
|
||||
/// Storage: VoterList ListNodes (r:3 w:3)
|
||||
/// Proof: VoterList ListNodes (max_values: None, max_size: Some(154), added: 2629, mode: MaxEncodedLen)
|
||||
/// Storage: VoterList ListBags (r:2 w:2)
|
||||
/// Proof: VoterList ListBags (max_values: None, max_size: Some(82), added: 2557, mode: MaxEncodedLen)
|
||||
/// Storage: NominationPools SubPoolsStorage (r:1 w:1)
|
||||
/// Proof: NominationPools SubPoolsStorage (max_values: None, max_size: Some(1197), added: 3672, mode: MaxEncodedLen)
|
||||
/// Storage: NominationPools CounterForSubPoolsStorage (r:1 w:1)
|
||||
/// Proof: NominationPools CounterForSubPoolsStorage (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
fn unbond() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `3506`
|
||||
// Estimated: `8877`
|
||||
// Minimum execution time: 175_155_000 picoseconds.
|
||||
Weight::from_parts(179_781_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 8877))
|
||||
.saturating_add(T::DbWeight::get().reads(20))
|
||||
.saturating_add(T::DbWeight::get().writes(13))
|
||||
}
|
||||
/// Storage: NominationPools BondedPools (r:1 w:0)
|
||||
/// Proof: NominationPools BondedPools (max_values: None, max_size: Some(220), added: 2695, mode: MaxEncodedLen)
|
||||
/// Storage: Staking Bonded (r:1 w:0)
|
||||
/// Proof: Staking Bonded (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen)
|
||||
/// Storage: Staking Ledger (r:1 w:1)
|
||||
/// Proof: Staking Ledger (max_values: None, max_size: Some(1091), added: 3566, mode: MaxEncodedLen)
|
||||
/// Storage: Staking CurrentEra (r:1 w:0)
|
||||
/// Proof: Staking CurrentEra (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: Balances Locks (r:1 w:1)
|
||||
/// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen)
|
||||
/// Storage: Balances Freezes (r:1 w:0)
|
||||
/// Proof: Balances Freezes (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen)
|
||||
/// The range of component `s` is `[0, 100]`.
|
||||
fn pool_withdraw_unbonded(s: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `1608`
|
||||
// Estimated: `4764`
|
||||
// Minimum execution time: 63_367_000 picoseconds.
|
||||
Weight::from_parts(65_562_125, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4764))
|
||||
// Standard Error: 1_722
|
||||
.saturating_add(Weight::from_parts(47_690, 0).saturating_mul(s.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(6))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: NominationPools PoolMembers (r:1 w:1)
|
||||
/// Proof: NominationPools PoolMembers (max_values: None, max_size: Some(717), added: 3192, mode: MaxEncodedLen)
|
||||
/// Storage: Staking CurrentEra (r:1 w:0)
|
||||
/// Proof: Staking CurrentEra (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: NominationPools BondedPools (r:1 w:1)
|
||||
/// Proof: NominationPools BondedPools (max_values: None, max_size: Some(220), added: 2695, mode: MaxEncodedLen)
|
||||
/// Storage: NominationPools SubPoolsStorage (r:1 w:1)
|
||||
/// Proof: NominationPools SubPoolsStorage (max_values: None, max_size: Some(1197), added: 3672, mode: MaxEncodedLen)
|
||||
/// Storage: Staking Bonded (r:1 w:0)
|
||||
/// Proof: Staking Bonded (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen)
|
||||
/// Storage: Staking Ledger (r:1 w:1)
|
||||
/// Proof: Staking Ledger (max_values: None, max_size: Some(1091), added: 3566, mode: MaxEncodedLen)
|
||||
/// Storage: Balances Locks (r:1 w:1)
|
||||
/// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen)
|
||||
/// Storage: Balances Freezes (r:1 w:0)
|
||||
/// Proof: Balances Freezes (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen)
|
||||
/// Storage: System Account (r:1 w:1)
|
||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
/// Storage: NominationPools CounterForPoolMembers (r:1 w:1)
|
||||
/// Proof: NominationPools CounterForPoolMembers (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: NominationPools ClaimPermissions (r:0 w:1)
|
||||
/// Proof: NominationPools ClaimPermissions (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen)
|
||||
/// The range of component `s` is `[0, 100]`.
|
||||
fn withdraw_unbonded_update(s: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `2036`
|
||||
// Estimated: `4764`
|
||||
// Minimum execution time: 132_738_000 picoseconds.
|
||||
Weight::from_parts(136_968_458, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4764))
|
||||
// Standard Error: 2_891
|
||||
.saturating_add(Weight::from_parts(75_317, 0).saturating_mul(s.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(10))
|
||||
.saturating_add(T::DbWeight::get().writes(8))
|
||||
}
|
||||
/// Storage: NominationPools PoolMembers (r:1 w:1)
|
||||
/// Proof: NominationPools PoolMembers (max_values: None, max_size: Some(717), added: 3192, mode: MaxEncodedLen)
|
||||
/// Storage: Staking CurrentEra (r:1 w:0)
|
||||
/// Proof: Staking CurrentEra (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: NominationPools BondedPools (r:1 w:1)
|
||||
/// Proof: NominationPools BondedPools (max_values: None, max_size: Some(220), added: 2695, mode: MaxEncodedLen)
|
||||
/// Storage: NominationPools SubPoolsStorage (r:1 w:1)
|
||||
/// Proof: NominationPools SubPoolsStorage (max_values: None, max_size: Some(1197), added: 3672, mode: MaxEncodedLen)
|
||||
/// Storage: Staking Bonded (r:1 w:1)
|
||||
/// Proof: Staking Bonded (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen)
|
||||
/// Storage: Staking Ledger (r:1 w:1)
|
||||
/// Proof: Staking Ledger (max_values: None, max_size: Some(1091), added: 3566, mode: MaxEncodedLen)
|
||||
/// Storage: Staking SlashingSpans (r:1 w:0)
|
||||
/// Proof Skipped: Staking SlashingSpans (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Staking Validators (r:1 w:0)
|
||||
/// Proof: Staking Validators (max_values: None, max_size: Some(45), added: 2520, mode: MaxEncodedLen)
|
||||
/// Storage: Staking Nominators (r:1 w:0)
|
||||
/// Proof: Staking Nominators (max_values: None, max_size: Some(814), added: 3289, 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 Locks (r:1 w:1)
|
||||
/// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen)
|
||||
/// Storage: Balances Freezes (r:1 w:0)
|
||||
/// Proof: Balances Freezes (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen)
|
||||
/// Storage: NominationPools CounterForPoolMembers (r:1 w:1)
|
||||
/// Proof: NominationPools CounterForPoolMembers (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: NominationPools ReversePoolIdLookup (r:1 w:1)
|
||||
/// Proof: NominationPools ReversePoolIdLookup (max_values: None, max_size: Some(44), added: 2519, mode: MaxEncodedLen)
|
||||
/// Storage: NominationPools CounterForReversePoolIdLookup (r:1 w:1)
|
||||
/// Proof: NominationPools CounterForReversePoolIdLookup (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: NominationPools RewardPools (r:1 w:1)
|
||||
/// Proof: NominationPools RewardPools (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen)
|
||||
/// Storage: NominationPools CounterForRewardPools (r:1 w:1)
|
||||
/// Proof: NominationPools CounterForRewardPools (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: NominationPools CounterForSubPoolsStorage (r:1 w:1)
|
||||
/// Proof: NominationPools CounterForSubPoolsStorage (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: NominationPools Metadata (r:1 w:1)
|
||||
/// Proof: NominationPools Metadata (max_values: None, max_size: Some(270), added: 2745, mode: MaxEncodedLen)
|
||||
/// Storage: NominationPools CounterForBondedPools (r:1 w:1)
|
||||
/// Proof: NominationPools CounterForBondedPools (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: Staking Payee (r:0 w:1)
|
||||
/// Proof: Staking Payee (max_values: None, max_size: Some(73), added: 2548, mode: MaxEncodedLen)
|
||||
/// Storage: NominationPools ClaimPermissions (r:0 w:1)
|
||||
/// Proof: NominationPools ClaimPermissions (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen)
|
||||
/// The range of component `s` is `[0, 100]`.
|
||||
fn withdraw_unbonded_kill(s: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `2394`
|
||||
// Estimated: `6196`
|
||||
// Minimum execution time: 223_915_000 picoseconds.
|
||||
Weight::from_parts(229_729_576, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6196))
|
||||
// Standard Error: 5_670
|
||||
.saturating_add(Weight::from_parts(38_117, 0).saturating_mul(s.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(21))
|
||||
.saturating_add(T::DbWeight::get().writes(18))
|
||||
}
|
||||
/// Storage: NominationPools LastPoolId (r:1 w:1)
|
||||
/// Proof: NominationPools LastPoolId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: Staking MinNominatorBond (r:1 w:0)
|
||||
/// Proof: Staking MinNominatorBond (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen)
|
||||
/// Storage: NominationPools MinCreateBond (r:1 w:0)
|
||||
/// Proof: NominationPools MinCreateBond (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen)
|
||||
/// Storage: NominationPools MinJoinBond (r:1 w:0)
|
||||
/// Proof: NominationPools MinJoinBond (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen)
|
||||
/// Storage: NominationPools MaxPools (r:1 w:0)
|
||||
/// Proof: NominationPools MaxPools (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: NominationPools CounterForBondedPools (r:1 w:1)
|
||||
/// Proof: NominationPools CounterForBondedPools (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: NominationPools PoolMembers (r:1 w:1)
|
||||
/// Proof: NominationPools PoolMembers (max_values: None, max_size: Some(717), added: 3192, mode: MaxEncodedLen)
|
||||
/// Storage: NominationPools MaxPoolMembersPerPool (r:1 w:0)
|
||||
/// Proof: NominationPools MaxPoolMembersPerPool (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: NominationPools MaxPoolMembers (r:1 w:0)
|
||||
/// Proof: NominationPools MaxPoolMembers (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: NominationPools CounterForPoolMembers (r:1 w:1)
|
||||
/// Proof: NominationPools CounterForPoolMembers (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: System Account (r:2 w:2)
|
||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
/// Storage: Staking Bonded (r:1 w:1)
|
||||
/// Proof: Staking Bonded (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen)
|
||||
/// Storage: Staking Ledger (r:1 w:1)
|
||||
/// Proof: Staking Ledger (max_values: None, max_size: Some(1091), added: 3566, mode: MaxEncodedLen)
|
||||
/// Storage: Staking CurrentEra (r:1 w:0)
|
||||
/// Proof: Staking CurrentEra (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: Balances Locks (r:1 w:1)
|
||||
/// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen)
|
||||
/// Storage: Balances Freezes (r:1 w:0)
|
||||
/// Proof: Balances Freezes (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen)
|
||||
/// Storage: NominationPools RewardPools (r:1 w:1)
|
||||
/// Proof: NominationPools RewardPools (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen)
|
||||
/// Storage: NominationPools CounterForRewardPools (r:1 w:1)
|
||||
/// Proof: NominationPools CounterForRewardPools (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: NominationPools ReversePoolIdLookup (r:1 w:1)
|
||||
/// Proof: NominationPools ReversePoolIdLookup (max_values: None, max_size: Some(44), added: 2519, mode: MaxEncodedLen)
|
||||
/// Storage: NominationPools CounterForReversePoolIdLookup (r:1 w:1)
|
||||
/// Proof: NominationPools CounterForReversePoolIdLookup (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: NominationPools BondedPools (r:1 w:1)
|
||||
/// Proof: NominationPools BondedPools (max_values: None, max_size: Some(220), added: 2695, mode: MaxEncodedLen)
|
||||
/// Storage: Staking Payee (r:0 w:1)
|
||||
/// Proof: Staking Payee (max_values: None, max_size: Some(73), added: 2548, mode: MaxEncodedLen)
|
||||
fn create() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `1222`
|
||||
// Estimated: `6196`
|
||||
// Minimum execution time: 193_054_000 picoseconds.
|
||||
Weight::from_parts(200_888_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6196))
|
||||
.saturating_add(T::DbWeight::get().reads(22))
|
||||
.saturating_add(T::DbWeight::get().writes(15))
|
||||
}
|
||||
/// Storage: NominationPools BondedPools (r:1 w:0)
|
||||
/// Proof: NominationPools BondedPools (max_values: None, max_size: Some(220), added: 2695, mode: MaxEncodedLen)
|
||||
/// Storage: Staking Bonded (r:1 w:0)
|
||||
/// Proof: Staking Bonded (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen)
|
||||
/// Storage: Staking Ledger (r:1 w:0)
|
||||
/// Proof: Staking Ledger (max_values: None, max_size: Some(1091), added: 3566, mode: MaxEncodedLen)
|
||||
/// Storage: Staking MinNominatorBond (r:1 w:0)
|
||||
/// Proof: Staking MinNominatorBond (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen)
|
||||
/// Storage: Staking Nominators (r:1 w:1)
|
||||
/// Proof: Staking Nominators (max_values: None, max_size: Some(814), added: 3289, mode: MaxEncodedLen)
|
||||
/// Storage: Staking MaxNominatorsCount (r:1 w:0)
|
||||
/// Proof: Staking MaxNominatorsCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: Staking Validators (r:25 w:0)
|
||||
/// Proof: Staking Validators (max_values: None, max_size: Some(45), added: 2520, mode: MaxEncodedLen)
|
||||
/// Storage: Staking CurrentEra (r:1 w:0)
|
||||
/// Proof: Staking CurrentEra (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: VoterList ListNodes (r:1 w:1)
|
||||
/// Proof: VoterList ListNodes (max_values: None, max_size: Some(154), added: 2629, mode: MaxEncodedLen)
|
||||
/// Storage: VoterList ListBags (r:1 w:1)
|
||||
/// Proof: VoterList ListBags (max_values: None, max_size: Some(82), added: 2557, mode: MaxEncodedLen)
|
||||
/// Storage: VoterList CounterForListNodes (r:1 w:1)
|
||||
/// Proof: VoterList CounterForListNodes (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: Staking CounterForNominators (r:1 w:1)
|
||||
/// Proof: Staking CounterForNominators (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// The range of component `n` is `[1, 24]`.
|
||||
fn nominate(n: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `1774`
|
||||
// Estimated: `4556 + n * (2520 ±0)`
|
||||
// Minimum execution time: 67_269_000 picoseconds.
|
||||
Weight::from_parts(68_792_502, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4556))
|
||||
// Standard Error: 6_020
|
||||
.saturating_add(Weight::from_parts(1_407_587, 0).saturating_mul(n.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(12))
|
||||
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
|
||||
.saturating_add(T::DbWeight::get().writes(5))
|
||||
.saturating_add(Weight::from_parts(0, 2520).saturating_mul(n.into()))
|
||||
}
|
||||
/// Storage: NominationPools BondedPools (r:1 w:1)
|
||||
/// Proof: NominationPools BondedPools (max_values: None, max_size: Some(220), added: 2695, mode: MaxEncodedLen)
|
||||
/// Storage: Staking Bonded (r:1 w:0)
|
||||
/// Proof: Staking Bonded (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen)
|
||||
/// Storage: Staking Ledger (r:1 w:0)
|
||||
/// Proof: Staking Ledger (max_values: None, max_size: Some(1091), added: 3566, mode: MaxEncodedLen)
|
||||
fn set_state() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `1363`
|
||||
// Estimated: `4556`
|
||||
// Minimum execution time: 35_349_000 picoseconds.
|
||||
Weight::from_parts(36_869_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4556))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: NominationPools BondedPools (r:1 w:0)
|
||||
/// Proof: NominationPools BondedPools (max_values: None, max_size: Some(220), added: 2695, mode: MaxEncodedLen)
|
||||
/// Storage: NominationPools Metadata (r:1 w:1)
|
||||
/// Proof: NominationPools Metadata (max_values: None, max_size: Some(270), added: 2745, mode: MaxEncodedLen)
|
||||
/// Storage: NominationPools CounterForMetadata (r:1 w:1)
|
||||
/// Proof: NominationPools CounterForMetadata (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// The range of component `n` is `[1, 256]`.
|
||||
fn set_metadata(n: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `531`
|
||||
// Estimated: `3735`
|
||||
// Minimum execution time: 13_767_000 picoseconds.
|
||||
Weight::from_parts(14_685_113, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3735))
|
||||
// Standard Error: 303
|
||||
.saturating_add(Weight::from_parts(1_304, 0).saturating_mul(n.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: NominationPools MinJoinBond (r:0 w:1)
|
||||
/// Proof: NominationPools MinJoinBond (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen)
|
||||
/// Storage: NominationPools MaxPoolMembers (r:0 w:1)
|
||||
/// Proof: NominationPools MaxPoolMembers (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: NominationPools MaxPoolMembersPerPool (r:0 w:1)
|
||||
/// Proof: NominationPools MaxPoolMembersPerPool (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: NominationPools MinCreateBond (r:0 w:1)
|
||||
/// Proof: NominationPools MinCreateBond (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen)
|
||||
/// Storage: NominationPools GlobalMaxCommission (r:0 w:1)
|
||||
/// Proof: NominationPools GlobalMaxCommission (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: NominationPools MaxPools (r:0 w:1)
|
||||
/// Proof: NominationPools MaxPools (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
fn set_configs() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 6_044_000 picoseconds.
|
||||
Weight::from_parts(6_296_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
.saturating_add(T::DbWeight::get().writes(6))
|
||||
}
|
||||
/// Storage: NominationPools BondedPools (r:1 w:1)
|
||||
/// Proof: NominationPools BondedPools (max_values: None, max_size: Some(220), added: 2695, mode: MaxEncodedLen)
|
||||
fn update_roles() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `531`
|
||||
// Estimated: `3685`
|
||||
// Minimum execution time: 19_642_000 picoseconds.
|
||||
Weight::from_parts(20_205_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3685))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: NominationPools BondedPools (r:1 w:0)
|
||||
/// Proof: NominationPools BondedPools (max_values: None, max_size: Some(220), added: 2695, mode: MaxEncodedLen)
|
||||
/// Storage: Staking Bonded (r:1 w:0)
|
||||
/// Proof: Staking Bonded (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen)
|
||||
/// Storage: Staking Ledger (r:1 w:0)
|
||||
/// Proof: Staking Ledger (max_values: None, max_size: Some(1091), added: 3566, mode: MaxEncodedLen)
|
||||
/// Storage: Staking Validators (r:1 w:0)
|
||||
/// Proof: Staking Validators (max_values: None, max_size: Some(45), added: 2520, mode: MaxEncodedLen)
|
||||
/// Storage: Staking Nominators (r:1 w:1)
|
||||
/// Proof: Staking Nominators (max_values: None, max_size: Some(814), added: 3289, mode: MaxEncodedLen)
|
||||
/// Storage: Staking CounterForNominators (r:1 w:1)
|
||||
/// Proof: Staking CounterForNominators (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: VoterList ListNodes (r:1 w:1)
|
||||
/// Proof: VoterList ListNodes (max_values: None, max_size: Some(154), added: 2629, mode: MaxEncodedLen)
|
||||
/// Storage: VoterList ListBags (r:1 w:1)
|
||||
/// Proof: VoterList ListBags (max_values: None, max_size: Some(82), added: 2557, mode: MaxEncodedLen)
|
||||
/// Storage: VoterList CounterForListNodes (r:1 w:1)
|
||||
/// Proof: VoterList CounterForListNodes (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
fn chill() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `1937`
|
||||
// Estimated: `4556`
|
||||
// Minimum execution time: 65_923_000 picoseconds.
|
||||
Weight::from_parts(68_711_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4556))
|
||||
.saturating_add(T::DbWeight::get().reads(9))
|
||||
.saturating_add(T::DbWeight::get().writes(5))
|
||||
}
|
||||
/// Storage: NominationPools BondedPools (r:1 w:1)
|
||||
/// Proof: NominationPools BondedPools (max_values: None, max_size: Some(220), added: 2695, mode: MaxEncodedLen)
|
||||
/// Storage: NominationPools RewardPools (r:1 w:1)
|
||||
/// Proof: NominationPools RewardPools (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen)
|
||||
/// Storage: NominationPools GlobalMaxCommission (r:1 w:0)
|
||||
/// Proof: NominationPools GlobalMaxCommission (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: System Account (r:1 w:0)
|
||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
fn set_commission() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `770`
|
||||
// Estimated: `3685`
|
||||
// Minimum execution time: 32_824_000 picoseconds.
|
||||
Weight::from_parts(33_654_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3685))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: NominationPools BondedPools (r:1 w:1)
|
||||
/// Proof: NominationPools BondedPools (max_values: None, max_size: Some(220), added: 2695, mode: MaxEncodedLen)
|
||||
fn set_commission_max() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `571`
|
||||
// Estimated: `3685`
|
||||
// Minimum execution time: 18_577_000 picoseconds.
|
||||
Weight::from_parts(19_317_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3685))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: NominationPools BondedPools (r:1 w:1)
|
||||
/// Proof: NominationPools BondedPools (max_values: None, max_size: Some(220), added: 2695, mode: MaxEncodedLen)
|
||||
fn set_commission_change_rate() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `531`
|
||||
// Estimated: `3685`
|
||||
// Minimum execution time: 19_228_000 picoseconds.
|
||||
Weight::from_parts(20_070_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3685))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: NominationPools PoolMembers (r:1 w:0)
|
||||
/// Proof: NominationPools PoolMembers (max_values: None, max_size: Some(717), added: 3192, mode: MaxEncodedLen)
|
||||
/// Storage: NominationPools ClaimPermissions (r:1 w:1)
|
||||
/// Proof: NominationPools ClaimPermissions (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen)
|
||||
fn set_claim_permission() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `542`
|
||||
// Estimated: `4182`
|
||||
// Minimum execution time: 14_300_000 picoseconds.
|
||||
Weight::from_parts(14_678_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4182))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: NominationPools BondedPools (r:1 w:0)
|
||||
/// Proof: NominationPools BondedPools (max_values: None, max_size: Some(220), added: 2695, mode: MaxEncodedLen)
|
||||
/// Storage: NominationPools RewardPools (r:1 w:1)
|
||||
/// Proof: NominationPools RewardPools (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen)
|
||||
/// Storage: NominationPools GlobalMaxCommission (r:1 w:0)
|
||||
/// Proof: NominationPools GlobalMaxCommission (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: System Account (r:1 w:1)
|
||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
fn claim_commission() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `968`
|
||||
// Estimated: `3685`
|
||||
// Minimum execution time: 65_367_000 picoseconds.
|
||||
Weight::from_parts(67_417_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3685))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
}
|
||||
@@ -1,222 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Polkadot.
|
||||
|
||||
// Polkadot 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.
|
||||
|
||||
// Polkadot 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 Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pallet_offences`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-06-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `runner-e8ezs4ez-project-163-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./target/production/polkadot
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=kusama-dev
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --no-storage-info
|
||||
// --no-median-slopes
|
||||
// --no-min-squares
|
||||
// --pallet=pallet_offences
|
||||
// --extrinsic=*
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --header=./file_header.txt
|
||||
// --output=./runtime/kusama/src/weights/
|
||||
|
||||
#![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_offences`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_offences::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: Offences ConcurrentReportsIndex (r:1 w:1)
|
||||
/// Proof Skipped: Offences ConcurrentReportsIndex (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Offences Reports (r:100 w:100)
|
||||
/// Proof Skipped: Offences Reports (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Staking SlashRewardFraction (r:1 w:0)
|
||||
/// Proof: Staking SlashRewardFraction (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: Staking ActiveEra (r:1 w:0)
|
||||
/// Proof: Staking ActiveEra (max_values: Some(1), max_size: Some(13), added: 508, mode: MaxEncodedLen)
|
||||
/// Storage: Staking ErasStartSessionIndex (r:1 w:0)
|
||||
/// Proof: Staking ErasStartSessionIndex (max_values: None, max_size: Some(16), added: 2491, mode: MaxEncodedLen)
|
||||
/// Storage: Staking Invulnerables (r:1 w:0)
|
||||
/// Proof Skipped: Staking Invulnerables (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Staking ValidatorSlashInEra (r:100 w:100)
|
||||
/// Proof: Staking ValidatorSlashInEra (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen)
|
||||
/// Storage: Staking SlashingSpans (r:2500 w:2500)
|
||||
/// Proof Skipped: Staking SlashingSpans (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Staking SpanSlash (r:2500 w:2500)
|
||||
/// Proof: Staking SpanSlash (max_values: None, max_size: Some(76), added: 2551, mode: MaxEncodedLen)
|
||||
/// Storage: Staking Validators (r:100 w:100)
|
||||
/// Proof: Staking Validators (max_values: None, max_size: Some(45), added: 2520, mode: MaxEncodedLen)
|
||||
/// Storage: Staking CounterForValidators (r:1 w:1)
|
||||
/// Proof: Staking CounterForValidators (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: VoterList ListNodes (r:299 w:299)
|
||||
/// Proof: VoterList ListNodes (max_values: None, max_size: Some(154), added: 2629, mode: MaxEncodedLen)
|
||||
/// Storage: VoterList ListBags (r:1 w:1)
|
||||
/// Proof: VoterList ListBags (max_values: None, max_size: Some(82), added: 2557, mode: MaxEncodedLen)
|
||||
/// Storage: VoterList CounterForListNodes (r:1 w:1)
|
||||
/// Proof: VoterList CounterForListNodes (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: Staking Nominators (r:100 w:0)
|
||||
/// Proof: Staking Nominators (max_values: None, max_size: Some(814), added: 3289, mode: MaxEncodedLen)
|
||||
/// Storage: Staking OffendingValidators (r:1 w:1)
|
||||
/// Proof Skipped: Staking OffendingValidators (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Session Validators (r:1 w:0)
|
||||
/// Proof Skipped: Session Validators (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Staking NominatorSlashInEra (r:2400 w:2400)
|
||||
/// Proof: Staking NominatorSlashInEra (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen)
|
||||
/// Storage: Staking UnappliedSlashes (r:1 w:1)
|
||||
/// Proof Skipped: Staking UnappliedSlashes (max_values: None, max_size: None, mode: Measured)
|
||||
/// The range of component `r` is `[1, 100]`.
|
||||
/// The range of component `o` is `[2, 100]`.
|
||||
/// The range of component `n` is `[0, 24]`.
|
||||
fn report_offence_im_online(_r: u32, o: u32, n: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0 + n * (2863 ±0) + o * (1226 ±0)`
|
||||
// Estimated: `128540 + n * (156186 ±29) + o * (38402 ±7)`
|
||||
// Minimum execution time: 695_466_000 picoseconds.
|
||||
Weight::from_parts(705_203_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 128540))
|
||||
// Standard Error: 4_753_384
|
||||
.saturating_add(Weight::from_parts(476_947_930, 0).saturating_mul(o.into()))
|
||||
// Standard Error: 19_364_925
|
||||
.saturating_add(Weight::from_parts(573_438_006, 0).saturating_mul(n.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(172))
|
||||
.saturating_add(T::DbWeight::get().reads((51_u64).saturating_mul(o.into())))
|
||||
.saturating_add(T::DbWeight::get().reads((185_u64).saturating_mul(n.into())))
|
||||
.saturating_add(T::DbWeight::get().writes(165))
|
||||
.saturating_add(T::DbWeight::get().writes((50_u64).saturating_mul(o.into())))
|
||||
.saturating_add(T::DbWeight::get().writes((185_u64).saturating_mul(n.into())))
|
||||
.saturating_add(Weight::from_parts(0, 156186).saturating_mul(n.into()))
|
||||
.saturating_add(Weight::from_parts(0, 38402).saturating_mul(o.into()))
|
||||
}
|
||||
/// Storage: Offences ConcurrentReportsIndex (r:1 w:1)
|
||||
/// Proof Skipped: Offences ConcurrentReportsIndex (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Offences Reports (r:1 w:1)
|
||||
/// Proof Skipped: Offences Reports (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Staking SlashRewardFraction (r:1 w:0)
|
||||
/// Proof: Staking SlashRewardFraction (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: Staking ActiveEra (r:1 w:0)
|
||||
/// Proof: Staking ActiveEra (max_values: Some(1), max_size: Some(13), added: 508, mode: MaxEncodedLen)
|
||||
/// Storage: Staking ErasStartSessionIndex (r:1 w:0)
|
||||
/// Proof: Staking ErasStartSessionIndex (max_values: None, max_size: Some(16), added: 2491, mode: MaxEncodedLen)
|
||||
/// Storage: Staking Invulnerables (r:1 w:0)
|
||||
/// Proof Skipped: Staking Invulnerables (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Staking ValidatorSlashInEra (r:1 w:1)
|
||||
/// Proof: Staking ValidatorSlashInEra (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen)
|
||||
/// Storage: Staking SlashingSpans (r:25 w:25)
|
||||
/// Proof Skipped: Staking SlashingSpans (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Staking SpanSlash (r:25 w:25)
|
||||
/// Proof: Staking SpanSlash (max_values: None, max_size: Some(76), added: 2551, mode: MaxEncodedLen)
|
||||
/// Storage: Staking Validators (r:1 w:1)
|
||||
/// Proof: Staking Validators (max_values: None, max_size: Some(45), added: 2520, mode: MaxEncodedLen)
|
||||
/// Storage: Staking CounterForValidators (r:1 w:1)
|
||||
/// Proof: Staking CounterForValidators (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: VoterList ListNodes (r:2 w:2)
|
||||
/// Proof: VoterList ListNodes (max_values: None, max_size: Some(154), added: 2629, mode: MaxEncodedLen)
|
||||
/// Storage: VoterList ListBags (r:1 w:1)
|
||||
/// Proof: VoterList ListBags (max_values: None, max_size: Some(82), added: 2557, mode: MaxEncodedLen)
|
||||
/// Storage: VoterList CounterForListNodes (r:1 w:1)
|
||||
/// Proof: VoterList CounterForListNodes (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: Staking Nominators (r:1 w:0)
|
||||
/// Proof: Staking Nominators (max_values: None, max_size: Some(814), added: 3289, mode: MaxEncodedLen)
|
||||
/// Storage: Staking OffendingValidators (r:1 w:1)
|
||||
/// Proof Skipped: Staking OffendingValidators (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Session Validators (r:1 w:0)
|
||||
/// Proof Skipped: Session Validators (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Staking NominatorSlashInEra (r:24 w:24)
|
||||
/// Proof: Staking NominatorSlashInEra (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen)
|
||||
/// Storage: Staking UnappliedSlashes (r:1 w:1)
|
||||
/// Proof Skipped: Staking UnappliedSlashes (max_values: None, max_size: None, mode: Measured)
|
||||
/// The range of component `n` is `[0, 24]`.
|
||||
fn report_offence_grandpa(n: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `1831 + n * (48 ±0)`
|
||||
// Estimated: `5686 + n * (2551 ±0)`
|
||||
// Minimum execution time: 92_093_000 picoseconds.
|
||||
Weight::from_parts(104_573_662, 0)
|
||||
.saturating_add(Weight::from_parts(0, 5686))
|
||||
// Standard Error: 22_045
|
||||
.saturating_add(Weight::from_parts(10_859_187, 0).saturating_mul(n.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(19))
|
||||
.saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(n.into())))
|
||||
.saturating_add(T::DbWeight::get().writes(13))
|
||||
.saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(n.into())))
|
||||
.saturating_add(Weight::from_parts(0, 2551).saturating_mul(n.into()))
|
||||
}
|
||||
/// Storage: Offences ConcurrentReportsIndex (r:1 w:1)
|
||||
/// Proof Skipped: Offences ConcurrentReportsIndex (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Offences Reports (r:1 w:1)
|
||||
/// Proof Skipped: Offences Reports (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Staking SlashRewardFraction (r:1 w:0)
|
||||
/// Proof: Staking SlashRewardFraction (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: Staking ActiveEra (r:1 w:0)
|
||||
/// Proof: Staking ActiveEra (max_values: Some(1), max_size: Some(13), added: 508, mode: MaxEncodedLen)
|
||||
/// Storage: Staking ErasStartSessionIndex (r:1 w:0)
|
||||
/// Proof: Staking ErasStartSessionIndex (max_values: None, max_size: Some(16), added: 2491, mode: MaxEncodedLen)
|
||||
/// Storage: Staking Invulnerables (r:1 w:0)
|
||||
/// Proof Skipped: Staking Invulnerables (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Staking ValidatorSlashInEra (r:1 w:1)
|
||||
/// Proof: Staking ValidatorSlashInEra (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen)
|
||||
/// Storage: Staking SlashingSpans (r:25 w:25)
|
||||
/// Proof Skipped: Staking SlashingSpans (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Staking SpanSlash (r:25 w:25)
|
||||
/// Proof: Staking SpanSlash (max_values: None, max_size: Some(76), added: 2551, mode: MaxEncodedLen)
|
||||
/// Storage: Staking Validators (r:1 w:1)
|
||||
/// Proof: Staking Validators (max_values: None, max_size: Some(45), added: 2520, mode: MaxEncodedLen)
|
||||
/// Storage: Staking CounterForValidators (r:1 w:1)
|
||||
/// Proof: Staking CounterForValidators (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: VoterList ListNodes (r:2 w:2)
|
||||
/// Proof: VoterList ListNodes (max_values: None, max_size: Some(154), added: 2629, mode: MaxEncodedLen)
|
||||
/// Storage: VoterList ListBags (r:1 w:1)
|
||||
/// Proof: VoterList ListBags (max_values: None, max_size: Some(82), added: 2557, mode: MaxEncodedLen)
|
||||
/// Storage: VoterList CounterForListNodes (r:1 w:1)
|
||||
/// Proof: VoterList CounterForListNodes (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: Staking Nominators (r:1 w:0)
|
||||
/// Proof: Staking Nominators (max_values: None, max_size: Some(814), added: 3289, mode: MaxEncodedLen)
|
||||
/// Storage: Staking OffendingValidators (r:1 w:1)
|
||||
/// Proof Skipped: Staking OffendingValidators (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Session Validators (r:1 w:0)
|
||||
/// Proof Skipped: Session Validators (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Staking NominatorSlashInEra (r:24 w:24)
|
||||
/// Proof: Staking NominatorSlashInEra (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen)
|
||||
/// Storage: Staking UnappliedSlashes (r:1 w:1)
|
||||
/// Proof Skipped: Staking UnappliedSlashes (max_values: None, max_size: None, mode: Measured)
|
||||
/// The range of component `n` is `[0, 24]`.
|
||||
fn report_offence_babe(n: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `1831 + n * (48 ±0)`
|
||||
// Estimated: `5686 + n * (2551 ±0)`
|
||||
// Minimum execution time: 92_097_000 picoseconds.
|
||||
Weight::from_parts(104_496_920, 0)
|
||||
.saturating_add(Weight::from_parts(0, 5686))
|
||||
// Standard Error: 25_384
|
||||
.saturating_add(Weight::from_parts(10_982_115, 0).saturating_mul(n.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(19))
|
||||
.saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(n.into())))
|
||||
.saturating_add(T::DbWeight::get().writes(13))
|
||||
.saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(n.into())))
|
||||
.saturating_add(Weight::from_parts(0, 2551).saturating_mul(n.into()))
|
||||
}
|
||||
}
|
||||
@@ -1,233 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Polkadot.
|
||||
|
||||
// Polkadot 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.
|
||||
|
||||
// Polkadot 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 Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pallet_preimage`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-06-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `runner-e8ezs4ez-project-163-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./target/production/polkadot
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=kusama-dev
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --no-storage-info
|
||||
// --no-median-slopes
|
||||
// --no-min-squares
|
||||
// --pallet=pallet_preimage
|
||||
// --extrinsic=*
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --header=./file_header.txt
|
||||
// --output=./runtime/kusama/src/weights/
|
||||
|
||||
#![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_preimage`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_preimage::WeightInfo for WeightInfo<T> {
|
||||
fn ensure_updated(n: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `193 + n * (91 ±0)`
|
||||
// Estimated: `3593 + n * (2566 ±0)`
|
||||
// Minimum execution time: 2_000_000 picoseconds.
|
||||
Weight::from_parts(2_000_000, 3593)
|
||||
// Standard Error: 13_720
|
||||
.saturating_add(Weight::from_parts(17_309_199, 0).saturating_mul(n.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(1_u64))
|
||||
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
|
||||
.saturating_add(T::DbWeight::get().writes(1_u64))
|
||||
.saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(n.into())))
|
||||
.saturating_add(Weight::from_parts(0, 2566).saturating_mul(n.into()))
|
||||
}
|
||||
|
||||
/// Storage: Preimage StatusFor (r:1 w:1)
|
||||
/// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen)
|
||||
/// Storage: Preimage PreimageFor (r:0 w:1)
|
||||
/// Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: MaxEncodedLen)
|
||||
/// The range of component `s` is `[0, 4194304]`.
|
||||
fn note_preimage(s: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `143`
|
||||
// Estimated: `3556`
|
||||
// Minimum execution time: 29_231_000 picoseconds.
|
||||
Weight::from_parts(29_712_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3556))
|
||||
// Standard Error: 5
|
||||
.saturating_add(Weight::from_parts(2_593, 0).saturating_mul(s.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: Preimage StatusFor (r:1 w:1)
|
||||
/// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen)
|
||||
/// Storage: Preimage PreimageFor (r:0 w:1)
|
||||
/// Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: MaxEncodedLen)
|
||||
/// The range of component `s` is `[0, 4194304]`.
|
||||
fn note_requested_preimage(s: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `106`
|
||||
// Estimated: `3556`
|
||||
// Minimum execution time: 15_753_000 picoseconds.
|
||||
Weight::from_parts(15_927_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3556))
|
||||
// Standard Error: 5
|
||||
.saturating_add(Weight::from_parts(2_585, 0).saturating_mul(s.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: Preimage StatusFor (r:1 w:1)
|
||||
/// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen)
|
||||
/// Storage: Preimage PreimageFor (r:0 w:1)
|
||||
/// Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: MaxEncodedLen)
|
||||
/// The range of component `s` is `[0, 4194304]`.
|
||||
fn note_no_deposit_preimage(s: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `106`
|
||||
// Estimated: `3556`
|
||||
// Minimum execution time: 15_147_000 picoseconds.
|
||||
Weight::from_parts(15_364_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3556))
|
||||
// Standard Error: 4
|
||||
.saturating_add(Weight::from_parts(2_553, 0).saturating_mul(s.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: Preimage StatusFor (r:1 w:1)
|
||||
/// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen)
|
||||
/// Storage: Preimage PreimageFor (r:0 w:1)
|
||||
/// Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: MaxEncodedLen)
|
||||
fn unnote_preimage() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `289`
|
||||
// Estimated: `3556`
|
||||
// Minimum execution time: 52_018_000 picoseconds.
|
||||
Weight::from_parts(57_037_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3556))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: Preimage StatusFor (r:1 w:1)
|
||||
/// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen)
|
||||
/// Storage: Preimage PreimageFor (r:0 w:1)
|
||||
/// Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: MaxEncodedLen)
|
||||
fn unnote_no_deposit_preimage() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `144`
|
||||
// Estimated: `3556`
|
||||
// Minimum execution time: 32_110_000 picoseconds.
|
||||
Weight::from_parts(35_435_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3556))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: Preimage StatusFor (r:1 w:1)
|
||||
/// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen)
|
||||
fn request_preimage() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `188`
|
||||
// Estimated: `3556`
|
||||
// Minimum execution time: 28_380_000 picoseconds.
|
||||
Weight::from_parts(31_692_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3556))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: Preimage StatusFor (r:1 w:1)
|
||||
/// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen)
|
||||
fn request_no_deposit_preimage() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `144`
|
||||
// Estimated: `3556`
|
||||
// Minimum execution time: 18_218_000 picoseconds.
|
||||
Weight::from_parts(20_005_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3556))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: Preimage StatusFor (r:1 w:1)
|
||||
/// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen)
|
||||
fn request_unnoted_preimage() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `42`
|
||||
// Estimated: `3556`
|
||||
// Minimum execution time: 24_225_000 picoseconds.
|
||||
Weight::from_parts(27_623_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3556))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: Preimage StatusFor (r:1 w:1)
|
||||
/// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen)
|
||||
fn request_requested_preimage() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `106`
|
||||
// Estimated: `3556`
|
||||
// Minimum execution time: 11_614_000 picoseconds.
|
||||
Weight::from_parts(12_372_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3556))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: Preimage StatusFor (r:1 w:1)
|
||||
/// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen)
|
||||
/// Storage: Preimage PreimageFor (r:0 w:1)
|
||||
/// Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: MaxEncodedLen)
|
||||
fn unrequest_preimage() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `144`
|
||||
// Estimated: `3556`
|
||||
// Minimum execution time: 30_214_000 picoseconds.
|
||||
Weight::from_parts(32_682_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3556))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: Preimage StatusFor (r:1 w:1)
|
||||
/// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen)
|
||||
fn unrequest_unnoted_preimage() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `106`
|
||||
// Estimated: `3556`
|
||||
// Minimum execution time: 10_659_000 picoseconds.
|
||||
Weight::from_parts(12_066_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3556))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: Preimage StatusFor (r:1 w:1)
|
||||
/// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen)
|
||||
fn unrequest_multi_referenced_preimage() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `106`
|
||||
// Estimated: `3556`
|
||||
// Minimum execution time: 10_770_000 picoseconds.
|
||||
Weight::from_parts(11_745_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3556))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
}
|
||||
@@ -1,224 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Polkadot.
|
||||
|
||||
// Polkadot 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.
|
||||
|
||||
// Polkadot 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 Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pallet_proxy`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-06-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `runner-e8ezs4ez-project-163-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./target/production/polkadot
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=kusama-dev
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --no-storage-info
|
||||
// --no-median-slopes
|
||||
// --no-min-squares
|
||||
// --pallet=pallet_proxy
|
||||
// --extrinsic=*
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --header=./file_header.txt
|
||||
// --output=./runtime/kusama/src/weights/
|
||||
|
||||
#![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_proxy`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> {
|
||||
/// 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: `227 + p * (37 ±0)`
|
||||
// Estimated: `4706`
|
||||
// Minimum execution time: 15_098_000 picoseconds.
|
||||
Weight::from_parts(15_489_847, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4706))
|
||||
// Standard Error: 2_263
|
||||
.saturating_add(Weight::from_parts(63_093, 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: `554 + a * (68 ±0) + p * (37 ±0)`
|
||||
// Estimated: `5698`
|
||||
// Minimum execution time: 39_651_000 picoseconds.
|
||||
Weight::from_parts(40_543_916, 0)
|
||||
.saturating_add(Weight::from_parts(0, 5698))
|
||||
// Standard Error: 4_675
|
||||
.saturating_add(Weight::from_parts(155_883, 0).saturating_mul(a.into()))
|
||||
// Standard Error: 4_830
|
||||
.saturating_add(Weight::from_parts(30_475, 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: `469 + a * (68 ±0)`
|
||||
// Estimated: `5698`
|
||||
// Minimum execution time: 24_096_000 picoseconds.
|
||||
Weight::from_parts(25_043_982, 0)
|
||||
.saturating_add(Weight::from_parts(0, 5698))
|
||||
// Standard Error: 2_018
|
||||
.saturating_add(Weight::from_parts(161_362, 0).saturating_mul(a.into()))
|
||||
// Standard Error: 2_085
|
||||
.saturating_add(Weight::from_parts(5_869, 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: `469 + a * (68 ±0)`
|
||||
// Estimated: `5698`
|
||||
// Minimum execution time: 24_544_000 picoseconds.
|
||||
Weight::from_parts(25_464_879, 0)
|
||||
.saturating_add(Weight::from_parts(0, 5698))
|
||||
// Standard Error: 1_840
|
||||
.saturating_add(Weight::from_parts(157_224, 0).saturating_mul(a.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: `486 + a * (68 ±0) + p * (37 ±0)`
|
||||
// Estimated: `5698`
|
||||
// Minimum execution time: 33_869_000 picoseconds.
|
||||
Weight::from_parts(36_671_590, 0)
|
||||
.saturating_add(Weight::from_parts(0, 5698))
|
||||
// Standard Error: 4_508
|
||||
.saturating_add(Weight::from_parts(170_494, 0).saturating_mul(a.into()))
|
||||
// Standard Error: 4_657
|
||||
.saturating_add(Weight::from_parts(29_881, 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: `227 + p * (37 ±0)`
|
||||
// Estimated: `4706`
|
||||
// Minimum execution time: 25_378_000 picoseconds.
|
||||
Weight::from_parts(26_232_312, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4706))
|
||||
// Standard Error: 1_337
|
||||
.saturating_add(Weight::from_parts(62_294, 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: `227 + p * (37 ±0)`
|
||||
// Estimated: `4706`
|
||||
// Minimum execution time: 25_306_000 picoseconds.
|
||||
Weight::from_parts(26_702_472, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4706))
|
||||
// Standard Error: 1_760
|
||||
.saturating_add(Weight::from_parts(52_636, 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: `227 + p * (37 ±0)`
|
||||
// Estimated: `4706`
|
||||
// Minimum execution time: 22_177_000 picoseconds.
|
||||
Weight::from_parts(22_859_150, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4706))
|
||||
// Standard Error: 2_374
|
||||
.saturating_add(Weight::from_parts(51_085, 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: `239`
|
||||
// Estimated: `4706`
|
||||
// Minimum execution time: 27_010_000 picoseconds.
|
||||
Weight::from_parts(27_910_735, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4706))
|
||||
// Standard Error: 1_618
|
||||
.saturating_add(Weight::from_parts(10_864, 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: `264 + p * (37 ±0)`
|
||||
// Estimated: `4706`
|
||||
// Minimum execution time: 23_039_000 picoseconds.
|
||||
Weight::from_parts(23_903_487, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4706))
|
||||
// Standard Error: 2_434
|
||||
.saturating_add(Weight::from_parts(45_603, 0).saturating_mul(p.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
}
|
||||
@@ -1,176 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Polkadot.
|
||||
|
||||
// Polkadot 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.
|
||||
|
||||
// Polkadot 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 Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pallet_ranked_collective`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-06-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `runner-e8ezs4ez-project-163-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./target/production/polkadot
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=kusama-dev
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --no-storage-info
|
||||
// --no-median-slopes
|
||||
// --no-min-squares
|
||||
// --pallet=pallet_ranked_collective
|
||||
// --extrinsic=*
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --header=./file_header.txt
|
||||
// --output=./runtime/kusama/src/weights/
|
||||
|
||||
#![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_ranked_collective`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_ranked_collective::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: FellowshipCollective Members (r:1 w:1)
|
||||
/// Proof: FellowshipCollective Members (max_values: None, max_size: Some(42), added: 2517, mode: MaxEncodedLen)
|
||||
/// Storage: FellowshipCollective MemberCount (r:1 w:1)
|
||||
/// Proof: FellowshipCollective MemberCount (max_values: None, max_size: Some(14), added: 2489, mode: MaxEncodedLen)
|
||||
/// Storage: FellowshipCollective IndexToId (r:0 w:1)
|
||||
/// Proof: FellowshipCollective IndexToId (max_values: None, max_size: Some(54), added: 2529, mode: MaxEncodedLen)
|
||||
/// Storage: FellowshipCollective IdToIndex (r:0 w:1)
|
||||
/// Proof: FellowshipCollective IdToIndex (max_values: None, max_size: Some(54), added: 2529, mode: MaxEncodedLen)
|
||||
fn add_member() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `76`
|
||||
// Estimated: `3507`
|
||||
// Minimum execution time: 16_103_000 picoseconds.
|
||||
Weight::from_parts(16_743_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3507))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
/// Storage: FellowshipCollective Members (r:1 w:1)
|
||||
/// Proof: FellowshipCollective Members (max_values: None, max_size: Some(42), added: 2517, mode: MaxEncodedLen)
|
||||
/// Storage: FellowshipCollective MemberCount (r:11 w:11)
|
||||
/// Proof: FellowshipCollective MemberCount (max_values: None, max_size: Some(14), added: 2489, mode: MaxEncodedLen)
|
||||
/// Storage: FellowshipCollective IdToIndex (r:11 w:11)
|
||||
/// Proof: FellowshipCollective IdToIndex (max_values: None, max_size: Some(54), added: 2529, mode: MaxEncodedLen)
|
||||
/// Storage: FellowshipCollective IndexToId (r:11 w:11)
|
||||
/// Proof: FellowshipCollective IndexToId (max_values: None, max_size: Some(54), added: 2529, mode: MaxEncodedLen)
|
||||
/// The range of component `r` is `[0, 10]`.
|
||||
fn remove_member(r: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `550 + r * (281 ±0)`
|
||||
// Estimated: `3519 + r * (2529 ±0)`
|
||||
// Minimum execution time: 27_225_000 picoseconds.
|
||||
Weight::from_parts(31_460_102, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3519))
|
||||
// Standard Error: 23_877
|
||||
.saturating_add(Weight::from_parts(12_798_296, 0).saturating_mul(r.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(r.into())))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
.saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(r.into())))
|
||||
.saturating_add(Weight::from_parts(0, 2529).saturating_mul(r.into()))
|
||||
}
|
||||
/// Storage: FellowshipCollective Members (r:1 w:1)
|
||||
/// Proof: FellowshipCollective Members (max_values: None, max_size: Some(42), added: 2517, mode: MaxEncodedLen)
|
||||
/// Storage: FellowshipCollective MemberCount (r:1 w:1)
|
||||
/// Proof: FellowshipCollective MemberCount (max_values: None, max_size: Some(14), added: 2489, mode: MaxEncodedLen)
|
||||
/// Storage: FellowshipCollective IndexToId (r:0 w:1)
|
||||
/// Proof: FellowshipCollective IndexToId (max_values: None, max_size: Some(54), added: 2529, mode: MaxEncodedLen)
|
||||
/// Storage: FellowshipCollective IdToIndex (r:0 w:1)
|
||||
/// Proof: FellowshipCollective IdToIndex (max_values: None, max_size: Some(54), added: 2529, mode: MaxEncodedLen)
|
||||
/// The range of component `r` is `[0, 10]`.
|
||||
fn promote_member(r: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `248 + r * (17 ±0)`
|
||||
// Estimated: `3507`
|
||||
// Minimum execution time: 18_964_000 picoseconds.
|
||||
Weight::from_parts(19_901_082, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3507))
|
||||
// Standard Error: 4_560
|
||||
.saturating_add(Weight::from_parts(326_770, 0).saturating_mul(r.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
/// Storage: FellowshipCollective Members (r:1 w:1)
|
||||
/// Proof: FellowshipCollective Members (max_values: None, max_size: Some(42), added: 2517, mode: MaxEncodedLen)
|
||||
/// Storage: FellowshipCollective MemberCount (r:1 w:1)
|
||||
/// Proof: FellowshipCollective MemberCount (max_values: None, max_size: Some(14), added: 2489, mode: MaxEncodedLen)
|
||||
/// Storage: FellowshipCollective IdToIndex (r:1 w:1)
|
||||
/// Proof: FellowshipCollective IdToIndex (max_values: None, max_size: Some(54), added: 2529, mode: MaxEncodedLen)
|
||||
/// Storage: FellowshipCollective IndexToId (r:1 w:1)
|
||||
/// Proof: FellowshipCollective IndexToId (max_values: None, max_size: Some(54), added: 2529, mode: MaxEncodedLen)
|
||||
/// The range of component `r` is `[0, 10]`.
|
||||
fn demote_member(r: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `566 + r * (72 ±0)`
|
||||
// Estimated: `3519`
|
||||
// Minimum execution time: 27_310_000 picoseconds.
|
||||
Weight::from_parts(30_386_652, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3519))
|
||||
// Standard Error: 33_721
|
||||
.saturating_add(Weight::from_parts(667_118, 0).saturating_mul(r.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
/// Storage: FellowshipCollective Members (r:1 w:0)
|
||||
/// Proof: FellowshipCollective Members (max_values: None, max_size: Some(42), added: 2517, mode: MaxEncodedLen)
|
||||
/// Storage: FellowshipReferenda ReferendumInfoFor (r:1 w:1)
|
||||
/// Proof: FellowshipReferenda ReferendumInfoFor (max_values: None, max_size: Some(900), added: 3375, mode: MaxEncodedLen)
|
||||
/// Storage: FellowshipCollective Voting (r:1 w:1)
|
||||
/// Proof: FellowshipCollective Voting (max_values: None, max_size: Some(65), added: 2540, mode: MaxEncodedLen)
|
||||
/// Storage: Scheduler Agenda (r:2 w:2)
|
||||
/// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen)
|
||||
fn vote() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `638`
|
||||
// Estimated: `83866`
|
||||
// Minimum execution time: 50_373_000 picoseconds.
|
||||
Weight::from_parts(51_359_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 83866))
|
||||
.saturating_add(T::DbWeight::get().reads(5))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
/// Storage: FellowshipReferenda ReferendumInfoFor (r:1 w:0)
|
||||
/// Proof: FellowshipReferenda ReferendumInfoFor (max_values: None, max_size: Some(900), added: 3375, mode: MaxEncodedLen)
|
||||
/// Storage: FellowshipCollective VotingCleanup (r:1 w:0)
|
||||
/// Proof: FellowshipCollective VotingCleanup (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen)
|
||||
/// Storage: FellowshipCollective Voting (r:100 w:100)
|
||||
/// Proof: FellowshipCollective Voting (max_values: None, max_size: Some(65), added: 2540, mode: MaxEncodedLen)
|
||||
/// The range of component `n` is `[0, 100]`.
|
||||
fn cleanup_poll(n: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `434 + n * (50 ±0)`
|
||||
// Estimated: `4365 + n * (2540 ±0)`
|
||||
// Minimum execution time: 14_237_000 picoseconds.
|
||||
Weight::from_parts(16_304_970, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4365))
|
||||
// Standard Error: 2_460
|
||||
.saturating_add(Weight::from_parts(1_185_342, 0).saturating_mul(n.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
|
||||
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
|
||||
.saturating_add(Weight::from_parts(0, 2540).saturating_mul(n.into()))
|
||||
}
|
||||
}
|
||||
@@ -1,186 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Polkadot.
|
||||
|
||||
// Polkadot 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.
|
||||
|
||||
// Polkadot 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 Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pallet_recovery`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-06-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `runner-e8ezs4ez-project-163-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./target/production/polkadot
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=kusama-dev
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --no-storage-info
|
||||
// --no-median-slopes
|
||||
// --no-min-squares
|
||||
// --pallet=pallet_recovery
|
||||
// --extrinsic=*
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --header=./file_header.txt
|
||||
// --output=./runtime/kusama/src/weights/
|
||||
|
||||
#![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_recovery`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_recovery::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: Recovery Proxy (r:1 w:0)
|
||||
/// Proof: Recovery Proxy (max_values: None, max_size: Some(80), added: 2555, mode: MaxEncodedLen)
|
||||
fn as_recovered() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `182`
|
||||
// Estimated: `3545`
|
||||
// Minimum execution time: 9_088_000 picoseconds.
|
||||
Weight::from_parts(9_345_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3545))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
}
|
||||
/// Storage: Recovery Proxy (r:0 w:1)
|
||||
/// Proof: Recovery Proxy (max_values: None, max_size: Some(80), added: 2555, mode: MaxEncodedLen)
|
||||
fn set_recovered() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 8_810_000 picoseconds.
|
||||
Weight::from_parts(9_033_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: Recovery Recoverable (r:1 w:1)
|
||||
/// Proof: Recovery Recoverable (max_values: None, max_size: Some(351), added: 2826, mode: MaxEncodedLen)
|
||||
/// The range of component `n` is `[1, 9]`.
|
||||
fn create_recovery(n: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `76`
|
||||
// Estimated: `3816`
|
||||
// Minimum execution time: 25_748_000 picoseconds.
|
||||
Weight::from_parts(26_517_291, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3816))
|
||||
// Standard Error: 4_572
|
||||
.saturating_add(Weight::from_parts(103_064, 0).saturating_mul(n.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: Recovery Recoverable (r:1 w:0)
|
||||
/// Proof: Recovery Recoverable (max_values: None, max_size: Some(351), added: 2826, mode: MaxEncodedLen)
|
||||
/// Storage: Recovery ActiveRecoveries (r:1 w:1)
|
||||
/// Proof: Recovery ActiveRecoveries (max_values: None, max_size: Some(389), added: 2864, mode: MaxEncodedLen)
|
||||
fn initiate_recovery() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `173`
|
||||
// Estimated: `3854`
|
||||
// Minimum execution time: 28_593_000 picoseconds.
|
||||
Weight::from_parts(29_386_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3854))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: Recovery Recoverable (r:1 w:0)
|
||||
/// Proof: Recovery Recoverable (max_values: None, max_size: Some(351), added: 2826, mode: MaxEncodedLen)
|
||||
/// Storage: Recovery ActiveRecoveries (r:1 w:1)
|
||||
/// Proof: Recovery ActiveRecoveries (max_values: None, max_size: Some(389), added: 2864, mode: MaxEncodedLen)
|
||||
/// The range of component `n` is `[1, 9]`.
|
||||
fn vouch_recovery(n: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `261 + n * (64 ±0)`
|
||||
// Estimated: `3854`
|
||||
// Minimum execution time: 18_621_000 picoseconds.
|
||||
Weight::from_parts(19_241_387, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3854))
|
||||
// Standard Error: 5_538
|
||||
.saturating_add(Weight::from_parts(263_385, 0).saturating_mul(n.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: Recovery Recoverable (r:1 w:0)
|
||||
/// Proof: Recovery Recoverable (max_values: None, max_size: Some(351), added: 2826, mode: MaxEncodedLen)
|
||||
/// Storage: Recovery ActiveRecoveries (r:1 w:0)
|
||||
/// Proof: Recovery ActiveRecoveries (max_values: None, max_size: Some(389), added: 2864, mode: MaxEncodedLen)
|
||||
/// Storage: Recovery Proxy (r:1 w:1)
|
||||
/// Proof: Recovery Proxy (max_values: None, max_size: Some(80), added: 2555, mode: MaxEncodedLen)
|
||||
/// The range of component `n` is `[1, 9]`.
|
||||
fn claim_recovery(n: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `293 + n * (64 ±0)`
|
||||
// Estimated: `3854`
|
||||
// Minimum execution time: 22_870_000 picoseconds.
|
||||
Weight::from_parts(23_779_105, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3854))
|
||||
// Standard Error: 4_668
|
||||
.saturating_add(Weight::from_parts(149_312, 0).saturating_mul(n.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: Recovery ActiveRecoveries (r:1 w:1)
|
||||
/// Proof: Recovery ActiveRecoveries (max_values: None, max_size: Some(389), added: 2864, 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 `n` is `[1, 9]`.
|
||||
fn close_recovery(n: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `414 + n * (32 ±0)`
|
||||
// Estimated: `3854`
|
||||
// Minimum execution time: 34_111_000 picoseconds.
|
||||
Weight::from_parts(35_420_404, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3854))
|
||||
// Standard Error: 5_909
|
||||
.saturating_add(Weight::from_parts(46_955, 0).saturating_mul(n.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: Recovery ActiveRecoveries (r:1 w:0)
|
||||
/// Proof: Recovery ActiveRecoveries (max_values: None, max_size: Some(389), added: 2864, mode: MaxEncodedLen)
|
||||
/// Storage: Recovery Recoverable (r:1 w:1)
|
||||
/// Proof: Recovery Recoverable (max_values: None, max_size: Some(351), added: 2826, mode: MaxEncodedLen)
|
||||
/// The range of component `n` is `[1, 9]`.
|
||||
fn remove_recovery(n: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `170 + n * (32 ±0)`
|
||||
// Estimated: `3854`
|
||||
// Minimum execution time: 30_441_000 picoseconds.
|
||||
Weight::from_parts(31_553_945, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3854))
|
||||
// Standard Error: 7_463
|
||||
.saturating_add(Weight::from_parts(119_815, 0).saturating_mul(n.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: Recovery Proxy (r:1 w:1)
|
||||
/// Proof: Recovery Proxy (max_values: None, max_size: Some(80), added: 2555, mode: MaxEncodedLen)
|
||||
fn cancel_recovered() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `182`
|
||||
// Estimated: `3545`
|
||||
// Minimum execution time: 10_937_000 picoseconds.
|
||||
Weight::from_parts(11_333_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3545))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
}
|
||||
@@ -1,525 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Polkadot.
|
||||
|
||||
// Polkadot 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.
|
||||
|
||||
// Polkadot 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 Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pallet_referenda`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-06-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `runner-e8ezs4ez-project-163-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./target/production/polkadot
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=kusama-dev
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --no-storage-info
|
||||
// --no-median-slopes
|
||||
// --no-min-squares
|
||||
// --pallet=pallet_referenda
|
||||
// --extrinsic=*
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --header=./file_header.txt
|
||||
// --output=./runtime/kusama/src/weights/
|
||||
|
||||
#![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_referenda`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_referenda::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: FellowshipCollective Members (r:1 w:0)
|
||||
/// Proof: FellowshipCollective Members (max_values: None, max_size: Some(42), added: 2517, mode: MaxEncodedLen)
|
||||
/// Storage: FellowshipReferenda ReferendumCount (r:1 w:1)
|
||||
/// Proof: FellowshipReferenda ReferendumCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: Scheduler Agenda (r:1 w:1)
|
||||
/// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen)
|
||||
/// Storage: FellowshipReferenda ReferendumInfoFor (r:0 w:1)
|
||||
/// Proof: FellowshipReferenda ReferendumInfoFor (max_values: None, max_size: Some(900), added: 3375, mode: MaxEncodedLen)
|
||||
fn submit() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `327`
|
||||
// Estimated: `42428`
|
||||
// Minimum execution time: 28_969_000 picoseconds.
|
||||
Weight::from_parts(30_902_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 42428))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: FellowshipReferenda ReferendumInfoFor (r:1 w:1)
|
||||
/// Proof: FellowshipReferenda ReferendumInfoFor (max_values: None, max_size: Some(900), added: 3375, mode: MaxEncodedLen)
|
||||
/// Storage: Scheduler Agenda (r:2 w:2)
|
||||
/// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen)
|
||||
fn place_decision_deposit_preparing() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `404`
|
||||
// Estimated: `83866`
|
||||
// Minimum execution time: 53_500_000 picoseconds.
|
||||
Weight::from_parts(54_447_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 83866))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: FellowshipReferenda ReferendumInfoFor (r:1 w:1)
|
||||
/// Proof: FellowshipReferenda ReferendumInfoFor (max_values: None, max_size: Some(900), added: 3375, mode: MaxEncodedLen)
|
||||
/// Storage: FellowshipReferenda DecidingCount (r:1 w:0)
|
||||
/// Proof: FellowshipReferenda DecidingCount (max_values: None, max_size: Some(14), added: 2489, mode: MaxEncodedLen)
|
||||
/// Storage: FellowshipReferenda TrackQueue (r:1 w:1)
|
||||
/// Proof: FellowshipReferenda TrackQueue (max_values: None, max_size: Some(812), added: 3287, mode: MaxEncodedLen)
|
||||
/// Storage: Scheduler Agenda (r:1 w:1)
|
||||
/// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen)
|
||||
fn place_decision_deposit_queued() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `2042`
|
||||
// Estimated: `42428`
|
||||
// Minimum execution time: 114_321_000 picoseconds.
|
||||
Weight::from_parts(122_607_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 42428))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: FellowshipReferenda ReferendumInfoFor (r:1 w:1)
|
||||
/// Proof: FellowshipReferenda ReferendumInfoFor (max_values: None, max_size: Some(900), added: 3375, mode: MaxEncodedLen)
|
||||
/// Storage: FellowshipReferenda DecidingCount (r:1 w:0)
|
||||
/// Proof: FellowshipReferenda DecidingCount (max_values: None, max_size: Some(14), added: 2489, mode: MaxEncodedLen)
|
||||
/// Storage: FellowshipReferenda TrackQueue (r:1 w:1)
|
||||
/// Proof: FellowshipReferenda TrackQueue (max_values: None, max_size: Some(812), added: 3287, mode: MaxEncodedLen)
|
||||
/// Storage: Scheduler Agenda (r:1 w:1)
|
||||
/// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen)
|
||||
fn place_decision_deposit_not_queued() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `2083`
|
||||
// Estimated: `42428`
|
||||
// Minimum execution time: 113_476_000 picoseconds.
|
||||
Weight::from_parts(120_078_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 42428))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: FellowshipReferenda ReferendumInfoFor (r:1 w:1)
|
||||
/// Proof: FellowshipReferenda ReferendumInfoFor (max_values: None, max_size: Some(900), added: 3375, mode: MaxEncodedLen)
|
||||
/// Storage: FellowshipReferenda DecidingCount (r:1 w:1)
|
||||
/// Proof: FellowshipReferenda DecidingCount (max_values: None, max_size: Some(14), added: 2489, mode: MaxEncodedLen)
|
||||
/// Storage: FellowshipCollective MemberCount (r:1 w:0)
|
||||
/// Proof: FellowshipCollective MemberCount (max_values: None, max_size: Some(14), added: 2489, mode: MaxEncodedLen)
|
||||
/// Storage: Scheduler Agenda (r:2 w:2)
|
||||
/// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen)
|
||||
fn place_decision_deposit_passing() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `774`
|
||||
// Estimated: `83866`
|
||||
// Minimum execution time: 194_798_000 picoseconds.
|
||||
Weight::from_parts(208_378_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 83866))
|
||||
.saturating_add(T::DbWeight::get().reads(5))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
/// Storage: FellowshipReferenda ReferendumInfoFor (r:1 w:1)
|
||||
/// Proof: FellowshipReferenda ReferendumInfoFor (max_values: None, max_size: Some(900), added: 3375, mode: MaxEncodedLen)
|
||||
/// Storage: FellowshipReferenda DecidingCount (r:1 w:1)
|
||||
/// Proof: FellowshipReferenda DecidingCount (max_values: None, max_size: Some(14), added: 2489, mode: MaxEncodedLen)
|
||||
/// Storage: FellowshipCollective MemberCount (r:1 w:0)
|
||||
/// Proof: FellowshipCollective MemberCount (max_values: None, max_size: Some(14), added: 2489, mode: MaxEncodedLen)
|
||||
/// Storage: Scheduler Agenda (r:2 w:2)
|
||||
/// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen)
|
||||
fn place_decision_deposit_failing() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `639`
|
||||
// Estimated: `83866`
|
||||
// Minimum execution time: 69_502_000 picoseconds.
|
||||
Weight::from_parts(71_500_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 83866))
|
||||
.saturating_add(T::DbWeight::get().reads(5))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
/// Storage: FellowshipReferenda ReferendumInfoFor (r:1 w:1)
|
||||
/// Proof: FellowshipReferenda ReferendumInfoFor (max_values: None, max_size: Some(900), added: 3375, mode: MaxEncodedLen)
|
||||
fn refund_decision_deposit() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `317`
|
||||
// Estimated: `4365`
|
||||
// Minimum execution time: 30_561_000 picoseconds.
|
||||
Weight::from_parts(31_427_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4365))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: FellowshipReferenda ReferendumInfoFor (r:1 w:1)
|
||||
/// Proof: FellowshipReferenda ReferendumInfoFor (max_values: None, max_size: Some(900), added: 3375, mode: MaxEncodedLen)
|
||||
fn refund_submission_deposit() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `167`
|
||||
// Estimated: `4365`
|
||||
// Minimum execution time: 14_535_000 picoseconds.
|
||||
Weight::from_parts(14_999_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4365))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: FellowshipReferenda ReferendumInfoFor (r:1 w:1)
|
||||
/// Proof: FellowshipReferenda ReferendumInfoFor (max_values: None, max_size: Some(900), added: 3375, mode: MaxEncodedLen)
|
||||
/// Storage: Scheduler Agenda (r:2 w:2)
|
||||
/// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen)
|
||||
fn cancel() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `349`
|
||||
// Estimated: `83866`
|
||||
// Minimum execution time: 38_532_000 picoseconds.
|
||||
Weight::from_parts(39_361_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 83866))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: FellowshipReferenda ReferendumInfoFor (r:1 w:1)
|
||||
/// Proof: FellowshipReferenda ReferendumInfoFor (max_values: None, max_size: Some(900), added: 3375, mode: MaxEncodedLen)
|
||||
/// Storage: Scheduler Agenda (r:2 w:2)
|
||||
/// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen)
|
||||
/// Storage: FellowshipReferenda MetadataOf (r:1 w:0)
|
||||
/// Proof: FellowshipReferenda MetadataOf (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen)
|
||||
fn kill() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `450`
|
||||
// Estimated: `83866`
|
||||
// Minimum execution time: 78_956_000 picoseconds.
|
||||
Weight::from_parts(80_594_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 83866))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: FellowshipReferenda TrackQueue (r:1 w:0)
|
||||
/// Proof: FellowshipReferenda TrackQueue (max_values: None, max_size: Some(812), added: 3287, mode: MaxEncodedLen)
|
||||
/// Storage: FellowshipReferenda DecidingCount (r:1 w:1)
|
||||
/// Proof: FellowshipReferenda DecidingCount (max_values: None, max_size: Some(14), added: 2489, mode: MaxEncodedLen)
|
||||
fn one_fewer_deciding_queue_empty() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `140`
|
||||
// Estimated: `4277`
|
||||
// Minimum execution time: 9_450_000 picoseconds.
|
||||
Weight::from_parts(9_881_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4277))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: FellowshipReferenda TrackQueue (r:1 w:1)
|
||||
/// Proof: FellowshipReferenda TrackQueue (max_values: None, max_size: Some(812), added: 3287, mode: MaxEncodedLen)
|
||||
/// Storage: FellowshipReferenda ReferendumInfoFor (r:1 w:1)
|
||||
/// Proof: FellowshipReferenda ReferendumInfoFor (max_values: None, max_size: Some(900), added: 3375, mode: MaxEncodedLen)
|
||||
/// Storage: FellowshipCollective MemberCount (r:1 w:0)
|
||||
/// Proof: FellowshipCollective MemberCount (max_values: None, max_size: Some(14), added: 2489, mode: MaxEncodedLen)
|
||||
/// Storage: Scheduler Agenda (r:1 w:1)
|
||||
/// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen)
|
||||
fn one_fewer_deciding_failing() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `2376`
|
||||
// Estimated: `42428`
|
||||
// Minimum execution time: 98_126_000 picoseconds.
|
||||
Weight::from_parts(102_511_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 42428))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: FellowshipReferenda TrackQueue (r:1 w:1)
|
||||
/// Proof: FellowshipReferenda TrackQueue (max_values: None, max_size: Some(812), added: 3287, mode: MaxEncodedLen)
|
||||
/// Storage: FellowshipReferenda ReferendumInfoFor (r:1 w:1)
|
||||
/// Proof: FellowshipReferenda ReferendumInfoFor (max_values: None, max_size: Some(900), added: 3375, mode: MaxEncodedLen)
|
||||
/// Storage: FellowshipCollective MemberCount (r:1 w:0)
|
||||
/// Proof: FellowshipCollective MemberCount (max_values: None, max_size: Some(14), added: 2489, mode: MaxEncodedLen)
|
||||
/// Storage: Scheduler Agenda (r:1 w:1)
|
||||
/// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen)
|
||||
fn one_fewer_deciding_passing() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `2362`
|
||||
// Estimated: `42428`
|
||||
// Minimum execution time: 99_398_000 picoseconds.
|
||||
Weight::from_parts(104_045_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 42428))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: FellowshipReferenda ReferendumInfoFor (r:1 w:0)
|
||||
/// Proof: FellowshipReferenda ReferendumInfoFor (max_values: None, max_size: Some(900), added: 3375, mode: MaxEncodedLen)
|
||||
/// Storage: FellowshipReferenda TrackQueue (r:1 w:1)
|
||||
/// Proof: FellowshipReferenda TrackQueue (max_values: None, max_size: Some(812), added: 3287, mode: MaxEncodedLen)
|
||||
fn nudge_referendum_requeued_insertion() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `1807`
|
||||
// Estimated: `4365`
|
||||
// Minimum execution time: 43_734_000 picoseconds.
|
||||
Weight::from_parts(46_962_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4365))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: FellowshipReferenda ReferendumInfoFor (r:1 w:0)
|
||||
/// Proof: FellowshipReferenda ReferendumInfoFor (max_values: None, max_size: Some(900), added: 3375, mode: MaxEncodedLen)
|
||||
/// Storage: FellowshipReferenda TrackQueue (r:1 w:1)
|
||||
/// Proof: FellowshipReferenda TrackQueue (max_values: None, max_size: Some(812), added: 3287, mode: MaxEncodedLen)
|
||||
fn nudge_referendum_requeued_slide() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `1774`
|
||||
// Estimated: `4365`
|
||||
// Minimum execution time: 42_863_000 picoseconds.
|
||||
Weight::from_parts(46_241_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4365))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: FellowshipReferenda ReferendumInfoFor (r:1 w:1)
|
||||
/// Proof: FellowshipReferenda ReferendumInfoFor (max_values: None, max_size: Some(900), added: 3375, mode: MaxEncodedLen)
|
||||
/// Storage: FellowshipReferenda DecidingCount (r:1 w:0)
|
||||
/// Proof: FellowshipReferenda DecidingCount (max_values: None, max_size: Some(14), added: 2489, mode: MaxEncodedLen)
|
||||
/// Storage: FellowshipReferenda TrackQueue (r:1 w:1)
|
||||
/// Proof: FellowshipReferenda TrackQueue (max_values: None, max_size: Some(812), added: 3287, mode: MaxEncodedLen)
|
||||
fn nudge_referendum_queued() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `1790`
|
||||
// Estimated: `4365`
|
||||
// Minimum execution time: 57_511_000 picoseconds.
|
||||
Weight::from_parts(64_027_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4365))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: FellowshipReferenda ReferendumInfoFor (r:1 w:1)
|
||||
/// Proof: FellowshipReferenda ReferendumInfoFor (max_values: None, max_size: Some(900), added: 3375, mode: MaxEncodedLen)
|
||||
/// Storage: FellowshipReferenda DecidingCount (r:1 w:0)
|
||||
/// Proof: FellowshipReferenda DecidingCount (max_values: None, max_size: Some(14), added: 2489, mode: MaxEncodedLen)
|
||||
/// Storage: FellowshipReferenda TrackQueue (r:1 w:1)
|
||||
/// Proof: FellowshipReferenda TrackQueue (max_values: None, max_size: Some(812), added: 3287, mode: MaxEncodedLen)
|
||||
fn nudge_referendum_not_queued() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `1831`
|
||||
// Estimated: `4365`
|
||||
// Minimum execution time: 56_726_000 picoseconds.
|
||||
Weight::from_parts(61_962_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4365))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: FellowshipReferenda ReferendumInfoFor (r:1 w:1)
|
||||
/// Proof: FellowshipReferenda ReferendumInfoFor (max_values: None, max_size: Some(900), added: 3375, mode: MaxEncodedLen)
|
||||
/// Storage: Scheduler Agenda (r:1 w:1)
|
||||
/// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen)
|
||||
fn nudge_referendum_no_deposit() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `301`
|
||||
// Estimated: `42428`
|
||||
// Minimum execution time: 24_870_000 picoseconds.
|
||||
Weight::from_parts(25_837_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 42428))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: FellowshipReferenda ReferendumInfoFor (r:1 w:1)
|
||||
/// Proof: FellowshipReferenda ReferendumInfoFor (max_values: None, max_size: Some(900), added: 3375, mode: MaxEncodedLen)
|
||||
/// Storage: Scheduler Agenda (r:1 w:1)
|
||||
/// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen)
|
||||
fn nudge_referendum_preparing() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `349`
|
||||
// Estimated: `42428`
|
||||
// Minimum execution time: 25_297_000 picoseconds.
|
||||
Weight::from_parts(26_086_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 42428))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: FellowshipReferenda ReferendumInfoFor (r:1 w:1)
|
||||
/// Proof: FellowshipReferenda ReferendumInfoFor (max_values: None, max_size: Some(900), added: 3375, mode: MaxEncodedLen)
|
||||
fn nudge_referendum_timed_out() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `208`
|
||||
// Estimated: `4365`
|
||||
// Minimum execution time: 16_776_000 picoseconds.
|
||||
Weight::from_parts(17_396_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4365))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: FellowshipReferenda ReferendumInfoFor (r:1 w:1)
|
||||
/// Proof: FellowshipReferenda ReferendumInfoFor (max_values: None, max_size: Some(900), added: 3375, mode: MaxEncodedLen)
|
||||
/// Storage: FellowshipReferenda DecidingCount (r:1 w:1)
|
||||
/// Proof: FellowshipReferenda DecidingCount (max_values: None, max_size: Some(14), added: 2489, mode: MaxEncodedLen)
|
||||
/// Storage: FellowshipCollective MemberCount (r:1 w:0)
|
||||
/// Proof: FellowshipCollective MemberCount (max_values: None, max_size: Some(14), added: 2489, mode: MaxEncodedLen)
|
||||
/// Storage: Scheduler Agenda (r:1 w:1)
|
||||
/// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen)
|
||||
fn nudge_referendum_begin_deciding_failing() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `584`
|
||||
// Estimated: `42428`
|
||||
// Minimum execution time: 37_780_000 picoseconds.
|
||||
Weight::from_parts(38_626_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 42428))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: FellowshipReferenda ReferendumInfoFor (r:1 w:1)
|
||||
/// Proof: FellowshipReferenda ReferendumInfoFor (max_values: None, max_size: Some(900), added: 3375, mode: MaxEncodedLen)
|
||||
/// Storage: FellowshipReferenda DecidingCount (r:1 w:1)
|
||||
/// Proof: FellowshipReferenda DecidingCount (max_values: None, max_size: Some(14), added: 2489, mode: MaxEncodedLen)
|
||||
/// Storage: FellowshipCollective MemberCount (r:1 w:0)
|
||||
/// Proof: FellowshipCollective MemberCount (max_values: None, max_size: Some(14), added: 2489, mode: MaxEncodedLen)
|
||||
/// Storage: Scheduler Agenda (r:1 w:1)
|
||||
/// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen)
|
||||
fn nudge_referendum_begin_deciding_passing() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `719`
|
||||
// Estimated: `42428`
|
||||
// Minimum execution time: 85_265_000 picoseconds.
|
||||
Weight::from_parts(89_986_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 42428))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: FellowshipReferenda ReferendumInfoFor (r:1 w:1)
|
||||
/// Proof: FellowshipReferenda ReferendumInfoFor (max_values: None, max_size: Some(900), added: 3375, mode: MaxEncodedLen)
|
||||
/// Storage: FellowshipCollective MemberCount (r:1 w:0)
|
||||
/// Proof: FellowshipCollective MemberCount (max_values: None, max_size: Some(14), added: 2489, mode: MaxEncodedLen)
|
||||
/// Storage: Scheduler Agenda (r:1 w:1)
|
||||
/// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen)
|
||||
fn nudge_referendum_begin_confirming() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `770`
|
||||
// Estimated: `42428`
|
||||
// Minimum execution time: 143_283_000 picoseconds.
|
||||
Weight::from_parts(158_540_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 42428))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: FellowshipReferenda ReferendumInfoFor (r:1 w:1)
|
||||
/// Proof: FellowshipReferenda ReferendumInfoFor (max_values: None, max_size: Some(900), added: 3375, mode: MaxEncodedLen)
|
||||
/// Storage: FellowshipCollective MemberCount (r:1 w:0)
|
||||
/// Proof: FellowshipCollective MemberCount (max_values: None, max_size: Some(14), added: 2489, mode: MaxEncodedLen)
|
||||
/// Storage: Scheduler Agenda (r:1 w:1)
|
||||
/// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen)
|
||||
fn nudge_referendum_end_confirming() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `755`
|
||||
// Estimated: `42428`
|
||||
// Minimum execution time: 143_736_000 picoseconds.
|
||||
Weight::from_parts(162_755_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 42428))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: FellowshipReferenda ReferendumInfoFor (r:1 w:1)
|
||||
/// Proof: FellowshipReferenda ReferendumInfoFor (max_values: None, max_size: Some(900), added: 3375, mode: MaxEncodedLen)
|
||||
/// Storage: FellowshipCollective MemberCount (r:1 w:0)
|
||||
/// Proof: FellowshipCollective MemberCount (max_values: None, max_size: Some(14), added: 2489, mode: MaxEncodedLen)
|
||||
/// Storage: Scheduler Agenda (r:1 w:1)
|
||||
/// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen)
|
||||
fn nudge_referendum_continue_not_confirming() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `770`
|
||||
// Estimated: `42428`
|
||||
// Minimum execution time: 139_021_000 picoseconds.
|
||||
Weight::from_parts(157_398_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 42428))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: FellowshipReferenda ReferendumInfoFor (r:1 w:1)
|
||||
/// Proof: FellowshipReferenda ReferendumInfoFor (max_values: None, max_size: Some(900), added: 3375, mode: MaxEncodedLen)
|
||||
/// Storage: FellowshipCollective MemberCount (r:1 w:0)
|
||||
/// Proof: FellowshipCollective MemberCount (max_values: None, max_size: Some(14), added: 2489, mode: MaxEncodedLen)
|
||||
/// Storage: Scheduler Agenda (r:1 w:1)
|
||||
/// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen)
|
||||
fn nudge_referendum_continue_confirming() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `776`
|
||||
// Estimated: `42428`
|
||||
// Minimum execution time: 78_530_000 picoseconds.
|
||||
Weight::from_parts(83_556_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 42428))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: FellowshipReferenda ReferendumInfoFor (r:1 w:1)
|
||||
/// Proof: FellowshipReferenda ReferendumInfoFor (max_values: None, max_size: Some(900), added: 3375, mode: MaxEncodedLen)
|
||||
/// Storage: FellowshipCollective MemberCount (r:1 w:0)
|
||||
/// Proof: FellowshipCollective MemberCount (max_values: None, max_size: Some(14), added: 2489, mode: MaxEncodedLen)
|
||||
/// Storage: Scheduler Agenda (r:2 w:2)
|
||||
/// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen)
|
||||
/// Storage: Scheduler Lookup (r:1 w:1)
|
||||
/// Proof: Scheduler Lookup (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen)
|
||||
fn nudge_referendum_approved() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `776`
|
||||
// Estimated: `83866`
|
||||
// Minimum execution time: 174_165_000 picoseconds.
|
||||
Weight::from_parts(188_496_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 83866))
|
||||
.saturating_add(T::DbWeight::get().reads(5))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
/// Storage: FellowshipReferenda ReferendumInfoFor (r:1 w:1)
|
||||
/// Proof: FellowshipReferenda ReferendumInfoFor (max_values: None, max_size: Some(900), added: 3375, mode: MaxEncodedLen)
|
||||
/// Storage: FellowshipCollective MemberCount (r:1 w:0)
|
||||
/// Proof: FellowshipCollective MemberCount (max_values: None, max_size: Some(14), added: 2489, mode: MaxEncodedLen)
|
||||
/// Storage: Scheduler Agenda (r:1 w:1)
|
||||
/// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen)
|
||||
fn nudge_referendum_rejected() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `772`
|
||||
// Estimated: `42428`
|
||||
// Minimum execution time: 142_964_000 picoseconds.
|
||||
Weight::from_parts(157_257_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 42428))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: FellowshipReferenda ReferendumInfoFor (r:1 w:0)
|
||||
/// Proof: FellowshipReferenda ReferendumInfoFor (max_values: None, max_size: Some(900), added: 3375, mode: MaxEncodedLen)
|
||||
/// Storage: Preimage StatusFor (r:1 w:0)
|
||||
/// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen)
|
||||
/// Storage: FellowshipReferenda MetadataOf (r:0 w:1)
|
||||
/// Proof: FellowshipReferenda MetadataOf (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen)
|
||||
fn set_some_metadata() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `352`
|
||||
// Estimated: `4365`
|
||||
// Minimum execution time: 20_126_000 picoseconds.
|
||||
Weight::from_parts(20_635_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4365))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: FellowshipReferenda ReferendumInfoFor (r:1 w:0)
|
||||
/// Proof: FellowshipReferenda ReferendumInfoFor (max_values: None, max_size: Some(900), added: 3375, mode: MaxEncodedLen)
|
||||
/// Storage: FellowshipReferenda MetadataOf (r:1 w:1)
|
||||
/// Proof: FellowshipReferenda MetadataOf (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen)
|
||||
fn clear_metadata() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `285`
|
||||
// Estimated: `4365`
|
||||
// Minimum execution time: 17_716_000 picoseconds.
|
||||
Weight::from_parts(18_324_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4365))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user