diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index e0333d9d7..1ddd85de8 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -1,9 +1,10 @@ name: Integration Tests on: + workflow_dispatch: push: tags: - - '^v[0-9]+.[0-9]+.[0-9]+(-rc[0-9]+)?$' + - "^v[0-9]+.[0-9]+.[0-9]+(-rc[0-9]+)?$" env: CARGO_TERM_COLOR: always @@ -21,29 +22,29 @@ jobs: - name: Build Parachain run: cargo build --release --features parachain - + - name: Save runtime wasm run: | - mkdir -p runtimes - cp target/release/wbuild/battery-station-runtime/battery_station_runtime.compact.compressed.wasm runtimes/; - cp target/release/wbuild/zeitgeist-runtime/zeitgeist_runtime.compact.compressed.wasm runtimes/; + mkdir -p runtimes + cp target/release/wbuild/battery-station-runtime/battery_station_runtime.compact.compressed.wasm runtimes/; + cp target/release/wbuild/zeitgeist-runtime/zeitgeist_runtime.compact.compressed.wasm runtimes/; - name: Upload runtimes uses: actions/upload-artifact@v3.1.2 with: - name: runtimes - path: runtimes + name: runtimes + path: runtimes - name: Save zeitgeist binary run: | - mkdir -p binaries - cp target/release/zeitgeist binaries/; + mkdir -p binaries + cp target/release/zeitgeist binaries/; - name: Upload binary uses: actions/upload-artifact@v3.1.2 with: - name: binaries - path: binaries + name: binaries + path: binaries zombienet_zndsl: name: ZNDSL Tests @@ -64,7 +65,7 @@ jobs: node-version: 20.x cache: "pnpm" cache-dependency-path: "./integration-tests/pnpm-lock.yaml" - + - name: Install pnpm packages run: | cd integration-tests @@ -87,9 +88,9 @@ jobs: - name: Download binary uses: actions/download-artifact@v3.0.2 with: - name: binaries - path: target/release - + name: binaries + path: target/release + - name: Display structure of downloaded files run: ls -R working-directory: target/ @@ -121,7 +122,7 @@ jobs: node-version: 20.x cache: "pnpm" cache-dependency-path: "./integration-tests/pnpm-lock.yaml" - + - name: Install pnpm packages run: | cd integration-tests @@ -144,8 +145,8 @@ jobs: - name: Download binary uses: actions/download-artifact@v3.0.2 with: - name: binaries - path: target/release + name: binaries + path: target/release - name: Display structure of downloaded files run: ls -R @@ -154,7 +155,7 @@ jobs: - name: Test zeitgeist runtime upgrade using Zombienet run: | chmod uog+x target/release/zeitgeist - + cd integration-tests pnpm exec moonwall test zombienet_zeitgeist_upgrade @@ -177,7 +178,7 @@ jobs: node-version: 20.x cache: "pnpm" cache-dependency-path: "./integration-tests/pnpm-lock.yaml" - + - name: Install pnpm packages run: | cd integration-tests diff --git a/.mergify.yml b/.mergify.yml index 07c49ea76..47970315d 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -1,6 +1,7 @@ pull_request_rules: - - name: Auto merge + - name: Auto merge (main) conditions: + - base=main - "#approved-reviews-by>=1" - "#changes-requested-reviews-by=0" - check-success=Coverage @@ -21,6 +22,28 @@ pull_request_rules: - s:review-needed queue: merge_method: squash + - name: Auto merge (feature branch) + conditions: + - base!=main + - "#approved-reviews-by>=1" + - "#changes-requested-reviews-by=0" + - check-success=Coverage + - check-success=Format + - check-success=Checks (clippy) + - check-success=Checks (parachain) + - check-success=Checks (standalone) + - check-success=Quick check benchmarks + - check-success=Test standalone build + - check-success=Test parachain build + - check-success=Fuzz + - label=s:accepted + actions: + label: + remove: + - s:in-progress + - s:review-needed + queue: + merge_method: squash - name: ask to resolve conflict conditions: - conflict diff --git a/Cargo.lock b/Cargo.lock index 4da9d366e..e23313b33 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -532,7 +532,7 @@ checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" [[package]] name = "battery-station-runtime" -version = "0.5.0" +version = "0.5.1" dependencies = [ "cfg-if", "common-runtime", @@ -1208,7 +1208,7 @@ dependencies = [ [[package]] name = "common-runtime" -version = "0.5.0" +version = "0.5.1" dependencies = [ "cfg-if", "cumulus-pallet-xcmp-queue", @@ -14288,11 +14288,11 @@ dependencies = [ [[package]] name = "zeitgeist-macros" -version = "0.5.0" +version = "0.5.1" [[package]] name = "zeitgeist-node" -version = "0.5.0" +version = "0.5.1" dependencies = [ "battery-station-runtime", "cfg-if", @@ -14384,7 +14384,7 @@ dependencies = [ [[package]] name = "zeitgeist-primitives" -version = "0.5.0" +version = "0.5.1" dependencies = [ "arbitrary", "fixed", @@ -14408,7 +14408,7 @@ dependencies = [ [[package]] name = "zeitgeist-runtime" -version = "0.5.0" +version = "0.5.1" dependencies = [ "cfg-if", "common-runtime", @@ -14554,7 +14554,7 @@ dependencies = [ [[package]] name = "zrml-authorized" -version = "0.5.0" +version = "0.5.1" dependencies = [ "env_logger 0.10.1", "frame-benchmarking", @@ -14572,7 +14572,7 @@ dependencies = [ [[package]] name = "zrml-court" -version = "0.5.0" +version = "0.5.1" dependencies = [ "arrayvec 0.7.4", "env_logger 0.10.1", @@ -14598,7 +14598,7 @@ dependencies = [ [[package]] name = "zrml-global-disputes" -version = "0.5.0" +version = "0.5.1" dependencies = [ "env_logger 0.10.1", "frame-benchmarking", @@ -14619,7 +14619,7 @@ dependencies = [ [[package]] name = "zrml-liquidity-mining" -version = "0.5.0" +version = "0.5.1" dependencies = [ "env_logger 0.10.1", "frame-benchmarking", @@ -14638,7 +14638,7 @@ dependencies = [ [[package]] name = "zrml-market-commons" -version = "0.5.0" +version = "0.5.1" dependencies = [ "env_logger 0.10.1", "frame-support", @@ -14656,7 +14656,7 @@ dependencies = [ [[package]] name = "zrml-neo-swaps" -version = "0.5.0" +version = "0.5.1" dependencies = [ "cfg-if", "env_logger 0.10.1", @@ -14701,7 +14701,7 @@ dependencies = [ [[package]] name = "zrml-orderbook" -version = "0.5.0" +version = "0.5.1" dependencies = [ "env_logger 0.10.1", "frame-benchmarking", @@ -14739,7 +14739,7 @@ dependencies = [ [[package]] name = "zrml-parimutuel" -version = "0.5.0" +version = "0.5.1" dependencies = [ "env_logger 0.10.1", "frame-benchmarking", @@ -14764,7 +14764,7 @@ dependencies = [ [[package]] name = "zrml-prediction-markets" -version = "0.5.0" +version = "0.5.1" dependencies = [ "env_logger 0.10.1", "frame-benchmarking", @@ -14816,7 +14816,7 @@ dependencies = [ [[package]] name = "zrml-prediction-markets-runtime-api" -version = "0.5.0" +version = "0.5.1" dependencies = [ "parity-scale-codec", "sp-api", @@ -14825,7 +14825,7 @@ dependencies = [ [[package]] name = "zrml-rikiddo" -version = "0.5.0" +version = "0.5.1" dependencies = [ "arbitrary", "cfg-if", @@ -14859,7 +14859,7 @@ dependencies = [ [[package]] name = "zrml-simple-disputes" -version = "0.5.0" +version = "0.5.1" dependencies = [ "env_logger 0.10.1", "frame-benchmarking", @@ -14880,7 +14880,7 @@ dependencies = [ [[package]] name = "zrml-styx" -version = "0.5.0" +version = "0.5.1" dependencies = [ "env_logger 0.10.1", "frame-benchmarking", @@ -14897,7 +14897,7 @@ dependencies = [ [[package]] name = "zrml-swaps" -version = "0.5.0" +version = "0.5.1" dependencies = [ "env_logger 0.10.1", "frame-benchmarking", @@ -14940,7 +14940,7 @@ dependencies = [ [[package]] name = "zrml-swaps-rpc" -version = "0.5.0" +version = "0.5.1" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -14953,7 +14953,7 @@ dependencies = [ [[package]] name = "zrml-swaps-runtime-api" -version = "0.5.0" +version = "0.5.1" dependencies = [ "parity-scale-codec", "sp-api", diff --git a/docs/changelog_for_devs.md b/docs/changelog_for_devs.md index 7828f07d9..0bb6410a5 100644 --- a/docs/changelog_for_devs.md +++ b/docs/changelog_for_devs.md @@ -14,13 +14,13 @@ APIs/RPC interface. ## v0.5.1 -[#1197]: https://github.com/zeitgeistpm/zeitgeist/pull/1197 +[#1295]: https://github.com/zeitgeistpm/zeitgeist/pull/1295 [pallet-asset]: https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame/assets ### Added -- [#1197] New asset classes: +- [#1295] New asset classes: - `CampaignAssetClass` - Can be registered by gov and council and be used in markets and to pay transaction fees. - `CustomAssetClass` - Allows any user to register their custom assets (can't @@ -42,11 +42,11 @@ APIs/RPC interface. scale codec representation into the `Assets` type. - `Assets` provides `TryInto` into all other asset classes, which fails if the asset type is not existent in the asset class. -- [#1197] Added [pallet-asset], which is a Substrate pallet that provides fine +- [#1295] Added [pallet-asset], which is a Substrate pallet that provides fine grained control over asset creation, destruction, management (mint, burn, freeze, admin account) and much more. It is used for `CampaignAssetClass`, `CustomAssetClass` and `MarketAssetClass`. -- [#1197] Added zrml-asset-router (AssetRouter). This pallet is an abstraction +- [#1295] Added zrml-asset-router (AssetRouter). This pallet is an abstraction layer over multiple pallets (like orml-tokens and pallet-assets) that handles routing calls, managing asset destruction and the lazy migrating market assets from `CurrencyClass` to `MarketAssetClass`. It does not have any dispatchable @@ -56,11 +56,11 @@ APIs/RPC interface. chain via transactions and can be used when developing pallets. In the latter case, some functionalities can only be used when directly interacting with zrml-asset-router. -- [#1197] Campaign assets have to be created and destroyed by gov or the +- [#1295] Campaign assets have to be created and destroyed by gov or the council. Custom assets have to be created and destroyed via transactions. Market assets are automatically created and destroyed. In all non automatic cases, destroying is achieved by calling `start_destroy`. -- [#1197] Transaction fee payment is now possible with campaign assets. The fee +- [#1295] Transaction fee payment is now possible with campaign assets. The fee is calculated as follows (with `CampaignAssetFeeMultiplier = 100`): ```rust @@ -73,22 +73,22 @@ if ztg_supply / campaign_asset_supply >= 100 { ### Changed -- [#1197] `Assets` does not contain the `CombinatorialOutcome` asset type +- [#1295] `Assets` does not contain the `CombinatorialOutcome` asset type anymore, but has been extended by all existing asset types. -- [#1197] The transaction fee asset type has been changed from `u32` to +- [#1295] The transaction fee asset type has been changed from `u32` to `Assets`. -- [#1197] The prediction market base asset type has been changed in the `Market` +- [#1295] The prediction market base asset type has been changed in the `Market` storage and market creation dispatchable calls to `BaseAssetClass`. -- [#1197] The asset type for XCM has been changed to `XcmAssetClass`. It is used +- [#1295] The asset type for XCM has been changed to `XcmAssetClass`. It is used in `orml-xtokens` (XTokens) and `orml-asset-registry` (AssetRegistry). ### Removed -- [#1197] `SerdeWrapper` has been removed. +- [#1295] `SerdeWrapper` has been removed. ### Deprecated -- [#1197] Market outcome asset types are no longer handled by `orml-tokens` +- [#1295] Market outcome asset types are no longer handled by `orml-tokens` (Tokens), except for existing markets which still used market asset types within `CurrencyClass`. `pallet-assets` (MarketAssets) now handles market outcome asset types from the `MarketAssetClass`. diff --git a/macros/Cargo.toml b/macros/Cargo.toml index 1f4e6ea2a..182e81a82 100644 --- a/macros/Cargo.toml +++ b/macros/Cargo.toml @@ -2,4 +2,4 @@ authors = ["Zeitgeist PM "] edition = "2021" name = "zeitgeist-macros" -version = "0.5.0" +version = "0.5.1" diff --git a/node/Cargo.toml b/node/Cargo.toml index 37f29b324..3d92deb89 100644 --- a/node/Cargo.toml +++ b/node/Cargo.toml @@ -187,7 +187,7 @@ description = "An evolving blockchain for prediction markets and futarchy." edition = "2021" homepage = "https://zeitgeist.pm" name = "zeitgeist-node" -version = "0.5.0" +version = "0.5.1" [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] diff --git a/primitives/Cargo.toml b/primitives/Cargo.toml index 07ded556b..d83bed594 100644 --- a/primitives/Cargo.toml +++ b/primitives/Cargo.toml @@ -40,4 +40,4 @@ std = [ authors = ["Zeitgeist PM "] edition = "2021" name = "zeitgeist-primitives" -version = "0.5.0" +version = "0.5.1" diff --git a/runtime/battery-station/Cargo.toml b/runtime/battery-station/Cargo.toml index bdb4d7d0d..42eb39ce2 100644 --- a/runtime/battery-station/Cargo.toml +++ b/runtime/battery-station/Cargo.toml @@ -426,7 +426,7 @@ force-debug = ["sp-debug-derive/force-debug"] authors = ["Zeitgeist PM "] edition = "2021" name = "battery-station-runtime" -version = "0.5.0" +version = "0.5.1" [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] diff --git a/runtime/battery-station/src/lib.rs b/runtime/battery-station/src/lib.rs index 34c2c6b8f..413fa5c31 100644 --- a/runtime/battery-station/src/lib.rs +++ b/runtime/battery-station/src/lib.rs @@ -105,10 +105,10 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("zeitgeist"), impl_name: create_runtime_str!("zeitgeist"), authoring_version: 1, - spec_version: 53, + spec_version: 54, impl_version: 1, apis: RUNTIME_API_VERSIONS, - transaction_version: 27, + transaction_version: 28, state_version: 1, }; diff --git a/runtime/common/Cargo.toml b/runtime/common/Cargo.toml index c4e210c2a..50e0bd76c 100644 --- a/runtime/common/Cargo.toml +++ b/runtime/common/Cargo.toml @@ -82,7 +82,7 @@ std = [ authors = ["Zeitgeist PM "] edition = "2021" name = "common-runtime" -version = "0.5.0" +version = "0.5.1" [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] diff --git a/runtime/common/src/lib.rs b/runtime/common/src/lib.rs index 74ab5c6a2..c1be41e6c 100644 --- a/runtime/common/src/lib.rs +++ b/runtime/common/src/lib.rs @@ -56,12 +56,13 @@ macro_rules! decl_common_types { use sp_runtime::{generic, DispatchError, DispatchResult, SaturatedConversion}; use zeitgeist_primitives::traits::{DeployPoolApi, DistributeFees, MarketCommonsPalletApi}; use zrml_market_commons::migrations::AddIdToMarket; + use zrml_neo_swaps::migration::MigratePoolReservesToBoundedBTreeMap; pub type Block = generic::Block; type Address = sp_runtime::MultiAddress; - type Migrations = (AddIdToMarket); + type Migrations = (AddIdToMarket, MigratePoolReservesToBoundedBTreeMap); pub type Executive = frame_executive::Executive< Runtime, @@ -173,12 +174,6 @@ macro_rules! decl_common_types { EnsureProportionAtLeast, >; - // At least 100% - type EnsureRootOrAllAdvisoryCommittee = EitherOfDiverse< - EnsureRoot, - EnsureProportionAtLeast, - >; - #[cfg(feature = "std")] /// The version information used to identify this runtime when compiled natively. pub fn native_version() -> NativeVersion { @@ -1275,7 +1270,6 @@ macro_rules! impl_config_traits { type CloseEarlyProtectionTimeFramePeriod = CloseEarlyProtectionTimeFramePeriod; type CloseEarlyProtectionBlockPeriod = CloseEarlyProtectionBlockPeriod; type CloseEarlyRequestBond = CloseEarlyRequestBond; - type DestroyOrigin = EnsureRootOrAllAdvisoryCommittee; type DeployPool = NeoSwaps; type DisputeBond = DisputeBond; type RuntimeEvent = RuntimeEvent; diff --git a/runtime/common/src/weights/cumulus_pallet_xcmp_queue.rs b/runtime/common/src/weights/cumulus_pallet_xcmp_queue.rs index 4d12a9a14..50eac1fe0 100644 --- a/runtime/common/src/weights/cumulus_pallet_xcmp_queue.rs +++ b/runtime/common/src/weights/cumulus_pallet_xcmp_queue.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for cumulus_pallet_xcmp_queue //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: `2024-01-15`, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: `2024-04-03`, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `zeitgeist-benchmark`, CPU: `AMD EPYC 7601 32-Core Processor` //! EXECUTION: `Some(Wasm)`, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024` @@ -56,10 +56,10 @@ impl cumulus_pallet_xcmp_queue::weights::WeightInfo for /// Proof Skipped: XcmpQueue QueueConfig (max_values: Some(1), max_size: None, mode: Measured) fn set_config_with_u32() -> Weight { // Proof Size summary in bytes: - // Measured: `142` - // Estimated: `637` - // Minimum execution time: 9_070 nanoseconds. - Weight::from_parts(11_070_000, 637) + // Measured: `175` + // Estimated: `670` + // Minimum execution time: 10_090 nanoseconds. + Weight::from_parts(11_060_000, 670) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -67,10 +67,10 @@ impl cumulus_pallet_xcmp_queue::weights::WeightInfo for /// Proof Skipped: XcmpQueue QueueConfig (max_values: Some(1), max_size: None, mode: Measured) fn set_config_with_weight() -> Weight { // Proof Size summary in bytes: - // Measured: `142` - // Estimated: `637` - // Minimum execution time: 9_260 nanoseconds. - Weight::from_parts(10_780_000, 637) + // Measured: `175` + // Estimated: `670` + // Minimum execution time: 10_390 nanoseconds. + Weight::from_parts(10_900_000, 670) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/runtime/common/src/weights/frame_system.rs b/runtime/common/src/weights/frame_system.rs index 0725f4c1d..9b09860c8 100644 --- a/runtime/common/src/weights/frame_system.rs +++ b/runtime/common/src/weights/frame_system.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for frame_system //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: `2024-01-14`, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: `2024-04-02`, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `zeitgeist-benchmark`, CPU: `AMD EPYC 7601 32-Core Processor` //! EXECUTION: `Some(Wasm)`, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024` @@ -57,20 +57,20 @@ impl frame_system::weights::WeightInfo for WeightInfo Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 11_840 nanoseconds. - Weight::from_parts(12_040_000, 0) + // Minimum execution time: 12_770 nanoseconds. + Weight::from_parts(14_950_000, 0) // Standard Error: 3 - .saturating_add(Weight::from_parts(2_456, 0).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(2_540, 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) @@ -80,8 +80,8 @@ impl frame_system::weights::WeightInfo for WeightInfo frame_system::weights::WeightInfo for WeightInfo frame_system::weights::WeightInfo for WeightInfo frame_system::weights::WeightInfo for WeightInfo Weight { // Proof Size summary in bytes: - // Measured: `48 + p * (69 ±0)` - // Estimated: `52 + p * (70 ±0)` - // Minimum execution time: 6_210 nanoseconds. - Weight::from_parts(6_620_000, 52) - // Standard Error: 6_837 - .saturating_add(Weight::from_parts(2_035_938, 0).saturating_mul(p.into())) + // Measured: `46 + p * (69 ±0)` + // Estimated: `51 + p * (70 ±0)` + // Minimum execution time: 6_760 nanoseconds. + Weight::from_parts(7_030_000, 51) + // Standard Error: 7_622 + .saturating_add(Weight::from_parts(2_150_330, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) .saturating_add(Weight::from_parts(0, 70).saturating_mul(p.into())) } diff --git a/runtime/common/src/weights/orml_currencies.rs b/runtime/common/src/weights/orml_currencies.rs index b01fadaf2..23a0524c8 100644 --- a/runtime/common/src/weights/orml_currencies.rs +++ b/runtime/common/src/weights/orml_currencies.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for orml_currencies //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: `2024-01-15`, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: `2024-04-02`, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `zeitgeist-benchmark`, CPU: `AMD EPYC 7601 32-Core Processor` //! EXECUTION: `Some(Wasm)`, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024` @@ -49,17 +49,19 @@ use frame_support::{traits::Get, weights::Weight}; /// Weight functions for orml_currencies (automatically generated) pub struct WeightInfo(PhantomData); impl orml_currencies::WeightInfo for WeightInfo { + /// Storage: MarketAssets Asset (r:1 w:0) + /// Proof: MarketAssets Asset (max_values: None, max_size: Some(225), added: 2700, mode: MaxEncodedLen) /// Storage: Tokens Accounts (r:2 w:2) /// Proof: Tokens Accounts (max_values: None, max_size: Some(123), added: 2598, mode: MaxEncodedLen) /// Storage: System Account (r:1 w:1) /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) fn transfer_non_native_currency() -> Weight { // Proof Size summary in bytes: - // Measured: `1753` - // Estimated: `7803` - // Minimum execution time: 71_681 nanoseconds. - Weight::from_parts(73_901_000, 7803) - .saturating_add(T::DbWeight::get().reads(3)) + // Measured: `1862` + // Estimated: `10503` + // Minimum execution time: 88_670 nanoseconds. + Weight::from_parts(106_441_000, 10503) + .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } /// Storage: System Account (r:1 w:1) @@ -68,11 +70,13 @@ impl orml_currencies::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1461` // Estimated: `2607` - // Minimum execution time: 58_831 nanoseconds. - Weight::from_parts(59_660_000, 2607) + // Minimum execution time: 68_911 nanoseconds. + Weight::from_parts(70_820_000, 2607) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } + /// Storage: MarketAssets Asset (r:1 w:0) + /// Proof: MarketAssets Asset (max_values: None, max_size: Some(225), added: 2700, mode: MaxEncodedLen) /// Storage: Tokens Accounts (r:1 w:1) /// Proof: Tokens Accounts (max_values: None, max_size: Some(123), added: 2598, mode: MaxEncodedLen) /// Storage: Tokens TotalIssuance (r:1 w:1) @@ -81,11 +85,11 @@ impl orml_currencies::WeightInfo for WeightInfo { /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) fn update_balance_non_native_currency() -> Weight { // Proof Size summary in bytes: - // Measured: `1361` - // Estimated: `7723` - // Minimum execution time: 49_950 nanoseconds. - Weight::from_parts(57_160_000, 7723) - .saturating_add(T::DbWeight::get().reads(3)) + // Measured: `1470` + // Estimated: `10423` + // Minimum execution time: 62_950 nanoseconds. + Weight::from_parts(64_510_000, 10423) + .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } /// Storage: System Account (r:1 w:1) @@ -94,8 +98,8 @@ impl orml_currencies::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1401` // Estimated: `2607` - // Minimum execution time: 49_830 nanoseconds. - Weight::from_parts(67_881_000, 2607) + // Minimum execution time: 57_700 nanoseconds. + Weight::from_parts(58_950_000, 2607) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -105,8 +109,8 @@ impl orml_currencies::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1525` // Estimated: `2607` - // Minimum execution time: 47_410 nanoseconds. - Weight::from_parts(53_200_000, 2607) + // Minimum execution time: 54_700 nanoseconds. + Weight::from_parts(55_270_000, 2607) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/runtime/common/src/weights/orml_tokens.rs b/runtime/common/src/weights/orml_tokens.rs index 0e4ff524f..5cc4a4d99 100644 --- a/runtime/common/src/weights/orml_tokens.rs +++ b/runtime/common/src/weights/orml_tokens.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for orml_tokens //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: `2024-01-15`, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: `2024-04-02`, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `zeitgeist-benchmark`, CPU: `AMD EPYC 7601 32-Core Processor` //! EXECUTION: `Some(Wasm)`, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024` @@ -55,10 +55,10 @@ impl orml_tokens::WeightInfo for WeightInfo { /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) fn transfer() -> Weight { // Proof Size summary in bytes: - // Measured: `1753` + // Measured: `1772` // Estimated: `7803` - // Minimum execution time: 80_890 nanoseconds. - Weight::from_parts(98_321_000, 7803) + // Minimum execution time: 81_820 nanoseconds. + Weight::from_parts(99_190_000, 7803) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -68,10 +68,10 @@ impl orml_tokens::WeightInfo for WeightInfo { /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) fn transfer_all() -> Weight { // Proof Size summary in bytes: - // Measured: `1753` + // Measured: `1772` // Estimated: `7803` - // Minimum execution time: 84_510 nanoseconds. - Weight::from_parts(86_860_000, 7803) + // Minimum execution time: 86_000 nanoseconds. + Weight::from_parts(104_730_000, 7803) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -81,10 +81,10 @@ impl orml_tokens::WeightInfo for WeightInfo { /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) fn transfer_keep_alive() -> Weight { // Proof Size summary in bytes: - // Measured: `1577` + // Measured: `1596` // Estimated: `7803` - // Minimum execution time: 66_190 nanoseconds. - Weight::from_parts(79_850_000, 7803) + // Minimum execution time: 66_410 nanoseconds. + Weight::from_parts(70_510_000, 7803) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -94,10 +94,10 @@ impl orml_tokens::WeightInfo for WeightInfo { /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) fn force_transfer() -> Weight { // Proof Size summary in bytes: - // Measured: `1753` + // Measured: `1772` // Estimated: `10410` - // Minimum execution time: 74_240 nanoseconds. - Weight::from_parts(79_240_000, 10410) + // Minimum execution time: 65_651 nanoseconds. + Weight::from_parts(74_840_000, 10410) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -109,10 +109,10 @@ impl orml_tokens::WeightInfo for WeightInfo { /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) fn set_balance() -> Weight { // Proof Size summary in bytes: - // Measured: `1361` + // Measured: `1394` // Estimated: `7723` - // Minimum execution time: 56_260 nanoseconds. - Weight::from_parts(57_490_000, 7723) + // Minimum execution time: 56_401 nanoseconds. + Weight::from_parts(68_290_000, 7723) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } diff --git a/runtime/common/src/weights/pallet_assets.rs b/runtime/common/src/weights/pallet_assets.rs index 095468d8c..7ebec8a06 100644 --- a/runtime/common/src/weights/pallet_assets.rs +++ b/runtime/common/src/weights/pallet_assets.rs @@ -19,21 +19,21 @@ //! Autogenerated weights for pallet_assets //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: `2024-02-15`, STEPS: `2`, REPEAT: `0`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: `2024-04-02`, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `zafoi`, CPU: `AMD Ryzen 9 5900X 12-Core Processor` -//! EXECUTION: `Some(Native)`, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024` +//! HOSTNAME: `zeitgeist-benchmark`, CPU: `AMD EPYC 7601 32-Core Processor` +//! EXECUTION: `Some(Wasm)`, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024` // Executed Command: -// ./target/release/zeitgeist +// ./target/production/zeitgeist // benchmark // pallet // --chain=dev -// --steps=2 -// --repeat=0 +// --steps=50 +// --repeat=20 // --pallet=pallet_assets // --extrinsic=* -// --execution=native +// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --template=./misc/frame_weight_template.hbs @@ -60,8 +60,8 @@ impl pallet_assets::weights::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `285` // Estimated: `5304` - // Minimum execution time: 15_220 nanoseconds. - Weight::from_parts(15_220_000, 5304) + // Minimum execution time: 38_030 nanoseconds. + Weight::from_parts(39_010_000, 5304) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -71,8 +71,8 @@ impl pallet_assets::weights::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `109` // Estimated: `2697` - // Minimum execution time: 9_330 nanoseconds. - Weight::from_parts(9_330_000, 2697) + // Minimum execution time: 20_930 nanoseconds. + Weight::from_parts(24_940_000, 2697) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -86,8 +86,8 @@ impl pallet_assets::weights::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `452` // Estimated: `83563` - // Minimum execution time: 13_051 nanoseconds. - Weight::from_parts(13_051_000, 83563) + // Minimum execution time: 31_480 nanoseconds. + Weight::from_parts(38_210_000, 83563) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -98,28 +98,38 @@ impl pallet_assets::weights::WeightInfo for WeightInfo< /// Storage: System Account (r:50 w:50) /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) /// The range of component `c` is `[0, 50]`. - fn destroy_accounts(_c: u32) -> Weight { + fn destroy_accounts(c: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `376 + c * (241 ±0)` - // Estimated: `265086` - // Minimum execution time: 12_911 nanoseconds. - Weight::from_parts(466_572_000, 265086) - .saturating_add(T::DbWeight::get().reads(102)) - .saturating_add(T::DbWeight::get().writes(101)) + // Measured: `413 + c * (241 ±0)` + // Estimated: `5286 + c * (5196 ±0)` + // Minimum execution time: 30_040 nanoseconds. + Weight::from_parts(43_513_498, 5286) + // Standard Error: 166_642 + .saturating_add(Weight::from_parts(22_767_082, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(c.into()))) + .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(c.into()))) + .saturating_add(Weight::from_parts(0, 5196).saturating_mul(c.into())) } /// Storage: CustomAssets Asset (r:1 w:1) /// Proof: CustomAssets Asset (max_values: None, max_size: Some(222), added: 2697, mode: MaxEncodedLen) /// Storage: CustomAssets Approvals (r:51 w:50) /// Proof: CustomAssets Approvals (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) /// The range of component `a` is `[0, 50]`. - fn destroy_approvals(_a: u32) -> Weight { + fn destroy_approvals(a: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `410 + a * (88 ±0)` - // Estimated: `137082` - // Minimum execution time: 12_480 nanoseconds. - Weight::from_parts(403_251_000, 137082) - .saturating_add(T::DbWeight::get().reads(52)) - .saturating_add(T::DbWeight::get().writes(51)) + // Measured: `499 + a * (86 ±0)` + // Estimated: `5332 + a * (2635 ±0)` + // Minimum execution time: 28_480 nanoseconds. + Weight::from_parts(52_169_904, 5332) + // Standard Error: 142_566 + .saturating_add(Weight::from_parts(21_599_409, 0).saturating_mul(a.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(a.into()))) + .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(a.into()))) + .saturating_add(Weight::from_parts(0, 2635).saturating_mul(a.into())) } /// Storage: CustomAssets Asset (r:1 w:1) /// Proof: CustomAssets Asset (max_values: None, max_size: Some(222), added: 2697, mode: MaxEncodedLen) @@ -129,8 +139,8 @@ impl pallet_assets::weights::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `376` // Estimated: `5324` - // Minimum execution time: 9_881 nanoseconds. - Weight::from_parts(9_881_000, 5324) + // Minimum execution time: 23_880 nanoseconds. + Weight::from_parts(24_760_000, 5324) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -142,8 +152,8 @@ impl pallet_assets::weights::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `376` // Estimated: `5286` - // Minimum execution time: 15_010 nanoseconds. - Weight::from_parts(15_010_000, 5286) + // Minimum execution time: 39_510 nanoseconds. + Weight::from_parts(40_330_000, 5286) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -155,8 +165,8 @@ impl pallet_assets::weights::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `481` // Estimated: `5286` - // Minimum execution time: 17_511 nanoseconds. - Weight::from_parts(17_511_000, 5286) + // Minimum execution time: 48_130 nanoseconds. + Weight::from_parts(58_590_000, 5286) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -170,8 +180,8 @@ impl pallet_assets::weights::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `520` // Estimated: `10482` - // Minimum execution time: 23_321 nanoseconds. - Weight::from_parts(23_321_000, 10482) + // Minimum execution time: 67_810 nanoseconds. + Weight::from_parts(68_830_000, 10482) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -185,8 +195,8 @@ impl pallet_assets::weights::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `520` // Estimated: `10482` - // Minimum execution time: 20_681 nanoseconds. - Weight::from_parts(20_681_000, 10482) + // Minimum execution time: 59_550 nanoseconds. + Weight::from_parts(60_701_000, 10482) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -200,8 +210,8 @@ impl pallet_assets::weights::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `520` // Estimated: `10482` - // Minimum execution time: 23_021 nanoseconds. - Weight::from_parts(23_021_000, 10482) + // Minimum execution time: 67_790 nanoseconds. + Weight::from_parts(82_380_000, 10482) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -213,8 +223,8 @@ impl pallet_assets::weights::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `481` // Estimated: `5286` - // Minimum execution time: 10_620 nanoseconds. - Weight::from_parts(10_620_000, 5286) + // Minimum execution time: 26_670 nanoseconds. + Weight::from_parts(31_120_000, 5286) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -226,8 +236,8 @@ impl pallet_assets::weights::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `481` // Estimated: `5286` - // Minimum execution time: 10_370 nanoseconds. - Weight::from_parts(10_370_000, 5286) + // Minimum execution time: 26_540 nanoseconds. + Weight::from_parts(27_220_000, 5286) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -237,8 +247,8 @@ impl pallet_assets::weights::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `410` // Estimated: `2697` - // Minimum execution time: 8_710 nanoseconds. - Weight::from_parts(8_710_000, 2697) + // Minimum execution time: 20_420 nanoseconds. + Weight::from_parts(21_350_000, 2697) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -248,8 +258,8 @@ impl pallet_assets::weights::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `410` // Estimated: `2697` - // Minimum execution time: 8_400 nanoseconds. - Weight::from_parts(8_400_000, 2697) + // Minimum execution time: 20_591 nanoseconds. + Weight::from_parts(25_120_000, 2697) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -261,8 +271,8 @@ impl pallet_assets::weights::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `376` // Estimated: `5324` - // Minimum execution time: 10_600 nanoseconds. - Weight::from_parts(10_600_000, 5324) + // Minimum execution time: 24_900 nanoseconds. + Weight::from_parts(30_390_000, 5324) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -272,8 +282,8 @@ impl pallet_assets::weights::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `376` // Estimated: `2697` - // Minimum execution time: 9_221 nanoseconds. - Weight::from_parts(9_221_000, 2697) + // Minimum execution time: 22_670 nanoseconds. + Weight::from_parts(23_290_000, 2697) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -283,12 +293,14 @@ impl pallet_assets::weights::WeightInfo for WeightInfo< /// Proof: CustomAssets Metadata (max_values: None, max_size: Some(152), added: 2627, mode: MaxEncodedLen) /// The range of component `n` is `[0, 50]`. /// The range of component `s` is `[0, 50]`. - fn set_metadata(_n: u32, _s: u32) -> Weight { + fn set_metadata(n: u32, _s: u32) -> Weight { // Proof Size summary in bytes: // Measured: `376` // Estimated: `5324` - // Minimum execution time: 14_040 nanoseconds. - Weight::from_parts(16_751_500, 5324) + // Minimum execution time: 32_660 nanoseconds. + Weight::from_parts(40_239_865, 5324) + // Standard Error: 8_166 + .saturating_add(Weight::from_parts(6_886, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -300,8 +312,8 @@ impl pallet_assets::weights::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `569` // Estimated: `5324` - // Minimum execution time: 14_580 nanoseconds. - Weight::from_parts(14_580_000, 5324) + // Minimum execution time: 37_450 nanoseconds. + Weight::from_parts(39_330_000, 5324) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -311,14 +323,16 @@ impl pallet_assets::weights::WeightInfo for WeightInfo< /// Proof: CustomAssets Metadata (max_values: None, max_size: Some(152), added: 2627, mode: MaxEncodedLen) /// The range of component `n` is `[0, 50]`. /// The range of component `s` is `[0, 50]`. - fn force_set_metadata(_n: u32, s: u32) -> Weight { + fn force_set_metadata(n: u32, s: u32) -> Weight { // Proof Size summary in bytes: // Measured: `183` // Estimated: `5324` - // Minimum execution time: 9_340 nanoseconds. - Weight::from_parts(9_745_000, 5324) - // Standard Error: 6_754 - .saturating_add(Weight::from_parts(9_100, 0).saturating_mul(s.into())) + // Minimum execution time: 23_250 nanoseconds. + Weight::from_parts(25_237_772, 5324) + // Standard Error: 5_317 + .saturating_add(Weight::from_parts(5_712, 0).saturating_mul(n.into())) + // Standard Error: 5_317 + .saturating_add(Weight::from_parts(16_298, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -330,8 +344,8 @@ impl pallet_assets::weights::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `569` // Estimated: `5324` - // Minimum execution time: 15_270 nanoseconds. - Weight::from_parts(15_270_000, 5324) + // Minimum execution time: 36_550 nanoseconds. + Weight::from_parts(37_430_000, 5324) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -341,8 +355,8 @@ impl pallet_assets::weights::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `376` // Estimated: `2697` - // Minimum execution time: 9_671 nanoseconds. - Weight::from_parts(9_671_000, 2697) + // Minimum execution time: 21_430 nanoseconds. + Weight::from_parts(21_890_000, 2697) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -354,8 +368,8 @@ impl pallet_assets::weights::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `410` // Estimated: `5332` - // Minimum execution time: 16_250 nanoseconds. - Weight::from_parts(16_250_000, 5332) + // Minimum execution time: 36_791 nanoseconds. + Weight::from_parts(45_250_000, 5332) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -371,8 +385,8 @@ impl pallet_assets::weights::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `687` // Estimated: `13117` - // Minimum execution time: 31_161 nanoseconds. - Weight::from_parts(31_161_000, 13117) + // Minimum execution time: 88_930 nanoseconds. + Weight::from_parts(108_130_000, 13117) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(5)) } @@ -384,8 +398,8 @@ impl pallet_assets::weights::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `577` // Estimated: `5332` - // Minimum execution time: 16_640 nanoseconds. - Weight::from_parts(16_640_000, 5332) + // Minimum execution time: 44_150 nanoseconds. + Weight::from_parts(45_490_000, 5332) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -397,8 +411,8 @@ impl pallet_assets::weights::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `577` // Estimated: `5332` - // Minimum execution time: 16_961 nanoseconds. - Weight::from_parts(16_961_000, 5332) + // Minimum execution time: 45_170 nanoseconds. + Weight::from_parts(55_471_000, 5332) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } diff --git a/runtime/common/src/weights/pallet_author_inherent.rs b/runtime/common/src/weights/pallet_author_inherent.rs index e510cdd28..4e6622fe6 100644 --- a/runtime/common/src/weights/pallet_author_inherent.rs +++ b/runtime/common/src/weights/pallet_author_inherent.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_author_inherent //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: `2024-01-15`, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: `2024-04-03`, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `zeitgeist-benchmark`, CPU: `AMD EPYC 7601 32-Core Processor` //! EXECUTION: `Some(Wasm)`, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024` @@ -66,10 +66,10 @@ impl pallet_author_inherent::weights::WeightInfo for We /// Proof: RandomnessCollectiveFlip RandomMaterial (max_values: Some(1), max_size: Some(2594), added: 3089, mode: MaxEncodedLen) fn kick_off_authorship_validation() -> Weight { // Proof Size summary in bytes: - // Measured: `572` - // Estimated: `7316` - // Minimum execution time: 45_440 nanoseconds. - Weight::from_parts(46_281_000, 7316) + // Measured: `605` + // Estimated: `7415` + // Minimum execution time: 38_680 nanoseconds. + Weight::from_parts(46_900_000, 7415) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/runtime/common/src/weights/pallet_author_mapping.rs b/runtime/common/src/weights/pallet_author_mapping.rs index 2ab08d513..f71dbd7f0 100644 --- a/runtime/common/src/weights/pallet_author_mapping.rs +++ b/runtime/common/src/weights/pallet_author_mapping.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_author_mapping //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: `2024-01-15`, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: `2024-04-03`, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `zeitgeist-benchmark`, CPU: `AMD EPYC 7601 32-Core Processor` //! EXECUTION: `Some(Wasm)`, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024` @@ -60,10 +60,10 @@ impl pallet_author_mapping::weights::WeightInfo for Wei /// Proof Skipped: AuthorMapping NimbusLookup (max_values: None, max_size: None, mode: Measured) fn add_association() -> Weight { // Proof Size summary in bytes: - // Measured: `462` - // Estimated: `6006` - // Minimum execution time: 39_201 nanoseconds. - Weight::from_parts(47_790_000, 6006) + // Measured: `495` + // Estimated: `6072` + // Minimum execution time: 38_870 nanoseconds. + Weight::from_parts(47_760_000, 6072) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -73,10 +73,10 @@ impl pallet_author_mapping::weights::WeightInfo for Wei /// Proof Skipped: AuthorMapping NimbusLookup (max_values: None, max_size: None, mode: Measured) fn update_association() -> Weight { // Proof Size summary in bytes: - // Measured: `407` - // Estimated: `5764` - // Minimum execution time: 30_870 nanoseconds. - Weight::from_parts(37_440_000, 5764) + // Measured: `440` + // Estimated: `5830` + // Minimum execution time: 36_610 nanoseconds. + Weight::from_parts(37_720_000, 5830) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -88,10 +88,10 @@ impl pallet_author_mapping::weights::WeightInfo for Wei /// Proof Skipped: AuthorMapping NimbusLookup (max_values: None, max_size: None, mode: Measured) fn clear_association() -> Weight { // Proof Size summary in bytes: - // Measured: `583` - // Estimated: `6248` - // Minimum execution time: 50_370 nanoseconds. - Weight::from_parts(51_670_000, 6248) + // Measured: `616` + // Estimated: `6314` + // Minimum execution time: 41_021 nanoseconds. + Weight::from_parts(51_330_000, 6314) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -103,10 +103,10 @@ impl pallet_author_mapping::weights::WeightInfo for Wei /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) fn remove_keys() -> Weight { // Proof Size summary in bytes: - // Measured: `689` - // Estimated: `8935` - // Minimum execution time: 47_440 nanoseconds. - Weight::from_parts(58_350_000, 8935) + // Measured: `722` + // Estimated: `9001` + // Minimum execution time: 50_691 nanoseconds. + Weight::from_parts(51_620_000, 9001) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -116,10 +116,10 @@ impl pallet_author_mapping::weights::WeightInfo for Wei /// Proof Skipped: AuthorMapping MappingWithDeposit (max_values: None, max_size: None, mode: Measured) fn set_keys() -> Weight { // Proof Size summary in bytes: - // Measured: `513` - // Estimated: `8451` - // Minimum execution time: 37_090 nanoseconds. - Weight::from_parts(45_430_000, 8451) + // Measured: `546` + // Estimated: `8517` + // Minimum execution time: 41_391 nanoseconds. + Weight::from_parts(44_980_000, 8517) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } diff --git a/runtime/common/src/weights/pallet_author_slot_filter.rs b/runtime/common/src/weights/pallet_author_slot_filter.rs index cbc8e8f6c..aa55f3d5d 100644 --- a/runtime/common/src/weights/pallet_author_slot_filter.rs +++ b/runtime/common/src/weights/pallet_author_slot_filter.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_author_slot_filter //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: `2024-01-15`, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: `2024-04-03`, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `zeitgeist-benchmark`, CPU: `AMD EPYC 7601 32-Core Processor` //! EXECUTION: `Some(Wasm)`, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024` @@ -58,7 +58,7 @@ impl pallet_author_slot_filter::weights::WeightInfo for // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 12_991 nanoseconds. - Weight::from_parts(13_580_000, 0).saturating_add(T::DbWeight::get().writes(1)) + // Minimum execution time: 12_640 nanoseconds. + Weight::from_parts(13_451_000, 0).saturating_add(T::DbWeight::get().writes(1)) } } diff --git a/runtime/common/src/weights/pallet_balances.rs b/runtime/common/src/weights/pallet_balances.rs index 3c6be6587..cfa60b22c 100644 --- a/runtime/common/src/weights/pallet_balances.rs +++ b/runtime/common/src/weights/pallet_balances.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_balances //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: `2024-01-14`, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: `2024-04-02`, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `zeitgeist-benchmark`, CPU: `AMD EPYC 7601 32-Core Processor` //! EXECUTION: `Some(Wasm)`, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024` @@ -58,8 +58,8 @@ impl pallet_balances::weights::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `1585` // Estimated: `5214` - // Minimum execution time: 90_831 nanoseconds. - Weight::from_parts(92_820_000, 5214) + // Minimum execution time: 91_220 nanoseconds. + Weight::from_parts(92_370_000, 5214) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -69,8 +69,8 @@ impl pallet_balances::weights::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `1409` // Estimated: `2607` - // Minimum execution time: 59_480 nanoseconds. - Weight::from_parts(72_070_000, 2607) + // Minimum execution time: 60_570 nanoseconds. + Weight::from_parts(61_960_000, 2607) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -80,8 +80,8 @@ impl pallet_balances::weights::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `1559` // Estimated: `2607` - // Minimum execution time: 46_560 nanoseconds. - Weight::from_parts(57_250_000, 2607) + // Minimum execution time: 47_620 nanoseconds. + Weight::from_parts(57_830_000, 2607) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -91,8 +91,8 @@ impl pallet_balances::weights::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `1559` // Estimated: `2607` - // Minimum execution time: 51_850 nanoseconds. - Weight::from_parts(54_300_000, 2607) + // Minimum execution time: 52_801 nanoseconds. + Weight::from_parts(64_560_000, 2607) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -102,8 +102,8 @@ impl pallet_balances::weights::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `1581` // Estimated: `7821` - // Minimum execution time: 88_700 nanoseconds. - Weight::from_parts(107_780_000, 7821) + // Minimum execution time: 90_201 nanoseconds. + Weight::from_parts(92_440_000, 7821) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -113,8 +113,8 @@ impl pallet_balances::weights::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `1409` // Estimated: `2607` - // Minimum execution time: 68_470 nanoseconds. - Weight::from_parts(81_521_000, 2607) + // Minimum execution time: 69_320 nanoseconds. + Weight::from_parts(84_811_000, 2607) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -124,8 +124,8 @@ impl pallet_balances::weights::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `1443` // Estimated: `2607` - // Minimum execution time: 40_810 nanoseconds. - Weight::from_parts(49_180_000, 2607) + // Minimum execution time: 41_590 nanoseconds. + Weight::from_parts(43_140_000, 2607) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/runtime/common/src/weights/pallet_bounties.rs b/runtime/common/src/weights/pallet_bounties.rs index ac27c2c9d..647f391f5 100644 --- a/runtime/common/src/weights/pallet_bounties.rs +++ b/runtime/common/src/weights/pallet_bounties.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_bounties //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: `2024-01-14`, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: `2024-04-02`, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `zeitgeist-benchmark`, CPU: `AMD EPYC 7601 32-Core Processor` //! EXECUTION: `Some(Wasm)`, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024` @@ -65,10 +65,10 @@ impl pallet_bounties::weights::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `141` // Estimated: `3106` - // Minimum execution time: 37_250 nanoseconds. - Weight::from_parts(42_264_142, 3106) - // Standard Error: 80 - .saturating_add(Weight::from_parts(1_638, 0).saturating_mul(d.into())) + // Minimum execution time: 37_041 nanoseconds. + Weight::from_parts(41_907_852, 3106) + // Standard Error: 77 + .saturating_add(Weight::from_parts(1_483, 0).saturating_mul(d.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -80,8 +80,8 @@ impl pallet_bounties::weights::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `229` // Estimated: `3553` - // Minimum execution time: 18_260 nanoseconds. - Weight::from_parts(18_980_000, 3553) + // Minimum execution time: 17_760 nanoseconds. + Weight::from_parts(22_020_000, 3553) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -91,8 +91,8 @@ impl pallet_bounties::weights::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `249` // Estimated: `2656` - // Minimum execution time: 14_450 nanoseconds. - Weight::from_parts(16_610_000, 2656) + // Minimum execution time: 15_430 nanoseconds. + Weight::from_parts(16_320_000, 2656) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -104,8 +104,8 @@ impl pallet_bounties::weights::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `641` // Estimated: `7870` - // Minimum execution time: 49_830 nanoseconds. - Weight::from_parts(57_470_000, 7870) + // Minimum execution time: 55_790 nanoseconds. + Weight::from_parts(68_600_000, 7870) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -117,8 +117,8 @@ impl pallet_bounties::weights::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `457` // Estimated: `5263` - // Minimum execution time: 31_400 nanoseconds. - Weight::from_parts(34_300_000, 5263) + // Minimum execution time: 35_110 nanoseconds. + Weight::from_parts(41_720_000, 5263) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -128,8 +128,8 @@ impl pallet_bounties::weights::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `289` // Estimated: `2656` - // Minimum execution time: 22_240 nanoseconds. - Weight::from_parts(25_100_000, 2656) + // Minimum execution time: 25_530 nanoseconds. + Weight::from_parts(30_380_000, 2656) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -143,8 +143,8 @@ impl pallet_bounties::weights::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `674` // Estimated: `10477` - // Minimum execution time: 89_050 nanoseconds. - Weight::from_parts(93_931_000, 10477) + // Minimum execution time: 99_900 nanoseconds. + Weight::from_parts(110_310_000, 10477) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(5)) } @@ -158,8 +158,8 @@ impl pallet_bounties::weights::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `541` // Estimated: `7870` - // Minimum execution time: 52_760 nanoseconds. - Weight::from_parts(65_670_000, 7870) + // Minimum execution time: 70_890 nanoseconds. + Weight::from_parts(72_370_000, 7870) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -173,8 +173,8 @@ impl pallet_bounties::weights::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `818` // Estimated: `10477` - // Minimum execution time: 68_251 nanoseconds. - Weight::from_parts(90_760_000, 10477) + // Minimum execution time: 75_191 nanoseconds. + Weight::from_parts(92_190_000, 10477) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(5)) } @@ -184,8 +184,8 @@ impl pallet_bounties::weights::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `289` // Estimated: `2656` - // Minimum execution time: 22_600 nanoseconds. - Weight::from_parts(25_090_000, 2656) + // Minimum execution time: 23_930 nanoseconds. + Weight::from_parts(24_920_000, 2656) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -200,10 +200,10 @@ impl pallet_bounties::weights::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `98 + b * (357 ±0)` // Estimated: `897 + b * (7870 ±0)` - // Minimum execution time: 6_500 nanoseconds. - Weight::from_parts(7_220_000, 897) - // Standard Error: 127_073 - .saturating_add(Weight::from_parts(48_355_191, 0).saturating_mul(b.into())) + // Minimum execution time: 6_910 nanoseconds. + Weight::from_parts(18_947_391, 897) + // Standard Error: 190_619 + .saturating_add(Weight::from_parts(46_824_225, 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)) diff --git a/runtime/common/src/weights/pallet_collective.rs b/runtime/common/src/weights/pallet_collective.rs index 39ca9d87e..dcbf2ca52 100644 --- a/runtime/common/src/weights/pallet_collective.rs +++ b/runtime/common/src/weights/pallet_collective.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_collective //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: `2024-01-14`, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: `2024-04-02`, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `zeitgeist-benchmark`, CPU: `AMD EPYC 7601 32-Core Processor` //! EXECUTION: `Some(Wasm)`, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024` @@ -66,13 +66,13 @@ impl pallet_collective::weights::WeightInfo for WeightI fn set_members(m: u32, _n: u32, p: u32) -> Weight { // Proof Size summary in bytes: // Measured: `0 + m * (8195 ±0) + p * (3227 ±0)` - // Estimated: `33167 + m * (19751 ±63) + p * (10255 ±24)` - // Minimum execution time: 26_570 nanoseconds. - Weight::from_parts(29_900_000, 33167) - // Standard Error: 326_248 - .saturating_add(Weight::from_parts(25_790_752, 0).saturating_mul(m.into())) - // Standard Error: 128_092 - .saturating_add(Weight::from_parts(15_085_049, 0).saturating_mul(p.into())) + // Estimated: `33167 + m * (19751 ±60) + p * (10255 ±23)` + // Minimum execution time: 29_790 nanoseconds. + Weight::from_parts(30_470_000, 33167) + // Standard Error: 290_563 + .saturating_add(Weight::from_parts(20_259_936, 0).saturating_mul(m.into())) + // Standard Error: 114_081 + .saturating_add(Weight::from_parts(13_715_268, 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)) @@ -88,12 +88,12 @@ impl pallet_collective::weights::WeightInfo for WeightI // Proof Size summary in bytes: // Measured: `100 + m * (32 ±0)` // Estimated: `596 + m * (32 ±0)` - // Minimum execution time: 25_581 nanoseconds. - Weight::from_parts(29_243_977, 596) - // Standard Error: 389 - .saturating_add(Weight::from_parts(2_599, 0).saturating_mul(b.into())) - // Standard Error: 4_014 - .saturating_add(Weight::from_parts(18_848, 0).saturating_mul(m.into())) + // Minimum execution time: 25_960 nanoseconds. + Weight::from_parts(29_269_228, 596) + // Standard Error: 337 + .saturating_add(Weight::from_parts(3_602, 0).saturating_mul(b.into())) + // Standard Error: 3_474 + .saturating_add(Weight::from_parts(21_450, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into())) } @@ -107,10 +107,12 @@ impl pallet_collective::weights::WeightInfo for WeightI // Proof Size summary in bytes: // Measured: `100 + m * (32 ±0)` // Estimated: `3172 + m * (64 ±0)` - // Minimum execution time: 29_510 nanoseconds. - Weight::from_parts(39_239_765, 3172) - // Standard Error: 624 - .saturating_add(Weight::from_parts(2_489, 0).saturating_mul(b.into())) + // Minimum execution time: 31_490 nanoseconds. + Weight::from_parts(30_131_213, 3172) + // Standard Error: 384 + .saturating_add(Weight::from_parts(4_624, 0).saturating_mul(b.into())) + // Standard Error: 3_965 + .saturating_add(Weight::from_parts(61_957, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) } @@ -131,14 +133,14 @@ impl pallet_collective::weights::WeightInfo for WeightI // Proof Size summary in bytes: // Measured: `565 + m * (32 ±0) + p * (33 ±0)` // Estimated: `6570 + m * (160 ±0) + p * (170 ±0)` - // Minimum execution time: 38_280 nanoseconds. - Weight::from_parts(34_499_820, 6570) - // Standard Error: 843 - .saturating_add(Weight::from_parts(9_755, 0).saturating_mul(b.into())) - // Standard Error: 8_797 - .saturating_add(Weight::from_parts(24_088, 0).saturating_mul(m.into())) - // Standard Error: 3_386 - .saturating_add(Weight::from_parts(192_506, 0).saturating_mul(p.into())) + // Minimum execution time: 39_040 nanoseconds. + Weight::from_parts(34_059_907, 6570) + // Standard Error: 758 + .saturating_add(Weight::from_parts(19_427, 0).saturating_mul(b.into())) + // Standard Error: 7_913 + .saturating_add(Weight::from_parts(14_899, 0).saturating_mul(m.into())) + // Standard Error: 3_046 + .saturating_add(Weight::from_parts(180_246, 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, 160).saturating_mul(m.into())) @@ -153,10 +155,10 @@ impl pallet_collective::weights::WeightInfo for WeightI // Proof Size summary in bytes: // Measured: `1240 + m * (64 ±0)` // Estimated: `5448 + m * (128 ±0)` - // Minimum execution time: 38_090 nanoseconds. - Weight::from_parts(45_241_332, 5448) - // Standard Error: 6_225 - .saturating_add(Weight::from_parts(123_734, 0).saturating_mul(m.into())) + // Minimum execution time: 39_500 nanoseconds. + Weight::from_parts(48_841_714, 5448) + // Standard Error: 6_702 + .saturating_add(Weight::from_parts(84_392, 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())) @@ -175,12 +177,12 @@ impl pallet_collective::weights::WeightInfo for WeightI // Proof Size summary in bytes: // Measured: `683 + m * (64 ±0) + p * (33 ±0)` // Estimated: `6017 + m * (260 ±0) + p * (136 ±0)` - // Minimum execution time: 40_550 nanoseconds. - Weight::from_parts(48_542_021, 6017) - // Standard Error: 8_566 - .saturating_add(Weight::from_parts(3_180, 0).saturating_mul(m.into())) - // Standard Error: 3_255 - .saturating_add(Weight::from_parts(145_858, 0).saturating_mul(p.into())) + // Minimum execution time: 40_640 nanoseconds. + Weight::from_parts(42_123_537, 6017) + // Standard Error: 7_228 + .saturating_add(Weight::from_parts(92_522, 0).saturating_mul(m.into())) + // Standard Error: 2_747 + .saturating_add(Weight::from_parts(186_866, 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())) @@ -201,14 +203,12 @@ impl pallet_collective::weights::WeightInfo for WeightI // Proof Size summary in bytes: // Measured: `926 + b * (1 ±0) + m * (64 ±0) + p * (36 ±0)` // Estimated: `9916 + b * (4 ±0) + m * (248 ±0) + p * (144 ±0)` - // Minimum execution time: 56_730 nanoseconds. - Weight::from_parts(60_995_866, 9916) - // Standard Error: 1_124 - .saturating_add(Weight::from_parts(7_475, 0).saturating_mul(b.into())) - // Standard Error: 11_882 - .saturating_add(Weight::from_parts(24_932, 0).saturating_mul(m.into())) - // Standard Error: 4_516 - .saturating_add(Weight::from_parts(202_498, 0).saturating_mul(p.into())) + // Minimum execution time: 57_170 nanoseconds. + Weight::from_parts(69_742_766, 9916) + // Standard Error: 982 + .saturating_add(Weight::from_parts(312, 0).saturating_mul(b.into())) + // Standard Error: 3_944 + .saturating_add(Weight::from_parts(236_954, 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())) @@ -231,12 +231,12 @@ impl pallet_collective::weights::WeightInfo for WeightI // Proof Size summary in bytes: // Measured: `703 + m * (64 ±0) + p * (33 ±0)` // Estimated: `7250 + m * (325 ±0) + p * (170 ±0)` - // Minimum execution time: 44_580 nanoseconds. - Weight::from_parts(42_251_455, 7250) - // Standard Error: 11_312 - .saturating_add(Weight::from_parts(79_601, 0).saturating_mul(m.into())) - // Standard Error: 4_299 - .saturating_add(Weight::from_parts(177_260, 0).saturating_mul(p.into())) + // Minimum execution time: 43_830 nanoseconds. + Weight::from_parts(53_537_018, 7250) + // Standard Error: 8_674 + .saturating_add(Weight::from_parts(5_263, 0).saturating_mul(m.into())) + // Standard Error: 3_296 + .saturating_add(Weight::from_parts(162_220, 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())) @@ -259,14 +259,14 @@ impl pallet_collective::weights::WeightInfo for WeightI // Proof Size summary in bytes: // Measured: `946 + b * (1 ±0) + m * (64 ±0) + p * (36 ±0)` // Estimated: `11505 + b * (5 ±0) + m * (310 ±0) + p * (180 ±0)` - // Minimum execution time: 61_120 nanoseconds. - Weight::from_parts(61_360_635, 11505) - // Standard Error: 1_164 - .saturating_add(Weight::from_parts(10_168, 0).saturating_mul(b.into())) - // Standard Error: 12_309 - .saturating_add(Weight::from_parts(31_252, 0).saturating_mul(m.into())) - // Standard Error: 4_678 - .saturating_add(Weight::from_parts(211_197, 0).saturating_mul(p.into())) + // Minimum execution time: 60_921 nanoseconds. + Weight::from_parts(64_816_771, 11505) + // Standard Error: 1_103 + .saturating_add(Weight::from_parts(5_021, 0).saturating_mul(b.into())) + // Standard Error: 11_665 + .saturating_add(Weight::from_parts(72_542, 0).saturating_mul(m.into())) + // Standard Error: 4_433 + .saturating_add(Weight::from_parts(207_221, 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())) @@ -284,10 +284,10 @@ impl pallet_collective::weights::WeightInfo for WeightI // Proof Size summary in bytes: // Measured: `258 + p * (32 ±0)` // Estimated: `1266 + p * (96 ±0)` - // Minimum execution time: 24_060 nanoseconds. - Weight::from_parts(31_125_083, 1266) - // Standard Error: 2_857 - .saturating_add(Weight::from_parts(122_760, 0).saturating_mul(p.into())) + // Minimum execution time: 23_430 nanoseconds. + Weight::from_parts(29_973_062, 1266) + // Standard Error: 2_147 + .saturating_add(Weight::from_parts(141_748, 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())) diff --git a/runtime/common/src/weights/pallet_contracts.rs b/runtime/common/src/weights/pallet_contracts.rs index 685b6e73e..32454fc83 100644 --- a/runtime/common/src/weights/pallet_contracts.rs +++ b/runtime/common/src/weights/pallet_contracts.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_contracts //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: `2024-01-15`, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: `2024-04-02`, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `zeitgeist-benchmark`, CPU: `AMD EPYC 7601 32-Core Processor` //! EXECUTION: `Some(Wasm)`, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024` @@ -58,8 +58,8 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `42` // Estimated: `0` - // Minimum execution time: 5_220 nanoseconds. - Weight::from_parts(5_660_000, 0).saturating_add(T::DbWeight::get().reads(1)) + // Minimum execution time: 6_110 nanoseconds. + Weight::from_parts(6_490_000, 0).saturating_add(T::DbWeight::get().reads(1)) } /// Storage: Skipped Metadata (r:0 w:0) /// Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Ignored) @@ -68,10 +68,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `414 + k * (69 ±0)` // Estimated: `0` - // Minimum execution time: 16_010 nanoseconds. - Weight::from_parts(23_064_332, 0) - // Standard Error: 10_096 - .saturating_add(Weight::from_parts(1_760_195, 0).saturating_mul(k.into())) + // Minimum execution time: 18_090 nanoseconds. + Weight::from_parts(22_395_669, 0) + // Standard Error: 10_251 + .saturating_add(Weight::from_parts(1_733_823, 0).saturating_mul(k.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(k.into()))) @@ -83,10 +83,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `214 + q * (33 ±0)` // Estimated: `0` - // Minimum execution time: 6_150 nanoseconds. - Weight::from_parts(20_444_138, 0) - // Standard Error: 16_865 - .saturating_add(Weight::from_parts(2_019_484, 0).saturating_mul(q.into())) + // Minimum execution time: 6_440 nanoseconds. + Weight::from_parts(17_633_322, 0) + // Standard Error: 18_172 + .saturating_add(Weight::from_parts(2_046_769, 0).saturating_mul(q.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -99,10 +99,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `203 + c * (1 ±0)` // Estimated: `0` - // Minimum execution time: 49_871 nanoseconds. - Weight::from_parts(72_979_979, 0) - // Standard Error: 535 - .saturating_add(Weight::from_parts(96_053, 0).saturating_mul(c.into())) + // Minimum execution time: 50_040 nanoseconds. + Weight::from_parts(66_118_566, 0) + // Standard Error: 339 + .saturating_add(Weight::from_parts(101_168, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -121,10 +121,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `675` // Estimated: `0` - // Minimum execution time: 386_581 nanoseconds. - Weight::from_parts(483_335_740, 0) - // Standard Error: 205 - .saturating_add(Weight::from_parts(57_256, 0).saturating_mul(c.into())) + // Minimum execution time: 384_991 nanoseconds. + Weight::from_parts(474_640_398, 0) + // Standard Error: 210 + .saturating_add(Weight::from_parts(59_024, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -151,14 +151,14 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `157` // Estimated: `0` - // Minimum execution time: 6_121_492 nanoseconds. - Weight::from_parts(689_215_210, 0) - // Standard Error: 704 - .saturating_add(Weight::from_parts(177_888, 0).saturating_mul(c.into())) - // Standard Error: 41 - .saturating_add(Weight::from_parts(2_798, 0).saturating_mul(i.into())) - // Standard Error: 41 - .saturating_add(Weight::from_parts(2_894, 0).saturating_mul(s.into())) + // Minimum execution time: 6_569_301 nanoseconds. + Weight::from_parts(1_111_140_649, 0) + // Standard Error: 728 + .saturating_add(Weight::from_parts(189_058, 0).saturating_mul(c.into())) + // Standard Error: 42 + .saturating_add(Weight::from_parts(2_510, 0).saturating_mul(i.into())) + // Standard Error: 42 + .saturating_add(Weight::from_parts(3_132, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(9)) } @@ -182,12 +182,12 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `433` // Estimated: `0` - // Minimum execution time: 2_331_815 nanoseconds. - Weight::from_parts(510_378_005, 0) - // Standard Error: 42 - .saturating_add(Weight::from_parts(1_952, 0).saturating_mul(i.into())) - // Standard Error: 42 - .saturating_add(Weight::from_parts(2_981, 0).saturating_mul(s.into())) + // Minimum execution time: 2_391_049 nanoseconds. + Weight::from_parts(705_609_295, 0) + // Standard Error: 44 + .saturating_add(Weight::from_parts(1_900, 0).saturating_mul(i.into())) + // Standard Error: 44 + .saturating_add(Weight::from_parts(2_956, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(7)) } @@ -205,8 +205,8 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `727` // Estimated: `0` - // Minimum execution time: 228_951 nanoseconds. - Weight::from_parts(268_301_000, 0) + // Minimum execution time: 209_711 nanoseconds. + Weight::from_parts(255_811_000, 0) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -223,10 +223,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `42` // Estimated: `0` - // Minimum execution time: 447_811 nanoseconds. - Weight::from_parts(526_447_412, 0) - // Standard Error: 835 - .saturating_add(Weight::from_parts(175_016, 0).saturating_mul(c.into())) + // Minimum execution time: 391_302 nanoseconds. + Weight::from_parts(510_442_008, 0) + // Standard Error: 434 + .saturating_add(Weight::from_parts(181_832, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -242,8 +242,8 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `218` // Estimated: `0` - // Minimum execution time: 40_410 nanoseconds. - Weight::from_parts(49_250_000, 0) + // Minimum execution time: 41_390 nanoseconds. + Weight::from_parts(42_220_000, 0) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -257,8 +257,8 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `567` // Estimated: `0` - // Minimum execution time: 47_480 nanoseconds. - Weight::from_parts(57_290_000, 0) + // Minimum execution time: 47_790 nanoseconds. + Weight::from_parts(58_291_000, 0) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(6)) } @@ -277,10 +277,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `697 + r * (480 ±0)` // Estimated: `0` - // Minimum execution time: 372_390 nanoseconds. - Weight::from_parts(476_865_760, 0) - // Standard Error: 744_335 - .saturating_add(Weight::from_parts(36_409_937, 0).saturating_mul(r.into())) + // Minimum execution time: 375_301 nanoseconds. + Weight::from_parts(478_558_442, 0) + // Standard Error: 404_503 + .saturating_add(Weight::from_parts(33_588_102, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -299,10 +299,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `749 + r * (19218 ±0)` // Estimated: `0` - // Minimum execution time: 372_401 nanoseconds. - Weight::from_parts(140_531_070, 0) - // Standard Error: 1_865_123 - .saturating_add(Weight::from_parts(462_201_901, 0).saturating_mul(r.into())) + // Minimum execution time: 373_011 nanoseconds. + Weight::from_parts(160_300_699, 0) + // Standard Error: 1_720_908 + .saturating_add(Weight::from_parts(479_354_490, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().reads((80_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3)) @@ -322,10 +322,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `741 + r * (19539 ±0)` // Estimated: `0` - // Minimum execution time: 375_671 nanoseconds. - Weight::from_parts(233_905_041, 0) - // Standard Error: 1_698_368 - .saturating_add(Weight::from_parts(538_201_180, 0).saturating_mul(r.into())) + // Minimum execution time: 379_232 nanoseconds. + Weight::from_parts(343_138_581, 0) + // Standard Error: 1_423_456 + .saturating_add(Weight::from_parts(535_980_878, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().reads((80_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3)) @@ -345,10 +345,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `704 + r * (480 ±0)` // Estimated: `0` - // Minimum execution time: 376_331 nanoseconds. - Weight::from_parts(454_664_062, 0) - // Standard Error: 461_840 - .saturating_add(Weight::from_parts(45_194_203, 0).saturating_mul(r.into())) + // Minimum execution time: 375_911 nanoseconds. + Weight::from_parts(467_258_836, 0) + // Standard Error: 421_581 + .saturating_add(Weight::from_parts(41_940_000, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -367,10 +367,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `694 + r * (240 ±0)` // Estimated: `0` - // Minimum execution time: 372_641 nanoseconds. - Weight::from_parts(451_741_155, 0) - // Standard Error: 337_133 - .saturating_add(Weight::from_parts(22_608_395, 0).saturating_mul(r.into())) + // Minimum execution time: 371_141 nanoseconds. + Weight::from_parts(446_629_107, 0) + // Standard Error: 302_767 + .saturating_add(Weight::from_parts(21_741_006, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -389,10 +389,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `698 + r * (480 ±0)` // Estimated: `0` - // Minimum execution time: 373_390 nanoseconds. - Weight::from_parts(455_581_915, 0) - // Standard Error: 351_337 - .saturating_add(Weight::from_parts(38_061_966, 0).saturating_mul(r.into())) + // Minimum execution time: 374_182 nanoseconds. + Weight::from_parts(455_823_309, 0) + // Standard Error: 372_497 + .saturating_add(Weight::from_parts(36_686_525, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -411,10 +411,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `699 + r * (480 ±0)` // Estimated: `0` - // Minimum execution time: 373_951 nanoseconds. - Weight::from_parts(436_724_141, 0) - // Standard Error: 526_654 - .saturating_add(Weight::from_parts(39_277_146, 0).saturating_mul(r.into())) + // Minimum execution time: 374_301 nanoseconds. + Weight::from_parts(472_545_348, 0) + // Standard Error: 365_341 + .saturating_add(Weight::from_parts(33_357_127, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -433,10 +433,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `873 + r * (480 ±0)` // Estimated: `0` - // Minimum execution time: 373_040 nanoseconds. - Weight::from_parts(510_048_107, 0) - // Standard Error: 1_188_911 - .saturating_add(Weight::from_parts(164_874_498, 0).saturating_mul(r.into())) + // Minimum execution time: 373_491 nanoseconds. + Weight::from_parts(499_112_918, 0) + // Standard Error: 764_504 + .saturating_add(Weight::from_parts(155_725_717, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -455,10 +455,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `708 + r * (480 ±0)` // Estimated: `0` - // Minimum execution time: 370_661 nanoseconds. - Weight::from_parts(464_743_072, 0) - // Standard Error: 389_720 - .saturating_add(Weight::from_parts(34_707_919, 0).saturating_mul(r.into())) + // Minimum execution time: 371_591 nanoseconds. + Weight::from_parts(426_646_447, 0) + // Standard Error: 343_272 + .saturating_add(Weight::from_parts(37_975_153, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -477,10 +477,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `706 + r * (480 ±0)` // Estimated: `0` - // Minimum execution time: 373_821 nanoseconds. - Weight::from_parts(457_544_246, 0) - // Standard Error: 342_484 - .saturating_add(Weight::from_parts(37_066_167, 0).saturating_mul(r.into())) + // Minimum execution time: 372_871 nanoseconds. + Weight::from_parts(450_665_253, 0) + // Standard Error: 307_247 + .saturating_add(Weight::from_parts(37_130_906, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -499,10 +499,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `703 + r * (480 ±0)` // Estimated: `0` - // Minimum execution time: 372_531 nanoseconds. - Weight::from_parts(461_517_147, 0) - // Standard Error: 423_642 - .saturating_add(Weight::from_parts(37_619_649, 0).saturating_mul(r.into())) + // Minimum execution time: 374_371 nanoseconds. + Weight::from_parts(457_610_635, 0) + // Standard Error: 320_428 + .saturating_add(Weight::from_parts(36_685_913, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -521,10 +521,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `694 + r * (480 ±0)` // Estimated: `0` - // Minimum execution time: 373_951 nanoseconds. - Weight::from_parts(471_348_887, 0) - // Standard Error: 461_267 - .saturating_add(Weight::from_parts(35_572_043, 0).saturating_mul(r.into())) + // Minimum execution time: 374_341 nanoseconds. + Weight::from_parts(466_707_132, 0) + // Standard Error: 401_912 + .saturating_add(Weight::from_parts(36_811_378, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -545,10 +545,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `809 + r * (800 ±0)` // Estimated: `0` - // Minimum execution time: 373_160 nanoseconds. - Weight::from_parts(476_375_827, 0) - // Standard Error: 703_470 - .saturating_add(Weight::from_parts(159_986_083, 0).saturating_mul(r.into())) + // Minimum execution time: 374_241 nanoseconds. + Weight::from_parts(488_008_780, 0) + // Standard Error: 627_301 + .saturating_add(Weight::from_parts(120_052_624, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -567,10 +567,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `661 + r * (320 ±0)` // Estimated: `0` - // Minimum execution time: 196_551 nanoseconds. - Weight::from_parts(236_901_120, 0) - // Standard Error: 246_159 - .saturating_add(Weight::from_parts(16_806_917, 0).saturating_mul(r.into())) + // Minimum execution time: 196_541 nanoseconds. + Weight::from_parts(226_541_621, 0) + // Standard Error: 226_852 + .saturating_add(Weight::from_parts(17_352_255, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -589,10 +589,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `696 + r * (480 ±0)` // Estimated: `0` - // Minimum execution time: 373_561 nanoseconds. - Weight::from_parts(456_913_040, 0) - // Standard Error: 381_825 - .saturating_add(Weight::from_parts(32_528_974, 0).saturating_mul(r.into())) + // Minimum execution time: 373_351 nanoseconds. + Weight::from_parts(461_516_483, 0) + // Standard Error: 304_494 + .saturating_add(Weight::from_parts(33_051_375, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -611,10 +611,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `1176` // Estimated: `0` - // Minimum execution time: 405_761 nanoseconds. - Weight::from_parts(469_301_224, 0) - // Standard Error: 28_817 - .saturating_add(Weight::from_parts(12_130_953, 0).saturating_mul(n.into())) + // Minimum execution time: 406_501 nanoseconds. + Weight::from_parts(375_214_805, 0) + // Standard Error: 132_000 + .saturating_add(Weight::from_parts(16_653_138, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -633,10 +633,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `684 + r * (8 ±0)` // Estimated: `0` - // Minimum execution time: 368_561 nanoseconds. - Weight::from_parts(451_273_430, 0) - // Standard Error: 6_515_716 - .saturating_add(Weight::from_parts(482_669, 0).saturating_mul(r.into())) + // Minimum execution time: 369_111 nanoseconds. + Weight::from_parts(457_587_624, 0) + // Standard Error: 7_886_413 + .saturating_add(Weight::from_parts(20_295_175, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -655,10 +655,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `694` // Estimated: `0` - // Minimum execution time: 370_231 nanoseconds. - Weight::from_parts(465_472_667, 0) - // Standard Error: 15_743 - .saturating_add(Weight::from_parts(253_489, 0).saturating_mul(n.into())) + // Minimum execution time: 371_441 nanoseconds. + Weight::from_parts(463_508_954, 0) + // Standard Error: 7_361 + .saturating_add(Weight::from_parts(329_068, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -681,10 +681,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `726 + r * (285 ±0)` // Estimated: `0` - // Minimum execution time: 372_101 nanoseconds. - Weight::from_parts(448_849_726, 0) - // Standard Error: 5_514_552 - .saturating_add(Weight::from_parts(93_040_573, 0).saturating_mul(r.into())) + // Minimum execution time: 372_701 nanoseconds. + Weight::from_parts(462_025_332, 0) + // Standard Error: 7_047_477 + .saturating_add(Weight::from_parts(127_317_567, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().reads((5_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3)) @@ -707,10 +707,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `775 + r * (800 ±0)` // Estimated: `0` - // Minimum execution time: 373_251 nanoseconds. - Weight::from_parts(459_699_605, 0) - // Standard Error: 727_496 - .saturating_add(Weight::from_parts(205_088_259, 0).saturating_mul(r.into())) + // Minimum execution time: 374_991 nanoseconds. + Weight::from_parts(498_662_174, 0) + // Standard Error: 766_411 + .saturating_add(Weight::from_parts(199_784_446, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -729,10 +729,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `694 + r * (800 ±0)` // Estimated: `0` - // Minimum execution time: 370_051 nanoseconds. - Weight::from_parts(438_086_622, 0) - // Standard Error: 790_178 - .saturating_add(Weight::from_parts(397_599_297, 0).saturating_mul(r.into())) + // Minimum execution time: 371_391 nanoseconds. + Weight::from_parts(475_602_737, 0) + // Standard Error: 1_010_592 + .saturating_add(Weight::from_parts(402_326_784, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -752,12 +752,12 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `1630 + t * (2608 ±0) + n * (8 ±0)` // Estimated: `0` - // Minimum execution time: 1_802_725 nanoseconds. - Weight::from_parts(852_897_158, 0) - // Standard Error: 3_127_556 - .saturating_add(Weight::from_parts(302_274_453, 0).saturating_mul(t.into())) - // Standard Error: 858_978 - .saturating_add(Weight::from_parts(106_450_863, 0).saturating_mul(n.into())) + // Minimum execution time: 1_795_546 nanoseconds. + Weight::from_parts(894_921_942, 0) + // Standard Error: 3_151_542 + .saturating_add(Weight::from_parts(315_361_325, 0).saturating_mul(t.into())) + // Standard Error: 865_566 + .saturating_add(Weight::from_parts(109_354_566, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().reads((80_u64).saturating_mul(t.into()))) .saturating_add(T::DbWeight::get().writes(3)) @@ -778,10 +778,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `693 + r * (800 ±0)` // Estimated: `0` - // Minimum execution time: 211_790 nanoseconds. - Weight::from_parts(253_046_166, 0) - // Standard Error: 233_833 - .saturating_add(Weight::from_parts(26_380_907, 0).saturating_mul(r.into())) + // Minimum execution time: 211_860 nanoseconds. + Weight::from_parts(256_492_987, 0) + // Standard Error: 258_569 + .saturating_add(Weight::from_parts(28_279_258, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -792,10 +792,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `720 + r * (23420 ±0)` // Estimated: `0` - // Minimum execution time: 373_161 nanoseconds. - Weight::from_parts(342_179_957, 0) - // Standard Error: 2_706_339 - .saturating_add(Weight::from_parts(785_547_282, 0).saturating_mul(r.into())) + // Minimum execution time: 372_731 nanoseconds. + Weight::from_parts(230_042_914, 0) + // Standard Error: 3_946_397 + .saturating_add(Weight::from_parts(850_235_792, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().reads((80_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3)) @@ -808,10 +808,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `12402 + n * (12006 ±0)` // Estimated: `0` - // Minimum execution time: 595_541 nanoseconds. - Weight::from_parts(1_021_154_936, 0) - // Standard Error: 3_184_757 - .saturating_add(Weight::from_parts(160_421_420, 0).saturating_mul(n.into())) + // Minimum execution time: 599_732 nanoseconds. + Weight::from_parts(1_041_267_009, 0) + // Standard Error: 3_072_249 + .saturating_add(Weight::from_parts(167_808_462, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(52)) .saturating_add(T::DbWeight::get().reads((7_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(50)) @@ -824,10 +824,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `14990 + n * (175775 ±0)` // Estimated: `0` - // Minimum execution time: 593_591 nanoseconds. - Weight::from_parts(963_969_421, 0) - // Standard Error: 2_784_028 - .saturating_add(Weight::from_parts(120_308_782, 0).saturating_mul(n.into())) + // Minimum execution time: 598_312 nanoseconds. + Weight::from_parts(986_952_331, 0) + // Standard Error: 2_862_138 + .saturating_add(Weight::from_parts(122_582_746, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(51)) .saturating_add(T::DbWeight::get().reads((7_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(49)) @@ -840,10 +840,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `720 + r * (23100 ±0)` // Estimated: `0` - // Minimum execution time: 376_051 nanoseconds. - Weight::from_parts(333_556_076, 0) - // Standard Error: 2_485_494 - .saturating_add(Weight::from_parts(765_161_529, 0).saturating_mul(r.into())) + // Minimum execution time: 376_741 nanoseconds. + Weight::from_parts(221_395_468, 0) + // Standard Error: 3_217_492 + .saturating_add(Weight::from_parts(837_290_505, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().reads((80_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3)) @@ -856,10 +856,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `14670 + n * (175775 ±0)` // Estimated: `0` - // Minimum execution time: 543_432 nanoseconds. - Weight::from_parts(934_552_910, 0) - // Standard Error: 2_935_698 - .saturating_add(Weight::from_parts(120_632_071, 0).saturating_mul(n.into())) + // Minimum execution time: 547_492 nanoseconds. + Weight::from_parts(1_013_256_948, 0) + // Standard Error: 3_447_891 + .saturating_add(Weight::from_parts(116_759_554, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(51)) .saturating_add(T::DbWeight::get().reads((7_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(48)) @@ -872,10 +872,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `730 + r * (23740 ±0)` // Estimated: `0` - // Minimum execution time: 374_881 nanoseconds. - Weight::from_parts(376_682_471, 0) - // Standard Error: 2_163_407 - .saturating_add(Weight::from_parts(645_678_089, 0).saturating_mul(r.into())) + // Minimum execution time: 377_442 nanoseconds. + Weight::from_parts(410_271_744, 0) + // Standard Error: 2_471_569 + .saturating_add(Weight::from_parts(667_706_422, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().reads((80_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3)) @@ -887,10 +887,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `15321 + n * (175775 ±0)` // Estimated: `0` - // Minimum execution time: 514_911 nanoseconds. - Weight::from_parts(901_753_961, 0) - // Standard Error: 3_073_152 - .saturating_add(Weight::from_parts(268_092_838, 0).saturating_mul(n.into())) + // Minimum execution time: 513_942 nanoseconds. + Weight::from_parts(918_181_187, 0) + // Standard Error: 3_184_526 + .saturating_add(Weight::from_parts(288_276_116, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(51)) .saturating_add(T::DbWeight::get().reads((7_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(3)) @@ -902,10 +902,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `723 + r * (23100 ±0)` // Estimated: `0` - // Minimum execution time: 375_781 nanoseconds. - Weight::from_parts(376_656_280, 0) - // Standard Error: 1_745_890 - .saturating_add(Weight::from_parts(609_711_562, 0).saturating_mul(r.into())) + // Minimum execution time: 377_101 nanoseconds. + Weight::from_parts(408_041_801, 0) + // Standard Error: 2_513_320 + .saturating_add(Weight::from_parts(638_041_873, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().reads((80_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3)) @@ -917,10 +917,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `14673 + n * (175775 ±0)` // Estimated: `0` - // Minimum execution time: 505_481 nanoseconds. - Weight::from_parts(827_166_600, 0) - // Standard Error: 2_292_810 - .saturating_add(Weight::from_parts(114_430_176, 0).saturating_mul(n.into())) + // Minimum execution time: 505_062 nanoseconds. + Weight::from_parts(830_145_171, 0) + // Standard Error: 2_424_530 + .saturating_add(Weight::from_parts(123_975_903, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(51)) .saturating_add(T::DbWeight::get().reads((7_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(3)) @@ -932,10 +932,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `731 + r * (23740 ±0)` // Estimated: `0` - // Minimum execution time: 375_801 nanoseconds. - Weight::from_parts(345_672_663, 0) - // Standard Error: 2_690_704 - .saturating_add(Weight::from_parts(811_617_030, 0).saturating_mul(r.into())) + // Minimum execution time: 376_261 nanoseconds. + Weight::from_parts(341_638_863, 0) + // Standard Error: 2_683_436 + .saturating_add(Weight::from_parts(808_859_154, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().reads((80_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3)) @@ -948,10 +948,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `15322 + n * (175775 ±0)` // Estimated: `0` - // Minimum execution time: 549_851 nanoseconds. - Weight::from_parts(953_956_973, 0) - // Standard Error: 3_160_926 - .saturating_add(Weight::from_parts(287_644_412, 0).saturating_mul(n.into())) + // Minimum execution time: 553_242 nanoseconds. + Weight::from_parts(949_041_161, 0) + // Standard Error: 3_234_437 + .saturating_add(Weight::from_parts(291_728_056, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(51)) .saturating_add(T::DbWeight::get().reads((7_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(48)) @@ -972,10 +972,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `1322 + r * (3601 ±0)` // Estimated: `0` - // Minimum execution time: 376_691 nanoseconds. - Weight::from_parts(395_809_124, 0) - // Standard Error: 2_965_424 - .saturating_add(Weight::from_parts(2_320_023_998, 0).saturating_mul(r.into())) + // Minimum execution time: 377_072 nanoseconds. + Weight::from_parts(149_523_628, 0) + // Standard Error: 2_836_463 + .saturating_add(Weight::from_parts(2_343_177_901, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().reads((80_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(4)) @@ -996,10 +996,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `948 + r * (20495 ±0)` // Estimated: `0` - // Minimum execution time: 376_431 nanoseconds. - Weight::from_parts(381_331_000, 0) - // Standard Error: 29_375_102 - .saturating_add(Weight::from_parts(33_644_863_948, 0).saturating_mul(r.into())) + // Minimum execution time: 377_371 nanoseconds. + Weight::from_parts(399_671_000, 0) + // Standard Error: 34_770_460 + .saturating_add(Weight::from_parts(33_594_746_691, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().reads((160_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3)) @@ -1020,10 +1020,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `0 + r * (71670 ±0)` // Estimated: `0` - // Minimum execution time: 378_351 nanoseconds. - Weight::from_parts(433_201_000, 0) - // Standard Error: 22_581_471 - .saturating_add(Weight::from_parts(33_215_908_203, 0).saturating_mul(r.into())) + // Minimum execution time: 380_351 nanoseconds. + Weight::from_parts(441_931_000, 0) + // Standard Error: 25_033_346 + .saturating_add(Weight::from_parts(33_258_234_459, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().reads((150_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3)) @@ -1045,12 +1045,12 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `21128 + t * (15897 ±0)` // Estimated: `0` - // Minimum execution time: 17_107_858 nanoseconds. - Weight::from_parts(16_043_302_144, 0) - // Standard Error: 58_116_472 - .saturating_add(Weight::from_parts(1_846_422_945, 0).saturating_mul(t.into())) - // Standard Error: 87_142 - .saturating_add(Weight::from_parts(13_152_589, 0).saturating_mul(c.into())) + // Minimum execution time: 16_285_648 nanoseconds. + Weight::from_parts(15_396_101_814, 0) + // Standard Error: 94_535_254 + .saturating_add(Weight::from_parts(2_070_451_758, 0).saturating_mul(t.into())) + // Standard Error: 141_750 + .saturating_add(Weight::from_parts(17_431_226, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(167)) .saturating_add(T::DbWeight::get().reads((81_u64).saturating_mul(t.into()))) .saturating_add(T::DbWeight::get().writes(163)) @@ -1075,10 +1075,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `1512 + r * (25573 ±0)` // Estimated: `0` - // Minimum execution time: 381_671 nanoseconds. - Weight::from_parts(443_361_000, 0) - // Standard Error: 56_475_539 - .saturating_add(Weight::from_parts(43_697_686_582, 0).saturating_mul(r.into())) + // Minimum execution time: 384_711 nanoseconds. + Weight::from_parts(450_071_000, 0) + // Standard Error: 51_397_155 + .saturating_add(Weight::from_parts(44_429_717_226, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().reads((400_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(5)) @@ -1105,12 +1105,12 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `5505 + t * (68 ±0)` // Estimated: `0` - // Minimum execution time: 189_683_742 nanoseconds. - Weight::from_parts(191_893_498_000, 0) - // Standard Error: 1_450_448 - .saturating_add(Weight::from_parts(109_556_339, 0).saturating_mul(i.into())) - // Standard Error: 1_450_448 - .saturating_add(Weight::from_parts(105_093_613, 0).saturating_mul(s.into())) + // Minimum execution time: 194_548_501 nanoseconds. + Weight::from_parts(4_060_894_991, 0) + // Standard Error: 622_337 + .saturating_add(Weight::from_parts(213_591_750, 0).saturating_mul(i.into())) + // Standard Error: 622_337 + .saturating_add(Weight::from_parts(212_989_598, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(249)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(t.into()))) .saturating_add(T::DbWeight::get().writes(247)) @@ -1131,10 +1131,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `691 + r * (642 ±0)` // Estimated: `0` - // Minimum execution time: 370_911 nanoseconds. - Weight::from_parts(454_911_953, 0) - // Standard Error: 6_307_367 - .saturating_add(Weight::from_parts(33_770_346, 0).saturating_mul(r.into())) + // Minimum execution time: 372_521 nanoseconds. + Weight::from_parts(449_893_040, 0) + // Standard Error: 4_996_487 + .saturating_add(Weight::from_parts(19_002_459, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -1153,10 +1153,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `1493` // Estimated: `0` - // Minimum execution time: 419_851 nanoseconds. - Weight::from_parts(563_700_369, 0) - // Standard Error: 86_058 - .saturating_add(Weight::from_parts(79_816_436, 0).saturating_mul(n.into())) + // Minimum execution time: 484_881 nanoseconds. + Weight::from_parts(71_387_344, 0) + // Standard Error: 113_883 + .saturating_add(Weight::from_parts(84_883_773, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -1175,10 +1175,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `693 + r * (642 ±0)` // Estimated: `0` - // Minimum execution time: 370_391 nanoseconds. - Weight::from_parts(443_662_740, 0) - // Standard Error: 6_359_305 - .saturating_add(Weight::from_parts(123_904_859, 0).saturating_mul(r.into())) + // Minimum execution time: 372_131 nanoseconds. + Weight::from_parts(451_030_430, 0) + // Standard Error: 5_371_296 + .saturating_add(Weight::from_parts(122_296_569, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -1197,10 +1197,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `1495` // Estimated: `0` - // Minimum execution time: 453_621 nanoseconds. - Weight::from_parts(510_883_151, 0) - // Standard Error: 328_339 - .saturating_add(Weight::from_parts(334_185_553, 0).saturating_mul(n.into())) + // Minimum execution time: 454_411 nanoseconds. + Weight::from_parts(993_751_647, 0) + // Standard Error: 294_683 + .saturating_add(Weight::from_parts(331_605_187, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -1219,10 +1219,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `693 + r * (642 ±0)` // Estimated: `0` - // Minimum execution time: 369_611 nanoseconds. - Weight::from_parts(447_081_130, 0) - // Standard Error: 6_014_639 - .saturating_add(Weight::from_parts(707_866_169, 0).saturating_mul(r.into())) + // Minimum execution time: 370_021 nanoseconds. + Weight::from_parts(440_257_293, 0) + // Standard Error: 4_816_693 + .saturating_add(Weight::from_parts(77_099_306, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -1241,10 +1241,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `1495` // Estimated: `0` - // Minimum execution time: 535_971 nanoseconds. - Weight::from_parts(963_976_677, 0) - // Standard Error: 185_438 - .saturating_add(Weight::from_parts(145_209_174, 0).saturating_mul(n.into())) + // Minimum execution time: 426_202 nanoseconds. + Weight::from_parts(154_821_872, 0) + // Standard Error: 190_477 + .saturating_add(Weight::from_parts(150_086_142, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -1263,10 +1263,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `693 + r * (642 ±0)` // Estimated: `0` - // Minimum execution time: 369_141 nanoseconds. - Weight::from_parts(450_974_714, 0) - // Standard Error: 6_233_732 - .saturating_add(Weight::from_parts(103_403_485, 0).saturating_mul(r.into())) + // Minimum execution time: 370_912 nanoseconds. + Weight::from_parts(448_571_518, 0) + // Standard Error: 6_139_889 + .saturating_add(Weight::from_parts(46_192_881, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -1285,10 +1285,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `1495` // Estimated: `0` - // Minimum execution time: 425_391 nanoseconds. - Weight::from_parts(535_996_920, 0) - // Standard Error: 128_427 - .saturating_add(Weight::from_parts(145_977_335, 0).saturating_mul(n.into())) + // Minimum execution time: 488_671 nanoseconds. + Weight::from_parts(354_675_705, 0) + // Standard Error: 236_238 + .saturating_add(Weight::from_parts(149_911_872, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -1307,10 +1307,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `737 + r * (6083 ±0)` // Estimated: `0` - // Minimum execution time: 374_071 nanoseconds. - Weight::from_parts(448_879_583, 0) - // Standard Error: 6_289_470 - .saturating_add(Weight::from_parts(5_364_455_516, 0).saturating_mul(r.into())) + // Minimum execution time: 374_731 nanoseconds. + Weight::from_parts(477_645_804, 0) + // Standard Error: 12_318_019 + .saturating_add(Weight::from_parts(5_533_639_795, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -1329,10 +1329,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `706 + r * (3362 ±0)` // Estimated: `0` - // Minimum execution time: 373_781 nanoseconds. - Weight::from_parts(465_446_085, 0) - // Standard Error: 8_340_917 - .saturating_add(Weight::from_parts(1_305_631_914, 0).saturating_mul(r.into())) + // Minimum execution time: 373_521 nanoseconds. + Weight::from_parts(454_466_355, 0) + // Standard Error: 7_035_392 + .saturating_add(Weight::from_parts(1_209_092_744, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -1353,10 +1353,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `0 + r * (79300 ±0)` // Estimated: `0` - // Minimum execution time: 374_451 nanoseconds. - Weight::from_parts(437_481_000, 0) - // Standard Error: 9_632_424 - .saturating_add(Weight::from_parts(2_866_065_318, 0).saturating_mul(r.into())) + // Minimum execution time: 375_061 nanoseconds. + Weight::from_parts(378_341_000, 0) + // Standard Error: 9_818_609 + .saturating_add(Weight::from_parts(2_879_919_540, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().reads((225_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3)) @@ -1377,10 +1377,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `689 + r * (240 ±0)` // Estimated: `0` - // Minimum execution time: 376_041 nanoseconds. - Weight::from_parts(455_809_468, 0) - // Standard Error: 314_547 - .saturating_add(Weight::from_parts(22_290_995, 0).saturating_mul(r.into())) + // Minimum execution time: 376_911 nanoseconds. + Weight::from_parts(463_446_143, 0) + // Standard Error: 289_509 + .saturating_add(Weight::from_parts(20_676_850, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -1399,10 +1399,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `1387 + r * (3140 ±0)` // Estimated: `0` - // Minimum execution time: 379_831 nanoseconds. - Weight::from_parts(561_378_274, 0) - // Standard Error: 429_319 - .saturating_add(Weight::from_parts(34_733_895, 0).saturating_mul(r.into())) + // Minimum execution time: 382_971 nanoseconds. + Weight::from_parts(584_876_450, 0) + // Standard Error: 439_954 + .saturating_add(Weight::from_parts(34_366_738, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -1423,10 +1423,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `692 + r * (240 ±0)` // Estimated: `0` - // Minimum execution time: 373_671 nanoseconds. - Weight::from_parts(475_085_212, 0) - // Standard Error: 380_687 - .saturating_add(Weight::from_parts(16_409_940, 0).saturating_mul(r.into())) + // Minimum execution time: 374_531 nanoseconds. + Weight::from_parts(458_152_912, 0) + // Standard Error: 305_426 + .saturating_add(Weight::from_parts(16_795_590, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -1435,450 +1435,450 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_660 nanoseconds. - Weight::from_parts(3_168_062, 0) - // Standard Error: 5_526 - .saturating_add(Weight::from_parts(571_579, 0).saturating_mul(r.into())) + // Minimum execution time: 1_680 nanoseconds. + Weight::from_parts(2_580_043, 0) + // Standard Error: 5_617 + .saturating_add(Weight::from_parts(595_623, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64load(r: u32) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_710 nanoseconds. - Weight::from_parts(4_516_931, 0) - // Standard Error: 83_416 - .saturating_add(Weight::from_parts(2_087_407, 0).saturating_mul(r.into())) + // Minimum execution time: 1_990 nanoseconds. + Weight::from_parts(11_386_710, 0) + // Standard Error: 31_531 + .saturating_add(Weight::from_parts(1_717_335, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64store(r: u32) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_760 nanoseconds. - Weight::from_parts(7_877_061, 0) - // Standard Error: 15_747 - .saturating_add(Weight::from_parts(1_609_519, 0).saturating_mul(r.into())) + // Minimum execution time: 1_970 nanoseconds. + Weight::from_parts(8_996_748, 0) + // Standard Error: 16_297 + .saturating_add(Weight::from_parts(1_592_374, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_select(r: u32) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_500 nanoseconds. - Weight::from_parts(2_958_548, 0) - // Standard Error: 15_164 - .saturating_add(Weight::from_parts(1_568_447, 0).saturating_mul(r.into())) + // Minimum execution time: 1_530 nanoseconds. + Weight::from_parts(2_694_583, 0) + // Standard Error: 12_481 + .saturating_add(Weight::from_parts(1_566_395, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_if(r: u32) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_470 nanoseconds. - Weight::from_parts(1_996_972, 0) - // Standard Error: 14_597 - .saturating_add(Weight::from_parts(1_953_898, 0).saturating_mul(r.into())) + // Minimum execution time: 1_650 nanoseconds. + Weight::from_parts(3_180_441, 0) + // Standard Error: 15_341 + .saturating_add(Weight::from_parts(2_217_620, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_br(r: u32) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_590 nanoseconds. - Weight::from_parts(1_766_553, 0) - // Standard Error: 8_065 - .saturating_add(Weight::from_parts(963_351, 0).saturating_mul(r.into())) + // Minimum execution time: 1_640 nanoseconds. + Weight::from_parts(1_182_725, 0) + // Standard Error: 7_627 + .saturating_add(Weight::from_parts(1_005_510, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_br_if(r: u32) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_500 nanoseconds. - Weight::from_parts(1_416_954, 0) - // Standard Error: 11_542 - .saturating_add(Weight::from_parts(1_325_071, 0).saturating_mul(r.into())) + // Minimum execution time: 1_470 nanoseconds. + Weight::from_parts(2_510_975, 0) + // Standard Error: 10_084 + .saturating_add(Weight::from_parts(1_308_464, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_br_table(r: u32) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_570 nanoseconds. - Weight::from_parts(1_345_137, 0) - // Standard Error: 12_050 - .saturating_add(Weight::from_parts(1_695_664, 0).saturating_mul(r.into())) + // Minimum execution time: 1_500 nanoseconds. + Weight::from_parts(1_362_646, 0) + // Standard Error: 12_297 + .saturating_add(Weight::from_parts(1_721_594, 0).saturating_mul(r.into())) } /// The range of component `e` is `[1, 256]`. fn instr_br_table_per_entry(e: u32) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_530 nanoseconds. - Weight::from_parts(6_821_544, 0) - // Standard Error: 369 - .saturating_add(Weight::from_parts(5_216, 0).saturating_mul(e.into())) + // Minimum execution time: 5_710 nanoseconds. + Weight::from_parts(6_651_413, 0) + // Standard Error: 378 + .saturating_add(Weight::from_parts(6_005, 0).saturating_mul(e.into())) } /// The range of component `r` is `[0, 50]`. fn instr_call(r: u32) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_520 nanoseconds. - Weight::from_parts(3_273_726, 0) - // Standard Error: 36_533 - .saturating_add(Weight::from_parts(5_189_851, 0).saturating_mul(r.into())) + // Minimum execution time: 1_710 nanoseconds. + Weight::from_parts(6_173_711, 0) + // Standard Error: 36_224 + .saturating_add(Weight::from_parts(4_883_881, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_call_indirect(r: u32) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_880 nanoseconds. - Weight::from_parts(14_122_632, 0) - // Standard Error: 44_455 - .saturating_add(Weight::from_parts(5_295_954, 0).saturating_mul(r.into())) + // Minimum execution time: 1_850 nanoseconds. + Weight::from_parts(12_973_120, 0) + // Standard Error: 48_647 + .saturating_add(Weight::from_parts(5_532_186, 0).saturating_mul(r.into())) } /// The range of component `p` is `[0, 128]`. fn instr_call_indirect_per_param(p: u32) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 7_470 nanoseconds. - Weight::from_parts(14_922_938, 0) - // Standard Error: 5_230 - .saturating_add(Weight::from_parts(291_823, 0).saturating_mul(p.into())) + // Minimum execution time: 7_730 nanoseconds. + Weight::from_parts(12_611_308, 0) + // Standard Error: 3_590 + .saturating_add(Weight::from_parts(290_374, 0).saturating_mul(p.into())) } /// The range of component `l` is `[0, 1024]`. fn instr_call_per_local(l: u32) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_180 nanoseconds. - Weight::from_parts(8_670_245, 0) - // Standard Error: 751 - .saturating_add(Weight::from_parts(85_677, 0).saturating_mul(l.into())) + // Minimum execution time: 5_430 nanoseconds. + Weight::from_parts(7_769_593, 0) + // Standard Error: 771 + .saturating_add(Weight::from_parts(88_477, 0).saturating_mul(l.into())) } /// The range of component `r` is `[0, 50]`. fn instr_local_get(r: u32) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_660 nanoseconds. - Weight::from_parts(4_891_829, 0) - // Standard Error: 7_656 - .saturating_add(Weight::from_parts(771_850, 0).saturating_mul(r.into())) + // Minimum execution time: 3_790 nanoseconds. + Weight::from_parts(5_160_298, 0) + // Standard Error: 6_314 + .saturating_add(Weight::from_parts(741_711, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_local_set(r: u32) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_620 nanoseconds. - Weight::from_parts(4_735_955, 0) - // Standard Error: 9_087 - .saturating_add(Weight::from_parts(1_078_303, 0).saturating_mul(r.into())) + // Minimum execution time: 3_831 nanoseconds. + Weight::from_parts(3_763_733, 0) + // Standard Error: 9_676 + .saturating_add(Weight::from_parts(1_138_182, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_local_tee(r: u32) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_270 nanoseconds. - Weight::from_parts(4_593_509, 0) - // Standard Error: 11_409 - .saturating_add(Weight::from_parts(1_326_807, 0).saturating_mul(r.into())) + // Minimum execution time: 3_950 nanoseconds. + Weight::from_parts(4_489_910, 0) + // Standard Error: 11_541 + .saturating_add(Weight::from_parts(1_362_339, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_global_get(r: u32) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_570 nanoseconds. - Weight::from_parts(4_167_653, 0) - // Standard Error: 16_230 - .saturating_add(Weight::from_parts(1_524_288, 0).saturating_mul(r.into())) + // Minimum execution time: 1_810 nanoseconds. + Weight::from_parts(3_745_176, 0) + // Standard Error: 12_338 + .saturating_add(Weight::from_parts(1_437_795, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_global_set(r: u32) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_760 nanoseconds. - Weight::from_parts(1_918_192, 0) - // Standard Error: 15_384 - .saturating_add(Weight::from_parts(1_829_680, 0).saturating_mul(r.into())) + // Minimum execution time: 1_630 nanoseconds. + Weight::from_parts(3_413_607, 0) + // Standard Error: 14_311 + .saturating_add(Weight::from_parts(1_812_119, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_memory_current(r: u32) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_900 nanoseconds. - Weight::from_parts(3_163_935, 0) - // Standard Error: 10_556 - .saturating_add(Weight::from_parts(1_329_884, 0).saturating_mul(r.into())) + // Minimum execution time: 1_920 nanoseconds. + Weight::from_parts(3_171_429, 0) + // Standard Error: 12_191 + .saturating_add(Weight::from_parts(1_256_399, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 1]`. fn instr_memory_grow(r: u32) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_650 nanoseconds. - Weight::from_parts(1_910_965, 0) - // Standard Error: 590_041 - .saturating_add(Weight::from_parts(273_492_034, 0).saturating_mul(r.into())) + // Minimum execution time: 1_720 nanoseconds. + Weight::from_parts(1_969_065, 0) + // Standard Error: 1_007_166 + .saturating_add(Weight::from_parts(377_371_234, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64clz(r: u32) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_650 nanoseconds. - Weight::from_parts(3_501_879, 0) - // Standard Error: 10_283 - .saturating_add(Weight::from_parts(869_051, 0).saturating_mul(r.into())) + // Minimum execution time: 1_630 nanoseconds. + Weight::from_parts(3_355_511, 0) + // Standard Error: 7_730 + .saturating_add(Weight::from_parts(858_685, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64ctz(r: u32) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_650 nanoseconds. - Weight::from_parts(3_304_482, 0) - // Standard Error: 11_321 - .saturating_add(Weight::from_parts(885_112, 0).saturating_mul(r.into())) + // Minimum execution time: 1_540 nanoseconds. + Weight::from_parts(3_129_105, 0) + // Standard Error: 7_753 + .saturating_add(Weight::from_parts(861_739, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64popcnt(r: u32) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_610 nanoseconds. - Weight::from_parts(2_855_883, 0) - // Standard Error: 7_818 - .saturating_add(Weight::from_parts(881_952, 0).saturating_mul(r.into())) + // Minimum execution time: 1_520 nanoseconds. + Weight::from_parts(3_737_679, 0) + // Standard Error: 7_624 + .saturating_add(Weight::from_parts(831_018, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64eqz(r: u32) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_470 nanoseconds. - Weight::from_parts(3_726_969, 0) - // Standard Error: 7_884 - .saturating_add(Weight::from_parts(840_088, 0).saturating_mul(r.into())) + // Minimum execution time: 1_510 nanoseconds. + Weight::from_parts(2_877_812, 0) + // Standard Error: 7_097 + .saturating_add(Weight::from_parts(848_356, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64extendsi32(r: u32) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_590 nanoseconds. - Weight::from_parts(3_127_941, 0) - // Standard Error: 9_901 - .saturating_add(Weight::from_parts(883_028, 0).saturating_mul(r.into())) + // Minimum execution time: 1_550 nanoseconds. + Weight::from_parts(2_198_188, 0) + // Standard Error: 7_192 + .saturating_add(Weight::from_parts(927_106, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64extendui32(r: u32) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_590 nanoseconds. - Weight::from_parts(2_898_727, 0) - // Standard Error: 9_739 - .saturating_add(Weight::from_parts(875_353, 0).saturating_mul(r.into())) + // Minimum execution time: 1_530 nanoseconds. + Weight::from_parts(3_524_104, 0) + // Standard Error: 6_868 + .saturating_add(Weight::from_parts(933_300, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i32wrapi64(r: u32) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_450 nanoseconds. - Weight::from_parts(3_491_418, 0) - // Standard Error: 7_092 - .saturating_add(Weight::from_parts(916_425, 0).saturating_mul(r.into())) + // Minimum execution time: 1_620 nanoseconds. + Weight::from_parts(3_721_589, 0) + // Standard Error: 7_239 + .saturating_add(Weight::from_parts(884_957, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64eq(r: u32) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_630 nanoseconds. - Weight::from_parts(2_829_404, 0) - // Standard Error: 9_690 - .saturating_add(Weight::from_parts(1_224_285, 0).saturating_mul(r.into())) + // Minimum execution time: 1_650 nanoseconds. + Weight::from_parts(3_753_855, 0) + // Standard Error: 10_085 + .saturating_add(Weight::from_parts(1_138_318, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64ne(r: u32) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_530 nanoseconds. - Weight::from_parts(4_770_101, 0) - // Standard Error: 11_181 - .saturating_add(Weight::from_parts(1_138_350, 0).saturating_mul(r.into())) + // Minimum execution time: 1_690 nanoseconds. + Weight::from_parts(3_514_477, 0) + // Standard Error: 9_860 + .saturating_add(Weight::from_parts(1_129_417, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64lts(r: u32) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_590 nanoseconds. - Weight::from_parts(2_647_931, 0) - // Standard Error: 11_363 - .saturating_add(Weight::from_parts(1_158_647, 0).saturating_mul(r.into())) + // Minimum execution time: 1_601 nanoseconds. + Weight::from_parts(2_668_329, 0) + // Standard Error: 9_109 + .saturating_add(Weight::from_parts(1_133_595, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64ltu(r: u32) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_650 nanoseconds. - Weight::from_parts(2_245_796, 0) - // Standard Error: 16_171 - .saturating_add(Weight::from_parts(1_209_505, 0).saturating_mul(r.into())) + // Minimum execution time: 1_620 nanoseconds. + Weight::from_parts(3_086_560, 0) + // Standard Error: 9_644 + .saturating_add(Weight::from_parts(1_136_912, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64gts(r: u32) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_580 nanoseconds. - Weight::from_parts(2_564_015, 0) - // Standard Error: 20_451 - .saturating_add(Weight::from_parts(1_193_100, 0).saturating_mul(r.into())) + // Minimum execution time: 1_680 nanoseconds. + Weight::from_parts(3_016_523, 0) + // Standard Error: 9_912 + .saturating_add(Weight::from_parts(1_156_442, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64gtu(r: u32) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_670 nanoseconds. - Weight::from_parts(1_616_329, 0) - // Standard Error: 14_490 - .saturating_add(Weight::from_parts(1_226_218, 0).saturating_mul(r.into())) + // Minimum execution time: 1_510 nanoseconds. + Weight::from_parts(3_747_047, 0) + // Standard Error: 9_269 + .saturating_add(Weight::from_parts(1_111_902, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64les(r: u32) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_630 nanoseconds. - Weight::from_parts(3_235_449, 0) - // Standard Error: 9_510 - .saturating_add(Weight::from_parts(1_130_045, 0).saturating_mul(r.into())) + // Minimum execution time: 1_610 nanoseconds. + Weight::from_parts(3_745_129, 0) + // Standard Error: 9_367 + .saturating_add(Weight::from_parts(1_114_915, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64leu(r: u32) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_640 nanoseconds. - Weight::from_parts(2_187_572, 0) - // Standard Error: 8_978 - .saturating_add(Weight::from_parts(1_146_713, 0).saturating_mul(r.into())) + // Minimum execution time: 1_450 nanoseconds. + Weight::from_parts(3_863_671, 0) + // Standard Error: 10_278 + .saturating_add(Weight::from_parts(1_129_344, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64ges(r: u32) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_480 nanoseconds. - Weight::from_parts(2_755_297, 0) - // Standard Error: 9_644 - .saturating_add(Weight::from_parts(1_147_002, 0).saturating_mul(r.into())) + // Minimum execution time: 1_490 nanoseconds. + Weight::from_parts(2_115_000, 0) + // Standard Error: 9_919 + .saturating_add(Weight::from_parts(1_172_745, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64geu(r: u32) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_520 nanoseconds. - Weight::from_parts(2_271_019, 0) - // Standard Error: 13_005 - .saturating_add(Weight::from_parts(1_173_251, 0).saturating_mul(r.into())) + // Minimum execution time: 1_500 nanoseconds. + Weight::from_parts(2_978_011, 0) + // Standard Error: 9_738 + .saturating_add(Weight::from_parts(1_142_209, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64add(r: u32) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_560 nanoseconds. - Weight::from_parts(4_637_066, 0) - // Standard Error: 10_643 - .saturating_add(Weight::from_parts(1_114_717, 0).saturating_mul(r.into())) + // Minimum execution time: 1_670 nanoseconds. + Weight::from_parts(2_819_907, 0) + // Standard Error: 9_845 + .saturating_add(Weight::from_parts(1_136_779, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64sub(r: u32) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_570 nanoseconds. - Weight::from_parts(2_885_717, 0) - // Standard Error: 16_282 - .saturating_add(Weight::from_parts(1_173_908, 0).saturating_mul(r.into())) + // Minimum execution time: 1_710 nanoseconds. + Weight::from_parts(3_882_976, 0) + // Standard Error: 9_852 + .saturating_add(Weight::from_parts(1_123_317, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64mul(r: u32) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_510 nanoseconds. - Weight::from_parts(2_930_571, 0) - // Standard Error: 12_242 - .saturating_add(Weight::from_parts(1_185_040, 0).saturating_mul(r.into())) + // Minimum execution time: 1_540 nanoseconds. + Weight::from_parts(3_242_475, 0) + // Standard Error: 9_582 + .saturating_add(Weight::from_parts(1_125_660, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64divs(r: u32) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_600 nanoseconds. - Weight::from_parts(1_624_233, 0) - // Standard Error: 16_359 - .saturating_add(Weight::from_parts(1_390_432, 0).saturating_mul(r.into())) + // Minimum execution time: 1_510 nanoseconds. + Weight::from_parts(3_521_333, 0) + // Standard Error: 9_033 + .saturating_add(Weight::from_parts(1_289_409, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64divu(r: u32) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_600 nanoseconds. - Weight::from_parts(2_410_271, 0) - // Standard Error: 16_801 - .saturating_add(Weight::from_parts(1_218_286, 0).saturating_mul(r.into())) + // Minimum execution time: 1_630 nanoseconds. + Weight::from_parts(3_353_761, 0) + // Standard Error: 10_405 + .saturating_add(Weight::from_parts(1_135_591, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64rems(r: u32) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_430 nanoseconds. - Weight::from_parts(3_137_425, 0) - // Standard Error: 10_578 - .saturating_add(Weight::from_parts(1_368_263, 0).saturating_mul(r.into())) + // Minimum execution time: 1_630 nanoseconds. + Weight::from_parts(3_967_717, 0) + // Standard Error: 9_817 + .saturating_add(Weight::from_parts(1_245_087, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64remu(r: u32) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_490 nanoseconds. - Weight::from_parts(2_270_098, 0) - // Standard Error: 12_685 - .saturating_add(Weight::from_parts(1_290_536, 0).saturating_mul(r.into())) + // Minimum execution time: 1_530 nanoseconds. + Weight::from_parts(3_641_209, 0) + // Standard Error: 9_268 + .saturating_add(Weight::from_parts(1_190_994, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64and(r: u32) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_510 nanoseconds. - Weight::from_parts(2_641_167, 0) - // Standard Error: 12_983 - .saturating_add(Weight::from_parts(1_186_671, 0).saturating_mul(r.into())) + // Minimum execution time: 1_690 nanoseconds. + Weight::from_parts(3_248_656, 0) + // Standard Error: 8_862 + .saturating_add(Weight::from_parts(1_132_534, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64or(r: u32) -> Weight { @@ -1886,49 +1886,49 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Measured: `0` // Estimated: `0` // Minimum execution time: 1_610 nanoseconds. - Weight::from_parts(3_370_887, 0) - // Standard Error: 9_813 - .saturating_add(Weight::from_parts(1_134_070, 0).saturating_mul(r.into())) + Weight::from_parts(2_963_671, 0) + // Standard Error: 9_662 + .saturating_add(Weight::from_parts(1_122_743, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64xor(r: u32) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_530 nanoseconds. - Weight::from_parts(2_956_547, 0) - // Standard Error: 10_113 - .saturating_add(Weight::from_parts(1_149_330, 0).saturating_mul(r.into())) + // Minimum execution time: 1_510 nanoseconds. + Weight::from_parts(2_527_883, 0) + // Standard Error: 9_556 + .saturating_add(Weight::from_parts(1_148_291, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64shl(r: u32) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_580 nanoseconds. - Weight::from_parts(2_991_547, 0) - // Standard Error: 15_007 - .saturating_add(Weight::from_parts(1_186_614, 0).saturating_mul(r.into())) + // Minimum execution time: 1_611 nanoseconds. + Weight::from_parts(4_494_670, 0) + // Standard Error: 10_063 + .saturating_add(Weight::from_parts(1_104_601, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64shrs(r: u32) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_670 nanoseconds. - Weight::from_parts(3_947_502, 0) - // Standard Error: 10_950 - .saturating_add(Weight::from_parts(1_132_980, 0).saturating_mul(r.into())) + // Minimum execution time: 1_680 nanoseconds. + Weight::from_parts(3_218_937, 0) + // Standard Error: 9_383 + .saturating_add(Weight::from_parts(1_129_981, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64shru(r: u32) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_470 nanoseconds. - Weight::from_parts(2_614_403, 0) - // Standard Error: 13_580 - .saturating_add(Weight::from_parts(1_190_584, 0).saturating_mul(r.into())) + // Minimum execution time: 1_530 nanoseconds. + Weight::from_parts(2_949_558, 0) + // Standard Error: 10_575 + .saturating_add(Weight::from_parts(1_205_527, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64rotl(r: u32) -> Weight { @@ -1936,18 +1936,18 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Measured: `0` // Estimated: `0` // Minimum execution time: 1_510 nanoseconds. - Weight::from_parts(2_626_456, 0) - // Standard Error: 11_759 - .saturating_add(Weight::from_parts(1_209_798, 0).saturating_mul(r.into())) + Weight::from_parts(4_608_725, 0) + // Standard Error: 12_089 + .saturating_add(Weight::from_parts(1_159_508, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64rotr(r: u32) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_560 nanoseconds. - Weight::from_parts(3_145_135, 0) - // Standard Error: 10_314 - .saturating_add(Weight::from_parts(1_163_468, 0).saturating_mul(r.into())) + // Minimum execution time: 1_610 nanoseconds. + Weight::from_parts(3_669_552, 0) + // Standard Error: 10_031 + .saturating_add(Weight::from_parts(1_149_825, 0).saturating_mul(r.into())) } } diff --git a/runtime/common/src/weights/pallet_democracy.rs b/runtime/common/src/weights/pallet_democracy.rs index a5f9fbf6b..a49a7fd1c 100644 --- a/runtime/common/src/weights/pallet_democracy.rs +++ b/runtime/common/src/weights/pallet_democracy.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_democracy //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: `2024-01-15`, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: `2024-04-02`, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `zeitgeist-benchmark`, CPU: `AMD EPYC 7601 32-Core Processor` //! EXECUTION: `Some(Wasm)`, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024` @@ -64,8 +64,8 @@ impl pallet_democracy::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `4835` // Estimated: `23413` - // Minimum execution time: 52_740 nanoseconds. - Weight::from_parts(64_651_000, 23413) + // Minimum execution time: 63_150 nanoseconds. + Weight::from_parts(74_631_000, 23413) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -75,8 +75,8 @@ impl pallet_democracy::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `3591` // Estimated: `5705` - // Minimum execution time: 44_080 nanoseconds. - Weight::from_parts(54_891_000, 5705) + // Minimum execution time: 49_741 nanoseconds. + Weight::from_parts(63_400_000, 5705) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -90,8 +90,8 @@ impl pallet_democracy::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `3500` // Estimated: `12732` - // Minimum execution time: 60_500 nanoseconds. - Weight::from_parts(74_880_000, 12732) + // Minimum execution time: 69_300 nanoseconds. + Weight::from_parts(88_280_000, 12732) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -105,8 +105,8 @@ impl pallet_democracy::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `3522` // Estimated: `12732` - // Minimum execution time: 60_861 nanoseconds. - Weight::from_parts(74_420_000, 12732) + // Minimum execution time: 70_990 nanoseconds. + Weight::from_parts(86_690_000, 12732) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -118,8 +118,8 @@ impl pallet_democracy::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `295` // Estimated: `5192` - // Minimum execution time: 25_880 nanoseconds. - Weight::from_parts(31_360_000, 5192) + // Minimum execution time: 29_430 nanoseconds. + Weight::from_parts(31_020_000, 5192) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -139,8 +139,8 @@ impl pallet_democracy::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `6251` // Estimated: `31427` - // Minimum execution time: 114_571 nanoseconds. - Weight::from_parts(117_761_000, 31427) + // Minimum execution time: 135_290 nanoseconds. + Weight::from_parts(159_370_000, 31427) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(7)) } @@ -152,8 +152,8 @@ impl pallet_democracy::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `3419` // Estimated: `6344` - // Minimum execution time: 23_560 nanoseconds. - Weight::from_parts(24_710_000, 6344) + // Minimum execution time: 23_790 nanoseconds. + Weight::from_parts(28_820_000, 6344) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -163,8 +163,8 @@ impl pallet_democracy::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_150 nanoseconds. - Weight::from_parts(5_440_000, 0).saturating_add(T::DbWeight::get().writes(1)) + // Minimum execution time: 5_520 nanoseconds. + Weight::from_parts(7_050_000, 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) @@ -172,8 +172,8 @@ impl pallet_democracy::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_170 nanoseconds. - Weight::from_parts(5_410_000, 0).saturating_add(T::DbWeight::get().writes(1)) + // Minimum execution time: 5_310 nanoseconds. + Weight::from_parts(6_460_000, 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) @@ -185,8 +185,8 @@ impl pallet_democracy::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `179` // Estimated: `1126` - // Minimum execution time: 25_400 nanoseconds. - Weight::from_parts(34_080_000, 1126) + // Minimum execution time: 28_370 nanoseconds. + Weight::from_parts(30_550_000, 1126) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -198,8 +198,8 @@ impl pallet_democracy::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `3448` // Estimated: `6344` - // Minimum execution time: 35_771 nanoseconds. - Weight::from_parts(40_850_000, 6344) + // Minimum execution time: 35_901 nanoseconds. + Weight::from_parts(43_380_000, 6344) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -213,8 +213,8 @@ impl pallet_democracy::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `6122` // Estimated: `28116` - // Minimum execution time: 94_010 nanoseconds. - Weight::from_parts(100_940_000, 28116) + // Minimum execution time: 98_561 nanoseconds. + Weight::from_parts(118_501_000, 28116) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -224,8 +224,8 @@ impl pallet_democracy::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 12_611 nanoseconds. - Weight::from_parts(15_100_000, 0).saturating_add(T::DbWeight::get().writes(1)) + // Minimum execution time: 12_741 nanoseconds. + Weight::from_parts(13_160_000, 0).saturating_add(T::DbWeight::get().writes(1)) } /// Storage: Democracy LowestUnbaked (r:1 w:1) /// Proof: Democracy LowestUnbaked (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) @@ -238,10 +238,10 @@ impl pallet_democracy::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `174 + r * (125 ±0)` // Estimated: `998 + r * (2684 ±0)` - // Minimum execution time: 13_280 nanoseconds. - Weight::from_parts(14_127_260, 998) - // Standard Error: 85_267 - .saturating_add(Weight::from_parts(4_607_877, 0).saturating_mul(r.into())) + // Minimum execution time: 12_941 nanoseconds. + Weight::from_parts(22_394_689, 998) + // Standard Error: 37_355 + .saturating_add(Weight::from_parts(4_770_133, 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)) @@ -264,10 +264,10 @@ impl pallet_democracy::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `174 + r * (125 ±0)` // Estimated: `19318 + r * (2684 ±0)` - // Minimum execution time: 16_280 nanoseconds. - Weight::from_parts(21_622_107, 19318) - // Standard Error: 37_442 - .saturating_add(Weight::from_parts(4_611_492, 0).saturating_mul(r.into())) + // Minimum execution time: 18_220 nanoseconds. + Weight::from_parts(36_055_104, 19318) + // Standard Error: 41_367 + .saturating_add(Weight::from_parts(4_489_765, 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)) @@ -284,10 +284,10 @@ impl pallet_democracy::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `897 + r * (147 ±0)` // Estimated: `22596 + r * (2684 ±0)` - // Minimum execution time: 57_840 nanoseconds. - Weight::from_parts(77_974_592, 22596) - // Standard Error: 82_756 - .saturating_add(Weight::from_parts(5_829_269, 0).saturating_mul(r.into())) + // Minimum execution time: 50_500 nanoseconds. + Weight::from_parts(77_734_503, 22596) + // Standard Error: 48_646 + .saturating_add(Weight::from_parts(5_805_049, 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)) @@ -303,10 +303,10 @@ impl pallet_democracy::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `522 + r * (147 ±0)` // Estimated: `12548 + r * (2684 ±0)` - // Minimum execution time: 33_540 nanoseconds. - Weight::from_parts(51_316_369, 12548) - // Standard Error: 45_199 - .saturating_add(Weight::from_parts(5_718_552, 0).saturating_mul(r.into())) + // Minimum execution time: 33_651 nanoseconds. + Weight::from_parts(30_453_955, 12548) + // Standard Error: 45_166 + .saturating_add(Weight::from_parts(5_894_631, 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)) @@ -319,8 +319,8 @@ impl pallet_democracy::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_190 nanoseconds. - Weight::from_parts(5_960_000, 0).saturating_add(T::DbWeight::get().writes(1)) + // Minimum execution time: 4_680 nanoseconds. + Weight::from_parts(5_070_000, 0).saturating_add(T::DbWeight::get().writes(1)) } /// Storage: Democracy VotingOf (r:1 w:1) /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3799), added: 6274, mode: MaxEncodedLen) @@ -329,12 +329,14 @@ impl pallet_democracy::weights::WeightInfo for WeightIn /// Storage: System Account (r:1 w:1) /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) /// The range of component `r` is `[0, 99]`. - fn unlock_remove(_r: u32) -> Weight { + fn unlock_remove(r: u32) -> Weight { // Proof Size summary in bytes: // Measured: `554` // Estimated: `12655` - // Minimum execution time: 32_230 nanoseconds. - Weight::from_parts(43_644_064, 12655) + // Minimum execution time: 31_550 nanoseconds. + Weight::from_parts(41_292_966, 12655) + // Standard Error: 5_183 + .saturating_add(Weight::from_parts(523, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -349,10 +351,10 @@ impl pallet_democracy::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `555 + r * (22 ±0)` // Estimated: `12655` - // Minimum execution time: 34_951 nanoseconds. - Weight::from_parts(41_750_676, 12655) - // Standard Error: 8_881 - .saturating_add(Weight::from_parts(54_025, 0).saturating_mul(r.into())) + // Minimum execution time: 35_431 nanoseconds. + Weight::from_parts(41_105_819, 12655) + // Standard Error: 5_494 + .saturating_add(Weight::from_parts(79_917, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -365,10 +367,10 @@ impl pallet_democracy::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `760 + r * (26 ±0)` // Estimated: `8958` - // Minimum execution time: 23_310 nanoseconds. - Weight::from_parts(31_749_195, 8958) - // Standard Error: 7_279 - .saturating_add(Weight::from_parts(80_521, 0).saturating_mul(r.into())) + // Minimum execution time: 23_350 nanoseconds. + Weight::from_parts(31_641_401, 8958) + // Standard Error: 5_466 + .saturating_add(Weight::from_parts(87_676, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -381,10 +383,10 @@ impl pallet_democracy::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `760 + r * (26 ±0)` // Estimated: `8958` - // Minimum execution time: 23_340 nanoseconds. - Weight::from_parts(32_404_729, 8958) - // Standard Error: 9_008 - .saturating_add(Weight::from_parts(72_842, 0).saturating_mul(r.into())) + // Minimum execution time: 23_380 nanoseconds. + Weight::from_parts(31_350_202, 8958) + // Standard Error: 4_891 + .saturating_add(Weight::from_parts(81_254, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } diff --git a/runtime/common/src/weights/pallet_identity.rs b/runtime/common/src/weights/pallet_identity.rs index 8421574d9..1735c46bc 100644 --- a/runtime/common/src/weights/pallet_identity.rs +++ b/runtime/common/src/weights/pallet_identity.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_identity //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: `2024-01-15`, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: `2024-04-02`, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `zeitgeist-benchmark`, CPU: `AMD EPYC 7601 32-Core Processor` //! EXECUTION: `Some(Wasm)`, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024` @@ -59,10 +59,10 @@ impl pallet_identity::weights::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `64 + r * (57 ±0)` // Estimated: `952` - // Minimum execution time: 17_540 nanoseconds. - Weight::from_parts(19_412_422, 952) - // Standard Error: 44_718 - .saturating_add(Weight::from_parts(716_331, 0).saturating_mul(r.into())) + // Minimum execution time: 18_920 nanoseconds. + Weight::from_parts(22_999_617, 952) + // Standard Error: 45_005 + .saturating_add(Weight::from_parts(88_615, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -74,10 +74,10 @@ impl pallet_identity::weights::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `474 + r * (5 ±0)` // Estimated: `7313` - // Minimum execution time: 25_450 nanoseconds. - Weight::from_parts(49_207_597, 7313) - // Standard Error: 14_331 - .saturating_add(Weight::from_parts(513_639, 0).saturating_mul(x.into())) + // Minimum execution time: 25_560 nanoseconds. + Weight::from_parts(47_381_251, 7313) + // Standard Error: 12_342 + .saturating_add(Weight::from_parts(597_000, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -92,10 +92,10 @@ impl pallet_identity::weights::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `101` // Estimated: `11894 + s * (2589 ±0)` - // Minimum execution time: 13_130 nanoseconds. - Weight::from_parts(40_210_154, 11894) - // Standard Error: 39_792 - .saturating_add(Weight::from_parts(4_319_815, 0).saturating_mul(s.into())) + // Minimum execution time: 14_190 nanoseconds. + Weight::from_parts(35_134_479, 11894) + // Standard Error: 35_685 + .saturating_add(Weight::from_parts(4_539_219, 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)) @@ -113,10 +113,10 @@ impl pallet_identity::weights::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `226 + p * (32 ±0)` // Estimated: `11894` - // Minimum execution time: 13_910 nanoseconds. - Weight::from_parts(38_666_951, 11894) - // Standard Error: 51_955 - .saturating_add(Weight::from_parts(1_774_301, 0).saturating_mul(p.into())) + // Minimum execution time: 14_321 nanoseconds. + Weight::from_parts(31_737_012, 11894) + // Standard Error: 21_057 + .saturating_add(Weight::from_parts(2_079_026, 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()))) @@ -134,12 +134,12 @@ impl pallet_identity::weights::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `535 + r * (5 ±0) + s * (32 ±0) + x * (66 ±0)` // Estimated: `11894` - // Minimum execution time: 51_390 nanoseconds. - Weight::from_parts(48_950_763, 11894) - // Standard Error: 31_792 - .saturating_add(Weight::from_parts(1_828_765, 0).saturating_mul(s.into())) - // Standard Error: 31_792 - .saturating_add(Weight::from_parts(268_175, 0).saturating_mul(x.into())) + // Minimum execution time: 52_530 nanoseconds. + Weight::from_parts(66_817_477, 11894) + // Standard Error: 21_024 + .saturating_add(Weight::from_parts(1_718_761, 0).saturating_mul(s.into())) + // Standard Error: 21_024 + .saturating_add(Weight::from_parts(220_399, 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()))) @@ -150,16 +150,14 @@ impl pallet_identity::weights::WeightInfo for WeightInf /// Proof: Identity IdentityOf (max_values: None, max_size: Some(4838), added: 7313, mode: MaxEncodedLen) /// The range of component `r` is `[1, 8]`. /// The range of component `x` is `[0, 64]`. - fn request_judgement(r: u32, x: u32) -> Weight { + fn request_judgement(_r: u32, x: u32) -> Weight { // Proof Size summary in bytes: // Measured: `431 + r * (57 ±0) + x * (66 ±0)` // Estimated: `8265` - // Minimum execution time: 37_700 nanoseconds. - Weight::from_parts(34_649_694, 8265) - // Standard Error: 103_076 - .saturating_add(Weight::from_parts(1_038_785, 0).saturating_mul(r.into())) - // Standard Error: 11_972 - .saturating_add(Weight::from_parts(660_722, 0).saturating_mul(x.into())) + // Minimum execution time: 38_980 nanoseconds. + Weight::from_parts(45_923_751, 8265) + // Standard Error: 12_093 + .saturating_add(Weight::from_parts(678_995, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -171,10 +169,10 @@ impl pallet_identity::weights::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `430 + x * (66 ±0)` // Estimated: `7313` - // Minimum execution time: 34_050 nanoseconds. - Weight::from_parts(50_054_855, 7313) - // Standard Error: 13_231 - .saturating_add(Weight::from_parts(537_492, 0).saturating_mul(x.into())) + // Minimum execution time: 36_250 nanoseconds. + Weight::from_parts(42_241_735, 7313) + // Standard Error: 9_297 + .saturating_add(Weight::from_parts(653_793, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -185,10 +183,10 @@ impl pallet_identity::weights::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `121 + r * (57 ±0)` // Estimated: `952` - // Minimum execution time: 11_460 nanoseconds. - Weight::from_parts(12_342_541, 952) - // Standard Error: 26_113 - .saturating_add(Weight::from_parts(711_064, 0).saturating_mul(r.into())) + // Minimum execution time: 12_260 nanoseconds. + Weight::from_parts(14_566_287, 952) + // Standard Error: 28_502 + .saturating_add(Weight::from_parts(204_175, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -199,22 +197,24 @@ impl pallet_identity::weights::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `121 + r * (57 ±0)` // Estimated: `952` - // Minimum execution time: 10_260 nanoseconds. - Weight::from_parts(13_295_725, 952) - // Standard Error: 31_155 - .saturating_add(Weight::from_parts(66_512, 0).saturating_mul(r.into())) + // Minimum execution time: 11_350 nanoseconds. + Weight::from_parts(12_336_290, 952) + // Standard Error: 21_448 + .saturating_add(Weight::from_parts(212_098, 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(457), added: 952, mode: MaxEncodedLen) /// The range of component `r` is `[1, 7]`. - fn set_fields(_r: u32) -> Weight { + fn set_fields(r: u32) -> Weight { // Proof Size summary in bytes: // Measured: `121 + r * (57 ±0)` // Estimated: `952` - // Minimum execution time: 10_060 nanoseconds. - Weight::from_parts(12_931_747, 952) + // Minimum execution time: 11_470 nanoseconds. + Weight::from_parts(12_563_094, 952) + // Standard Error: 25_110 + .saturating_add(Weight::from_parts(182_114, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -228,10 +228,10 @@ impl pallet_identity::weights::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `509 + r * (57 ±0) + x * (66 ±0)` // Estimated: `8265` - // Minimum execution time: 30_500 nanoseconds. - Weight::from_parts(35_394_279, 8265) - // Standard Error: 16_146 - .saturating_add(Weight::from_parts(1_027_013, 0).saturating_mul(x.into())) + // Minimum execution time: 32_650 nanoseconds. + Weight::from_parts(35_800_720, 8265) + // Standard Error: 11_827 + .saturating_add(Weight::from_parts(1_068_352, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -250,12 +250,12 @@ impl pallet_identity::weights::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `954 + r * (5 ±0) + s * (32 ±0) + x * (66 ±0)` // Estimated: `17108` - // Minimum execution time: 74_220 nanoseconds. - Weight::from_parts(77_339_608, 17108) - // Standard Error: 36_161 - .saturating_add(Weight::from_parts(1_737_934, 0).saturating_mul(s.into())) - // Standard Error: 36_161 - .saturating_add(Weight::from_parts(184_480, 0).saturating_mul(x.into())) + // Minimum execution time: 75_040 nanoseconds. + Weight::from_parts(89_338_852, 17108) + // Standard Error: 24_621 + .saturating_add(Weight::from_parts(1_773_575, 0).saturating_mul(s.into())) + // Standard Error: 24_621 + .saturating_add(Weight::from_parts(174_880, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) @@ -267,12 +267,14 @@ impl pallet_identity::weights::WeightInfo for WeightInf /// Storage: Identity SubsOf (r:1 w:1) /// Proof: Identity SubsOf (max_values: None, max_size: Some(2106), added: 4581, mode: MaxEncodedLen) /// The range of component `s` is `[0, 63]`. - fn add_sub(_s: u32) -> Weight { + fn add_sub(s: u32) -> Weight { // Proof Size summary in bytes: // Measured: `355 + s * (41 ±0)` // Estimated: `14483` - // Minimum execution time: 36_160 nanoseconds. - Weight::from_parts(52_735_396, 14483) + // Minimum execution time: 36_130 nanoseconds. + Weight::from_parts(48_957_879, 14483) + // Standard Error: 10_774 + .saturating_add(Weight::from_parts(121_047, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -285,10 +287,10 @@ impl pallet_identity::weights::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `464 + s * (7 ±0)` // Estimated: `9902` - // Minimum execution time: 17_690 nanoseconds. - Weight::from_parts(22_790_076, 9902) - // Standard Error: 4_956 - .saturating_add(Weight::from_parts(32_433, 0).saturating_mul(s.into())) + // Minimum execution time: 19_900 nanoseconds. + Weight::from_parts(25_372_190, 9902) + // Standard Error: 5_618 + .saturating_add(Weight::from_parts(22_509, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -303,10 +305,10 @@ impl pallet_identity::weights::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `544 + s * (39 ±0)` // Estimated: `14483` - // Minimum execution time: 43_240 nanoseconds. - Weight::from_parts(52_869_158, 14483) - // Standard Error: 16_108 - .saturating_add(Weight::from_parts(46_916, 0).saturating_mul(s.into())) + // Minimum execution time: 43_921 nanoseconds. + Weight::from_parts(51_577_696, 14483) + // Standard Error: 11_499 + .saturating_add(Weight::from_parts(129_314, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -319,10 +321,10 @@ impl pallet_identity::weights::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `469 + s * (42 ±0)` // Estimated: `7170` - // Minimum execution time: 29_340 nanoseconds. - Weight::from_parts(34_148_899, 7170) - // Standard Error: 7_721 - .saturating_add(Weight::from_parts(101_826, 0).saturating_mul(s.into())) + // Minimum execution time: 30_781 nanoseconds. + Weight::from_parts(37_438_093, 7170) + // Standard Error: 8_782 + .saturating_add(Weight::from_parts(106_114, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } diff --git a/runtime/common/src/weights/pallet_membership.rs b/runtime/common/src/weights/pallet_membership.rs index c268003a6..69abd352e 100644 --- a/runtime/common/src/weights/pallet_membership.rs +++ b/runtime/common/src/weights/pallet_membership.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_membership //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: `2024-01-15`, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: `2024-04-02`, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `zeitgeist-benchmark`, CPU: `AMD EPYC 7601 32-Core Processor` //! EXECUTION: `Some(Wasm)`, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024` @@ -65,10 +65,10 @@ impl pallet_membership::weights::WeightInfo for WeightI // Proof Size summary in bytes: // Measured: `237 + m * (64 ±0)` // Estimated: `4900 + m * (192 ±0)` - // Minimum execution time: 27_951 nanoseconds. - Weight::from_parts(32_200_122, 4900) - // Standard Error: 4_679 - .saturating_add(Weight::from_parts(51_964, 0).saturating_mul(m.into())) + // Minimum execution time: 27_870 nanoseconds. + Weight::from_parts(32_938_860, 4900) + // Standard Error: 4_858 + .saturating_add(Weight::from_parts(45_291, 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())) @@ -88,10 +88,10 @@ impl pallet_membership::weights::WeightInfo for WeightI // Proof Size summary in bytes: // Measured: `341 + m * (64 ±0)` // Estimated: `5739 + m * (192 ±0)` - // Minimum execution time: 29_581 nanoseconds. - Weight::from_parts(37_774_872, 5739) - // Standard Error: 5_232 - .saturating_add(Weight::from_parts(27_127, 0).saturating_mul(m.into())) + // Minimum execution time: 33_120 nanoseconds. + Weight::from_parts(36_842_820, 5739) + // Standard Error: 5_058 + .saturating_add(Weight::from_parts(55_723, 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())) @@ -111,10 +111,10 @@ impl pallet_membership::weights::WeightInfo for WeightI // Proof Size summary in bytes: // Measured: `341 + m * (64 ±0)` // Estimated: `5739 + m * (192 ±0)` - // Minimum execution time: 31_120 nanoseconds. - Weight::from_parts(34_443_383, 5739) - // Standard Error: 9_979 - .saturating_add(Weight::from_parts(173_291, 0).saturating_mul(m.into())) + // Minimum execution time: 32_300 nanoseconds. + Weight::from_parts(36_090_560, 5739) + // Standard Error: 5_332 + .saturating_add(Weight::from_parts(103_901, 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())) @@ -134,10 +134,10 @@ impl pallet_membership::weights::WeightInfo for WeightI // Proof Size summary in bytes: // Measured: `341 + m * (64 ±0)` // Estimated: `5739 + m * (192 ±0)` - // Minimum execution time: 28_450 nanoseconds. - Weight::from_parts(35_667_710, 5739) - // Standard Error: 7_001 - .saturating_add(Weight::from_parts(258_261, 0).saturating_mul(m.into())) + // Minimum execution time: 33_221 nanoseconds. + Weight::from_parts(36_574_943, 5739) + // Standard Error: 6_709 + .saturating_add(Weight::from_parts(260_598, 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())) @@ -157,10 +157,10 @@ impl pallet_membership::weights::WeightInfo for WeightI // Proof Size summary in bytes: // Measured: `341 + m * (64 ±0)` // Estimated: `5739 + m * (192 ±0)` - // Minimum execution time: 30_690 nanoseconds. - Weight::from_parts(38_368_668, 5739) - // Standard Error: 5_617 - .saturating_add(Weight::from_parts(70_863, 0).saturating_mul(m.into())) + // Minimum execution time: 30_890 nanoseconds. + Weight::from_parts(37_543_843, 5739) + // Standard Error: 5_311 + .saturating_add(Weight::from_parts(85_516, 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())) @@ -176,10 +176,10 @@ impl pallet_membership::weights::WeightInfo for WeightI // Proof Size summary in bytes: // Measured: `136 + m * (32 ±0)` // Estimated: `3833 + m * (32 ±0)` - // Minimum execution time: 12_980 nanoseconds. - Weight::from_parts(14_958_235, 3833) - // Standard Error: 2_397 - .saturating_add(Weight::from_parts(37_346, 0).saturating_mul(m.into())) + // Minimum execution time: 14_620 nanoseconds. + Weight::from_parts(16_659_247, 3833) + // Standard Error: 2_155 + .saturating_add(Weight::from_parts(19_111, 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())) @@ -193,10 +193,10 @@ impl pallet_membership::weights::WeightInfo for WeightI // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_110 nanoseconds. - Weight::from_parts(6_020_436, 0) - // Standard Error: 783 - .saturating_add(Weight::from_parts(2_089, 0).saturating_mul(m.into())) + // Minimum execution time: 5_220 nanoseconds. + Weight::from_parts(6_009_755, 0) + // Standard Error: 821 + .saturating_add(Weight::from_parts(658, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().writes(2)) } } diff --git a/runtime/common/src/weights/pallet_multisig.rs b/runtime/common/src/weights/pallet_multisig.rs index c331618bc..4349aefb3 100644 --- a/runtime/common/src/weights/pallet_multisig.rs +++ b/runtime/common/src/weights/pallet_multisig.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_multisig //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: `2024-01-15`, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: `2024-04-02`, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `zeitgeist-benchmark`, CPU: `AMD EPYC 7601 32-Core Processor` //! EXECUTION: `Some(Wasm)`, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024` @@ -57,10 +57,10 @@ impl pallet_multisig::weights::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 17_250 nanoseconds. - Weight::from_parts(18_910_472, 0) - // Standard Error: 48 - .saturating_add(Weight::from_parts(1_138, 0).saturating_mul(z.into())) + // Minimum execution time: 17_570 nanoseconds. + Weight::from_parts(21_197_622, 0) + // Standard Error: 28 + .saturating_add(Weight::from_parts(952, 0).saturating_mul(z.into())) } /// Storage: Multisig Multisigs (r:1 w:1) /// Proof: Multisig Multisigs (max_values: None, max_size: Some(3350), added: 5825, mode: MaxEncodedLen) @@ -68,14 +68,14 @@ impl pallet_multisig::weights::WeightInfo for WeightInf /// The range of component `z` is `[0, 10000]`. fn as_multi_create(s: u32, z: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `339 + s * (1 ±0)` + // Measured: `373 + s * (1 ±0)` // Estimated: `5825` - // Minimum execution time: 48_960 nanoseconds. - Weight::from_parts(49_551_474, 5825) - // Standard Error: 9_903 - .saturating_add(Weight::from_parts(98_277, 0).saturating_mul(s.into())) - // Standard Error: 97 - .saturating_add(Weight::from_parts(2_458, 0).saturating_mul(z.into())) + // Minimum execution time: 48_280 nanoseconds. + Weight::from_parts(52_711_427, 5825) + // Standard Error: 7_310 + .saturating_add(Weight::from_parts(46_023, 0).saturating_mul(s.into())) + // Standard Error: 71 + .saturating_add(Weight::from_parts(2_556, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -85,14 +85,14 @@ impl pallet_multisig::weights::WeightInfo for WeightInf /// The range of component `z` is `[0, 10000]`. fn as_multi_approve(s: u32, z: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `283` + // Measured: `317` // Estimated: `5825` - // Minimum execution time: 35_221 nanoseconds. - Weight::from_parts(40_315_882, 5825) - // Standard Error: 7_735 - .saturating_add(Weight::from_parts(34_630, 0).saturating_mul(s.into())) - // Standard Error: 75 - .saturating_add(Weight::from_parts(2_013, 0).saturating_mul(z.into())) + // Minimum execution time: 36_060 nanoseconds. + Weight::from_parts(35_228_597, 5825) + // Standard Error: 6_729 + .saturating_add(Weight::from_parts(79_662, 0).saturating_mul(s.into())) + // Standard Error: 65 + .saturating_add(Weight::from_parts(2_356, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -104,14 +104,14 @@ impl pallet_multisig::weights::WeightInfo for WeightInf /// The range of component `z` is `[0, 10000]`. fn as_multi_complete(s: u32, z: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `425 + s * (33 ±0)` + // Measured: `459 + s * (33 ±0)` // Estimated: `8432` - // Minimum execution time: 56_270 nanoseconds. - Weight::from_parts(53_319_412, 8432) - // Standard Error: 11_781 - .saturating_add(Weight::from_parts(119_161, 0).saturating_mul(s.into())) - // Standard Error: 115 - .saturating_add(Weight::from_parts(2_391, 0).saturating_mul(z.into())) + // Minimum execution time: 57_101 nanoseconds. + Weight::from_parts(55_464_945, 8432) + // Standard Error: 7_863 + .saturating_add(Weight::from_parts(101_206, 0).saturating_mul(s.into())) + // Standard Error: 77 + .saturating_add(Weight::from_parts(2_250, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -120,12 +120,12 @@ impl pallet_multisig::weights::WeightInfo for WeightInf /// The range of component `s` is `[2, 100]`. fn approve_as_multi_create(s: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `343 + s * (1 ±0)` + // Measured: `377 + s * (1 ±0)` // Estimated: `5825` - // Minimum execution time: 38_210 nanoseconds. - Weight::from_parts(42_949_786, 5825) - // Standard Error: 8_888 - .saturating_add(Weight::from_parts(103_842, 0).saturating_mul(s.into())) + // Minimum execution time: 37_510 nanoseconds. + Weight::from_parts(46_100_688, 5825) + // Standard Error: 7_622 + .saturating_add(Weight::from_parts(79_467, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -134,12 +134,12 @@ impl pallet_multisig::weights::WeightInfo for WeightInf /// The range of component `s` is `[2, 100]`. fn approve_as_multi_approve(s: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `283` + // Measured: `317` // Estimated: `5825` - // Minimum execution time: 26_130 nanoseconds. - Weight::from_parts(27_231_490, 5825) - // Standard Error: 7_243 - .saturating_add(Weight::from_parts(121_899, 0).saturating_mul(s.into())) + // Minimum execution time: 27_011 nanoseconds. + Weight::from_parts(30_952_622, 5825) + // Standard Error: 4_624 + .saturating_add(Weight::from_parts(87_784, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -148,12 +148,12 @@ impl pallet_multisig::weights::WeightInfo for WeightInf /// The range of component `s` is `[2, 100]`. fn cancel_as_multi(s: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `491 + s * (1 ±0)` + // Measured: `525 + s * (1 ±0)` // Estimated: `5825` - // Minimum execution time: 39_530 nanoseconds. - Weight::from_parts(44_170_155, 5825) - // Standard Error: 6_233 - .saturating_add(Weight::from_parts(85_488, 0).saturating_mul(s.into())) + // Minimum execution time: 41_280 nanoseconds. + Weight::from_parts(48_358_130, 5825) + // Standard Error: 6_713 + .saturating_add(Weight::from_parts(67_422, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/runtime/common/src/weights/pallet_parachain_staking.rs b/runtime/common/src/weights/pallet_parachain_staking.rs index 2e0fcb849..f89e6b463 100644 --- a/runtime/common/src/weights/pallet_parachain_staking.rs +++ b/runtime/common/src/weights/pallet_parachain_staking.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_parachain_staking //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: `2024-01-15`, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: `2024-04-03`, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `zeitgeist-benchmark`, CPU: `AMD EPYC 7601 32-Core Processor` //! EXECUTION: `Some(Wasm)`, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024` @@ -58,8 +58,8 @@ impl pallet_parachain_staking::weights::WeightInfo for // Proof Size summary in bytes: // Measured: `119` // Estimated: `614` - // Minimum execution time: 17_690 nanoseconds. - Weight::from_parts(21_220_000, 614) + // Minimum execution time: 17_080 nanoseconds. + Weight::from_parts(17_910_000, 614) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -69,8 +69,8 @@ impl pallet_parachain_staking::weights::WeightInfo for // Proof Size summary in bytes: // Measured: `119` // Estimated: `614` - // Minimum execution time: 62_130 nanoseconds. - Weight::from_parts(75_020_000, 614) + // Minimum execution time: 61_290 nanoseconds. + Weight::from_parts(74_520_000, 614) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -80,8 +80,8 @@ impl pallet_parachain_staking::weights::WeightInfo for // Proof Size summary in bytes: // Measured: `52` // Estimated: `547` - // Minimum execution time: 15_670 nanoseconds. - Weight::from_parts(19_500_000, 547) + // Minimum execution time: 15_710 nanoseconds. + Weight::from_parts(19_750_000, 547) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -91,8 +91,8 @@ impl pallet_parachain_staking::weights::WeightInfo for // Proof Size summary in bytes: // Measured: `52` // Estimated: `547` - // Minimum execution time: 14_900 nanoseconds. - Weight::from_parts(18_460_000, 547) + // Minimum execution time: 15_320 nanoseconds. + Weight::from_parts(18_290_000, 547) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -102,8 +102,8 @@ impl pallet_parachain_staking::weights::WeightInfo for // Proof Size summary in bytes: // Measured: `28` // Estimated: `523` - // Minimum execution time: 16_140 nanoseconds. - Weight::from_parts(19_481_000, 523) + // Minimum execution time: 19_290 nanoseconds. + Weight::from_parts(20_090_000, 523) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -113,8 +113,8 @@ impl pallet_parachain_staking::weights::WeightInfo for // Proof Size summary in bytes: // Measured: `27` // Estimated: `522` - // Minimum execution time: 17_750 nanoseconds. - Weight::from_parts(18_270_000, 522) + // Minimum execution time: 17_920 nanoseconds. + Weight::from_parts(18_320_000, 522) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -126,8 +126,8 @@ impl pallet_parachain_staking::weights::WeightInfo for // Proof Size summary in bytes: // Measured: `147` // Estimated: `1284` - // Minimum execution time: 66_920 nanoseconds. - Weight::from_parts(81_800_000, 1284) + // Minimum execution time: 67_320 nanoseconds. + Weight::from_parts(80_840_000, 1284) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -152,10 +152,10 @@ impl pallet_parachain_staking::weights::WeightInfo for // Proof Size summary in bytes: // Measured: `1898 + x * (49 ±0)` // Estimated: `22371 + x * (300 ±0)` - // Minimum execution time: 67_450 nanoseconds. - Weight::from_parts(87_054_208, 22371) - // Standard Error: 2_162 - .saturating_add(Weight::from_parts(203_040, 0).saturating_mul(x.into())) + // Minimum execution time: 67_820 nanoseconds. + Weight::from_parts(88_529_892, 22371) + // Standard Error: 1_996 + .saturating_add(Weight::from_parts(198_946, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(7)) .saturating_add(Weight::from_parts(0, 300).saturating_mul(x.into())) @@ -169,10 +169,10 @@ impl pallet_parachain_staking::weights::WeightInfo for // Proof Size summary in bytes: // Measured: `990 + x * (48 ±0)` // Estimated: `4794 + x * (98 ±0)` - // Minimum execution time: 36_370 nanoseconds. - Weight::from_parts(40_724_049, 4794) - // Standard Error: 2_126 - .saturating_add(Weight::from_parts(171_862, 0).saturating_mul(x.into())) + // Minimum execution time: 36_850 nanoseconds. + Weight::from_parts(37_402_091, 4794) + // Standard Error: 1_907 + .saturating_add(Weight::from_parts(172_298, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(Weight::from_parts(0, 98).saturating_mul(x.into())) @@ -200,10 +200,10 @@ impl pallet_parachain_staking::weights::WeightInfo for // Proof Size summary in bytes: // Measured: `238 + x * (595 ±0)` // Estimated: `18229 + x * (12995 ±0)` - // Minimum execution time: 121_730 nanoseconds. - Weight::from_parts(123_981_000, 18229) - // Standard Error: 154_533 - .saturating_add(Weight::from_parts(45_598_956, 0).saturating_mul(x.into())) + // Minimum execution time: 100_860 nanoseconds. + Weight::from_parts(123_231_000, 18229) + // Standard Error: 156_591 + .saturating_add(Weight::from_parts(45_031_337, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(x.into()))) .saturating_add(T::DbWeight::get().writes(5)) @@ -219,10 +219,10 @@ impl pallet_parachain_staking::weights::WeightInfo for // Proof Size summary in bytes: // Measured: `946 + x * (48 ±0)` // Estimated: `4704 + x * (98 ±0)` - // Minimum execution time: 26_500 nanoseconds. - Weight::from_parts(36_332_094, 4704) - // Standard Error: 2_111 - .saturating_add(Weight::from_parts(187_547, 0).saturating_mul(x.into())) + // Minimum execution time: 30_230 nanoseconds. + Weight::from_parts(35_307_503, 4704) + // Standard Error: 1_892 + .saturating_add(Weight::from_parts(182_673, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(Weight::from_parts(0, 98).saturating_mul(x.into())) @@ -235,8 +235,8 @@ impl pallet_parachain_staking::weights::WeightInfo for // Proof Size summary in bytes: // Measured: `371` // Estimated: `3712` - // Minimum execution time: 28_900 nanoseconds. - Weight::from_parts(35_300_000, 3712) + // Minimum execution time: 35_270 nanoseconds. + Weight::from_parts(36_630_000, 3712) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -248,8 +248,8 @@ impl pallet_parachain_staking::weights::WeightInfo for // Proof Size summary in bytes: // Measured: `322` // Estimated: `3614` - // Minimum execution time: 30_500 nanoseconds. - Weight::from_parts(35_560_000, 3614) + // Minimum execution time: 35_020 nanoseconds. + Weight::from_parts(36_200_000, 3614) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -267,8 +267,8 @@ impl pallet_parachain_staking::weights::WeightInfo for // Proof Size summary in bytes: // Measured: `650` // Estimated: `11796` - // Minimum execution time: 63_281 nanoseconds. - Weight::from_parts(75_700_000, 11796) + // Minimum execution time: 74_230 nanoseconds. + Weight::from_parts(76_220_000, 11796) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(5)) } @@ -278,8 +278,8 @@ impl pallet_parachain_staking::weights::WeightInfo for // Proof Size summary in bytes: // Measured: `216` // Estimated: `2691` - // Minimum execution time: 23_790 nanoseconds. - Weight::from_parts(29_200_000, 2691) + // Minimum execution time: 28_930 nanoseconds. + Weight::from_parts(29_450_000, 2691) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -297,8 +297,8 @@ impl pallet_parachain_staking::weights::WeightInfo for // Proof Size summary in bytes: // Measured: `670` // Estimated: `11856` - // Minimum execution time: 54_520 nanoseconds. - Weight::from_parts(74_880_000, 11856) + // Minimum execution time: 75_961 nanoseconds. + Weight::from_parts(77_520_000, 11856) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(5)) } @@ -308,8 +308,8 @@ impl pallet_parachain_staking::weights::WeightInfo for // Proof Size summary in bytes: // Measured: `236` // Estimated: `2711` - // Minimum execution time: 26_350 nanoseconds. - Weight::from_parts(27_350_000, 2711) + // Minimum execution time: 26_290 nanoseconds. + Weight::from_parts(27_360_000, 2711) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -333,12 +333,12 @@ impl pallet_parachain_staking::weights::WeightInfo for // Proof Size summary in bytes: // Measured: `2374 + x * (103 ±0) + y * (52 ±0)` // Estimated: `25391 + x * (530 ±0) + y * (265 ±0)` - // Minimum execution time: 117_260 nanoseconds. - Weight::from_parts(127_979_202, 25391) - // Standard Error: 7_758 - .saturating_add(Weight::from_parts(273_960, 0).saturating_mul(x.into())) - // Standard Error: 2_545 - .saturating_add(Weight::from_parts(138_185, 0).saturating_mul(y.into())) + // Minimum execution time: 119_930 nanoseconds. + Weight::from_parts(118_918_898, 25391) + // Standard Error: 6_528 + .saturating_add(Weight::from_parts(319_301, 0).saturating_mul(x.into())) + // Standard Error: 2_141 + .saturating_add(Weight::from_parts(162_404, 0).saturating_mul(y.into())) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(7)) .saturating_add(Weight::from_parts(0, 530).saturating_mul(x.into())) @@ -352,8 +352,8 @@ impl pallet_parachain_staking::weights::WeightInfo for // Proof Size summary in bytes: // Measured: `176` // Estimated: `5302` - // Minimum execution time: 25_010 nanoseconds. - Weight::from_parts(33_430_000, 5302) + // Minimum execution time: 28_120 nanoseconds. + Weight::from_parts(35_400_000, 5302) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -379,11 +379,11 @@ impl pallet_parachain_staking::weights::WeightInfo for fn execute_leave_delegators(x: u32) -> Weight { // Proof Size summary in bytes: // Measured: `755 + x * (558 ±0)` - // Estimated: `26542 + x * (13492 ±2)` - // Minimum execution time: 107_520 nanoseconds. - Weight::from_parts(111_190_000, 26542) - // Standard Error: 83_588 - .saturating_add(Weight::from_parts(37_116_448, 0).saturating_mul(x.into())) + // Estimated: `26542 + x * (13492 ±0)` + // Minimum execution time: 108_450 nanoseconds. + Weight::from_parts(109_220_000, 26542) + // Standard Error: 69_473 + .saturating_add(Weight::from_parts(36_713_323, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().reads((4_u64).saturating_mul(x.into()))) .saturating_add(T::DbWeight::get().writes(2)) @@ -398,8 +398,8 @@ impl pallet_parachain_staking::weights::WeightInfo for // Proof Size summary in bytes: // Measured: `298` // Estimated: `5546` - // Minimum execution time: 28_590 nanoseconds. - Weight::from_parts(37_630_000, 5546) + // Minimum execution time: 27_421 nanoseconds. + Weight::from_parts(33_660_000, 5546) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -411,8 +411,8 @@ impl pallet_parachain_staking::weights::WeightInfo for // Proof Size summary in bytes: // Measured: `176` // Estimated: `5302` - // Minimum execution time: 30_010 nanoseconds. - Weight::from_parts(33_610_000, 5302) + // Minimum execution time: 24_960 nanoseconds. + Weight::from_parts(33_320_000, 5302) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -436,8 +436,8 @@ impl pallet_parachain_staking::weights::WeightInfo for // Proof Size summary in bytes: // Measured: `1066` // Estimated: `23667` - // Minimum execution time: 91_720 nanoseconds. - Weight::from_parts(94_170_000, 23667) + // Minimum execution time: 87_560 nanoseconds. + Weight::from_parts(104_231_000, 23667) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(7)) } @@ -449,8 +449,8 @@ impl pallet_parachain_staking::weights::WeightInfo for // Proof Size summary in bytes: // Measured: `176` // Estimated: `5302` - // Minimum execution time: 27_890 nanoseconds. - Weight::from_parts(33_760_000, 5302) + // Minimum execution time: 27_650 nanoseconds. + Weight::from_parts(33_470_000, 5302) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -476,8 +476,8 @@ impl pallet_parachain_staking::weights::WeightInfo for // Proof Size summary in bytes: // Measured: `1243` // Estimated: `28447` - // Minimum execution time: 109_950 nanoseconds. - Weight::from_parts(127_880_000, 28447) + // Minimum execution time: 91_650 nanoseconds. + Weight::from_parts(113_391_000, 28447) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(8)) } @@ -501,8 +501,8 @@ impl pallet_parachain_staking::weights::WeightInfo for // Proof Size summary in bytes: // Measured: `1188` // Estimated: `24399` - // Minimum execution time: 93_580 nanoseconds. - Weight::from_parts(108_650_000, 24399) + // Minimum execution time: 88_960 nanoseconds. + Weight::from_parts(95_660_000, 24399) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(8)) } @@ -514,8 +514,8 @@ impl pallet_parachain_staking::weights::WeightInfo for // Proof Size summary in bytes: // Measured: `298` // Estimated: `5546` - // Minimum execution time: 30_350 nanoseconds. - Weight::from_parts(34_140_000, 5546) + // Minimum execution time: 27_360 nanoseconds. + Weight::from_parts(33_890_000, 5546) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -527,8 +527,8 @@ impl pallet_parachain_staking::weights::WeightInfo for // Proof Size summary in bytes: // Measured: `298` // Estimated: `5546` - // Minimum execution time: 30_280 nanoseconds. - Weight::from_parts(36_430_000, 5546) + // Minimum execution time: 27_520 nanoseconds. + Weight::from_parts(35_460_000, 5546) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -550,8 +550,8 @@ impl pallet_parachain_staking::weights::WeightInfo for // Proof Size summary in bytes: // Measured: `438` // Estimated: `11670` - // Minimum execution time: 47_530 nanoseconds. - Weight::from_parts(57_600_000, 11670) + // Minimum execution time: 47_071 nanoseconds. + Weight::from_parts(57_930_000, 11670) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -564,10 +564,10 @@ impl pallet_parachain_staking::weights::WeightInfo for // Proof Size summary in bytes: // Measured: `118 + y * (48 ±0)` // Estimated: `5180 + y * (96 ±0)` - // Minimum execution time: 9_090 nanoseconds. - Weight::from_parts(12_813_747, 5180) - // Standard Error: 3_345 - .saturating_add(Weight::from_parts(115_123, 0).saturating_mul(y.into())) + // Minimum execution time: 9_180 nanoseconds. + Weight::from_parts(11_395_601, 5180) + // Standard Error: 1_459 + .saturating_add(Weight::from_parts(127_300, 0).saturating_mul(y.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(Weight::from_parts(0, 96).saturating_mul(y.into())) } @@ -593,12 +593,12 @@ impl pallet_parachain_staking::weights::WeightInfo for // Proof Size summary in bytes: // Measured: `0 + x * (5122 ±0) + y * (2400 ±0)` // Estimated: `13898 + x * (26124 ±53) + y * (6816 ±26)` - // Minimum execution time: 37_530 nanoseconds. - Weight::from_parts(38_070_000, 13898) - // Standard Error: 167_246 - .saturating_add(Weight::from_parts(29_946_513, 0).saturating_mul(x.into())) - // Standard Error: 83_401 - .saturating_add(Weight::from_parts(2_881_371, 0).saturating_mul(y.into())) + // Minimum execution time: 30_901 nanoseconds. + Weight::from_parts(33_540_000, 13898) + // Standard Error: 176_806 + .saturating_add(Weight::from_parts(30_024_983, 0).saturating_mul(x.into())) + // Standard Error: 88_168 + .saturating_add(Weight::from_parts(3_002_581, 0).saturating_mul(y.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().reads((4_u64).saturating_mul(x.into()))) .saturating_add(T::DbWeight::get().writes(2)) @@ -621,10 +621,10 @@ impl pallet_parachain_staking::weights::WeightInfo for // Proof Size summary in bytes: // Measured: `485 + y * (219 ±0)` // Estimated: `16898 + y * (3483 ±0)` - // Minimum execution time: 53_111 nanoseconds. - Weight::from_parts(59_768_220, 16898) - // Standard Error: 56_493 - .saturating_add(Weight::from_parts(21_235_473, 0).saturating_mul(y.into())) + // Minimum execution time: 74_380 nanoseconds. + Weight::from_parts(15_333_396, 16898) + // Standard Error: 39_718 + .saturating_add(Weight::from_parts(21_105_447, 0).saturating_mul(y.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(y.into()))) .saturating_add(T::DbWeight::get().writes(3)) @@ -635,8 +635,8 @@ impl pallet_parachain_staking::weights::WeightInfo for // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_050 nanoseconds. - Weight::from_parts(2_300_000, 0) + // Minimum execution time: 2_170 nanoseconds. + Weight::from_parts(2_420_000, 0) } /// Storage: ParachainStaking DelegatorState (r:1 w:0) /// Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) @@ -648,12 +648,12 @@ impl pallet_parachain_staking::weights::WeightInfo for // Proof Size summary in bytes: // Measured: `718 + x * (34 ±0) + y * (48 ±0)` // Estimated: `6134 + x * (70 ±0) + y * (98 ±0)` - // Minimum execution time: 43_000 nanoseconds. - Weight::from_parts(54_178_821, 6134) - // Standard Error: 920 - .saturating_add(Weight::from_parts(78_822, 0).saturating_mul(x.into())) - // Standard Error: 2_754 - .saturating_add(Weight::from_parts(66_407, 0).saturating_mul(y.into())) + // Minimum execution time: 42_651 nanoseconds. + Weight::from_parts(50_233_645, 6134) + // Standard Error: 1_163 + .saturating_add(Weight::from_parts(95_129, 0).saturating_mul(x.into())) + // Standard Error: 3_482 + .saturating_add(Weight::from_parts(86_750, 0).saturating_mul(y.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(Weight::from_parts(0, 70).saturating_mul(x.into())) @@ -684,14 +684,14 @@ impl pallet_parachain_staking::weights::WeightInfo for // Proof Size summary in bytes: // Measured: `0 + x * (84 ±0) + y * (33 ±0) + z * (114 ±0)` // Estimated: `127262 + x * (367 ±0) + y * (73 ±0) + z * (230 ±1)` - // Minimum execution time: 117_820 nanoseconds. - Weight::from_parts(111_718_224, 127262) - // Standard Error: 2_457 - .saturating_add(Weight::from_parts(237_230, 0).saturating_mul(x.into())) - // Standard Error: 2_464 - .saturating_add(Weight::from_parts(43_725, 0).saturating_mul(y.into())) - // Standard Error: 8_678 - .saturating_add(Weight::from_parts(311_558, 0).saturating_mul(z.into())) + // Minimum execution time: 125_520 nanoseconds. + Weight::from_parts(106_117_195, 127262) + // Standard Error: 2_398 + .saturating_add(Weight::from_parts(250_175, 0).saturating_mul(x.into())) + // Standard Error: 2_404 + .saturating_add(Weight::from_parts(47_732, 0).saturating_mul(y.into())) + // Standard Error: 8_468 + .saturating_add(Weight::from_parts(321_865, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(8)) .saturating_add(Weight::from_parts(0, 367).saturating_mul(x.into())) @@ -704,8 +704,8 @@ impl pallet_parachain_staking::weights::WeightInfo for // Proof Size summary in bytes: // Measured: `139` // Estimated: `2607` - // Minimum execution time: 28_180 nanoseconds. - Weight::from_parts(28_980_000, 2607) + // Minimum execution time: 25_030 nanoseconds. + Weight::from_parts(25_680_000, 2607) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/runtime/common/src/weights/pallet_preimage.rs b/runtime/common/src/weights/pallet_preimage.rs index 7aa0e5999..95311a7f2 100644 --- a/runtime/common/src/weights/pallet_preimage.rs +++ b/runtime/common/src/weights/pallet_preimage.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_preimage //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: `2024-01-15`, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: `2024-04-02`, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `zeitgeist-benchmark`, CPU: `AMD EPYC 7601 32-Core Processor` //! EXECUTION: `Some(Wasm)`, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024` @@ -61,10 +61,10 @@ impl pallet_preimage::weights::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `179` // Estimated: `2566` - // Minimum execution time: 35_760 nanoseconds. - Weight::from_parts(42_580_000, 2566) - // Standard Error: 5 - .saturating_add(Weight::from_parts(2_952, 0).saturating_mul(s.into())) + // Minimum execution time: 39_290 nanoseconds. + Weight::from_parts(39_640_000, 2566) + // Standard Error: 4 + .saturating_add(Weight::from_parts(2_972, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -77,10 +77,10 @@ impl pallet_preimage::weights::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `106` // Estimated: `2566` - // Minimum execution time: 25_440 nanoseconds. - Weight::from_parts(25_870_000, 2566) + // Minimum execution time: 23_180 nanoseconds. + Weight::from_parts(23_750_000, 2566) // Standard Error: 5 - .saturating_add(Weight::from_parts(2_931, 0).saturating_mul(s.into())) + .saturating_add(Weight::from_parts(3_015, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -93,10 +93,10 @@ impl pallet_preimage::weights::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `106` // Estimated: `2566` - // Minimum execution time: 24_220 nanoseconds. - Weight::from_parts(24_880_000, 2566) - // Standard Error: 6 - .saturating_add(Weight::from_parts(2_963, 0).saturating_mul(s.into())) + // Minimum execution time: 22_350 nanoseconds. + Weight::from_parts(23_520_000, 2566) + // Standard Error: 5 + .saturating_add(Weight::from_parts(3_016, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -108,8 +108,8 @@ impl pallet_preimage::weights::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `357` // Estimated: `2566` - // Minimum execution time: 60_650 nanoseconds. - Weight::from_parts(71_670_000, 2566) + // Minimum execution time: 59_921 nanoseconds. + Weight::from_parts(69_920_000, 2566) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -121,8 +121,8 @@ impl pallet_preimage::weights::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `144` // Estimated: `2566` - // Minimum execution time: 44_380 nanoseconds. - Weight::from_parts(50_081_000, 2566) + // Minimum execution time: 45_530 nanoseconds. + Weight::from_parts(52_610_000, 2566) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -132,8 +132,8 @@ impl pallet_preimage::weights::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `220` // Estimated: `2566` - // Minimum execution time: 39_850 nanoseconds. - Weight::from_parts(44_890_000, 2566) + // Minimum execution time: 40_490 nanoseconds. + Weight::from_parts(46_420_000, 2566) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -143,8 +143,8 @@ impl pallet_preimage::weights::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `144` // Estimated: `2566` - // Minimum execution time: 26_380 nanoseconds. - Weight::from_parts(30_250_000, 2566) + // Minimum execution time: 27_750 nanoseconds. + Weight::from_parts(32_400_000, 2566) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -154,8 +154,8 @@ impl pallet_preimage::weights::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `42` // Estimated: `2566` - // Minimum execution time: 32_940 nanoseconds. - Weight::from_parts(37_240_000, 2566) + // Minimum execution time: 34_380 nanoseconds. + Weight::from_parts(38_370_000, 2566) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -165,8 +165,8 @@ impl pallet_preimage::weights::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `106` // Estimated: `2566` - // Minimum execution time: 14_740 nanoseconds. - Weight::from_parts(15_950_000, 2566) + // Minimum execution time: 15_150 nanoseconds. + Weight::from_parts(18_560_000, 2566) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -178,8 +178,8 @@ impl pallet_preimage::weights::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `144` // Estimated: `2566` - // Minimum execution time: 40_510 nanoseconds. - Weight::from_parts(47_441_000, 2566) + // Minimum execution time: 43_830 nanoseconds. + Weight::from_parts(50_480_000, 2566) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -189,8 +189,8 @@ impl pallet_preimage::weights::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `106` // Estimated: `2566` - // Minimum execution time: 15_111 nanoseconds. - Weight::from_parts(18_110_000, 2566) + // Minimum execution time: 15_530 nanoseconds. + Weight::from_parts(19_560_000, 2566) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -200,8 +200,8 @@ impl pallet_preimage::weights::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `106` // Estimated: `2566` - // Minimum execution time: 15_910 nanoseconds. - Weight::from_parts(16_980_000, 2566) + // Minimum execution time: 15_630 nanoseconds. + Weight::from_parts(17_180_000, 2566) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/runtime/common/src/weights/pallet_proxy.rs b/runtime/common/src/weights/pallet_proxy.rs index f47d56e53..b5488f8c8 100644 --- a/runtime/common/src/weights/pallet_proxy.rs +++ b/runtime/common/src/weights/pallet_proxy.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_proxy //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: `2024-01-15`, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: `2024-04-02`, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `zeitgeist-benchmark`, CPU: `AMD EPYC 7601 32-Core Processor` //! EXECUTION: `Some(Wasm)`, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024` @@ -59,10 +59,10 @@ impl pallet_proxy::weights::WeightInfo for WeightInfo pallet_proxy::weights::WeightInfo for WeightInfo pallet_proxy::weights::WeightInfo for WeightInfo Weight { + fn remove_announcement(a: u32, p: u32) -> Weight { // Proof Size summary in bytes: // Measured: `404 + a * (72 ±0)` // Estimated: `7443` - // Minimum execution time: 27_820 nanoseconds. - Weight::from_parts(36_178_857, 7443) - // Standard Error: 14_677 - .saturating_add(Weight::from_parts(128_354, 0).saturating_mul(a.into())) + // Minimum execution time: 27_570 nanoseconds. + Weight::from_parts(33_441_982, 7443) + // Standard Error: 11_912 + .saturating_add(Weight::from_parts(230_287, 0).saturating_mul(a.into())) + // Standard Error: 12_307 + .saturating_add(Weight::from_parts(8_970, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -113,12 +115,12 @@ impl pallet_proxy::weights::WeightInfo for WeightInfo pallet_proxy::weights::WeightInfo for WeightInfo pallet_proxy::weights::WeightInfo for WeightInfo Weight { + fn remove_proxy(p: u32) -> Weight { // Proof Size summary in bytes: // Measured: `122 + p * (41 ±0)` // Estimated: `3844` - // Minimum execution time: 30_520 nanoseconds. - Weight::from_parts(40_076_161, 3844) + // Minimum execution time: 32_060 nanoseconds. + Weight::from_parts(38_804_726, 3844) + // Standard Error: 14_689 + .saturating_add(Weight::from_parts(98_570, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -176,10 +180,10 @@ impl pallet_proxy::weights::WeightInfo for WeightInfo pallet_proxy::weights::WeightInfo for WeightInfo pallet_proxy::weights::WeightInfo for WeightInfo pallet_scheduler::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `35` // Estimated: `503` - // Minimum execution time: 6_040 nanoseconds. - Weight::from_parts(7_220_000, 503) + // Minimum execution time: 5_470 nanoseconds. + Weight::from_parts(6_860_000, 503) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -70,10 +70,10 @@ impl pallet_scheduler::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `114 + s * (181 ±0)` // Estimated: `13142` - // Minimum execution time: 4_780 nanoseconds. - Weight::from_parts(11_602_646, 13142) - // Standard Error: 11_992 - .saturating_add(Weight::from_parts(563_088, 0).saturating_mul(s.into())) + // Minimum execution time: 4_960 nanoseconds. + Weight::from_parts(14_259_953, 13142) + // Standard Error: 9_618 + .saturating_add(Weight::from_parts(592_955, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -81,8 +81,8 @@ impl pallet_scheduler::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 7_360 nanoseconds. - Weight::from_parts(7_750_000, 0) + // Minimum execution time: 8_310 nanoseconds. + Weight::from_parts(10_160_000, 0) } /// Storage: Preimage PreimageFor (r:1 w:1) /// Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: Measured) @@ -93,10 +93,10 @@ impl pallet_scheduler::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `211 + s * (1 ±0)` // Estimated: `5252 + s * (1 ±0)` - // Minimum execution time: 31_830 nanoseconds. - Weight::from_parts(37_380_000, 5252) - // Standard Error: 6 - .saturating_add(Weight::from_parts(2_229, 0).saturating_mul(s.into())) + // Minimum execution time: 31_790 nanoseconds. + Weight::from_parts(38_920_000, 5252) + // Standard Error: 5 + .saturating_add(Weight::from_parts(2_235, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(s.into())) @@ -107,29 +107,29 @@ impl pallet_scheduler::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 10_700 nanoseconds. - Weight::from_parts(13_030_000, 0).saturating_add(T::DbWeight::get().writes(1)) + // Minimum execution time: 10_830 nanoseconds. + Weight::from_parts(13_330_000, 0).saturating_add(T::DbWeight::get().writes(1)) } fn service_task_periodic() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 7_980 nanoseconds. - Weight::from_parts(8_790_000, 0) + // Minimum execution time: 8_280 nanoseconds. + Weight::from_parts(10_070_000, 0) } fn execute_dispatch_signed() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_680 nanoseconds. - Weight::from_parts(4_700_000, 0) + // Minimum execution time: 3_991 nanoseconds. + Weight::from_parts(4_521_000, 0) } fn execute_dispatch_unsigned() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_570 nanoseconds. - Weight::from_parts(4_540_000, 0) + // Minimum execution time: 3_930 nanoseconds. + Weight::from_parts(4_870_000, 0) } /// Storage: Scheduler Agenda (r:1 w:1) /// Proof: Scheduler Agenda (max_values: None, max_size: Some(10667), added: 13142, mode: MaxEncodedLen) @@ -138,10 +138,10 @@ impl pallet_scheduler::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `114 + s * (181 ±0)` // Estimated: `13142` - // Minimum execution time: 18_750 nanoseconds. - Weight::from_parts(25_732_878, 13142) - // Standard Error: 21_418 - .saturating_add(Weight::from_parts(627_490, 0).saturating_mul(s.into())) + // Minimum execution time: 19_530 nanoseconds. + Weight::from_parts(29_703_459, 13142) + // Standard Error: 12_535 + .saturating_add(Weight::from_parts(554_122, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -154,10 +154,10 @@ impl pallet_scheduler::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `114 + s * (181 ±0)` // Estimated: `13142` - // Minimum execution time: 23_610 nanoseconds. - Weight::from_parts(28_867_441, 13142) - // Standard Error: 12_753 - .saturating_add(Weight::from_parts(732_013, 0).saturating_mul(s.into())) + // Minimum execution time: 27_380 nanoseconds. + Weight::from_parts(30_580_865, 13142) + // Standard Error: 12_215 + .saturating_add(Weight::from_parts(815_578, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -170,10 +170,10 @@ impl pallet_scheduler::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `297 + s * (189 ±0)` // Estimated: `15669` - // Minimum execution time: 21_810 nanoseconds. - Weight::from_parts(34_859_221, 15669) - // Standard Error: 14_855 - .saturating_add(Weight::from_parts(533_329, 0).saturating_mul(s.into())) + // Minimum execution time: 24_630 nanoseconds. + Weight::from_parts(36_285_780, 15669) + // Standard Error: 15_060 + .saturating_add(Weight::from_parts(651_524, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -186,10 +186,10 @@ impl pallet_scheduler::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `321 + s * (189 ±0)` // Estimated: `15669` - // Minimum execution time: 26_600 nanoseconds. - Weight::from_parts(38_582_510, 15669) - // Standard Error: 24_205 - .saturating_add(Weight::from_parts(646_684, 0).saturating_mul(s.into())) + // Minimum execution time: 30_600 nanoseconds. + Weight::from_parts(36_381_187, 15669) + // Standard Error: 16_286 + .saturating_add(Weight::from_parts(803_864, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } diff --git a/runtime/common/src/weights/pallet_timestamp.rs b/runtime/common/src/weights/pallet_timestamp.rs index 1f872fb41..6a2b12cd7 100644 --- a/runtime/common/src/weights/pallet_timestamp.rs +++ b/runtime/common/src/weights/pallet_timestamp.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_timestamp //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: `2024-01-15`, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: `2024-04-02`, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `zeitgeist-benchmark`, CPU: `AMD EPYC 7601 32-Core Processor` //! EXECUTION: `Some(Wasm)`, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024` @@ -58,10 +58,10 @@ impl pallet_timestamp::weights::WeightInfo for WeightIn /// Proof: Aura CurrentSlot (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) fn set() -> Weight { // Proof Size summary in bytes: - // Measured: `256` + // Measured: `289` // Estimated: `1006` - // Minimum execution time: 22_220 nanoseconds. - Weight::from_parts(23_490_000, 1006) + // Minimum execution time: 22_760 nanoseconds. + Weight::from_parts(28_260_000, 1006) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -69,7 +69,7 @@ impl pallet_timestamp::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `128` // Estimated: `0` - // Minimum execution time: 8_560 nanoseconds. - Weight::from_parts(9_640_000, 0) + // Minimum execution time: 8_700 nanoseconds. + Weight::from_parts(8_900_000, 0) } } diff --git a/runtime/common/src/weights/pallet_treasury.rs b/runtime/common/src/weights/pallet_treasury.rs index 8cd14ef08..3fb9603da 100644 --- a/runtime/common/src/weights/pallet_treasury.rs +++ b/runtime/common/src/weights/pallet_treasury.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_treasury //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: `2024-01-15`, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: `2024-04-02`, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `zeitgeist-benchmark`, CPU: `AMD EPYC 7601 32-Core Processor` //! EXECUTION: `Some(Wasm)`, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024` @@ -60,10 +60,10 @@ impl pallet_treasury::weights::WeightInfo for WeightInf /// Proof: Treasury Proposals (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) fn spend() -> Weight { // Proof Size summary in bytes: - // Measured: `42` + // Measured: `80` // Estimated: `1396` - // Minimum execution time: 23_341 nanoseconds. - Weight::from_parts(24_721_000, 1396) + // Minimum execution time: 21_890 nanoseconds. + Weight::from_parts(23_400_000, 1396) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -73,10 +73,10 @@ impl pallet_treasury::weights::WeightInfo for WeightInf /// Proof: Treasury Proposals (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) fn propose_spend() -> Weight { // Proof Size summary in bytes: - // Measured: `179` + // Measured: `217` // Estimated: `499` - // Minimum execution time: 36_180 nanoseconds. - Weight::from_parts(37_520_000, 499) + // Minimum execution time: 33_560 nanoseconds. + Weight::from_parts(41_360_000, 499) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -86,10 +86,10 @@ impl pallet_treasury::weights::WeightInfo for WeightInf /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) fn reject_proposal() -> Weight { // Proof Size summary in bytes: - // Measured: `545` + // Measured: `583` // Estimated: `7797` - // Minimum execution time: 56_780 nanoseconds. - Weight::from_parts(58_360_000, 7797) + // Minimum execution time: 50_940 nanoseconds. + Weight::from_parts(52_731_000, 7797) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -100,12 +100,12 @@ impl pallet_treasury::weights::WeightInfo for WeightInf /// The range of component `p` is `[0, 99]`. fn approve_proposal(p: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `500 + p * (8 ±0)` + // Measured: `538 + p * (8 ±0)` // Estimated: `3480` - // Minimum execution time: 17_220 nanoseconds. - Weight::from_parts(22_887_238, 3480) - // Standard Error: 6_556 - .saturating_add(Weight::from_parts(35_460, 0).saturating_mul(p.into())) + // Minimum execution time: 16_280 nanoseconds. + Weight::from_parts(22_802_438, 3480) + // Standard Error: 3_480 + .saturating_add(Weight::from_parts(47_107, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -113,10 +113,10 @@ impl pallet_treasury::weights::WeightInfo for WeightInf /// Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) fn remove_approval() -> Weight { // Proof Size summary in bytes: - // Measured: `127` + // Measured: `165` // Estimated: `897` - // Minimum execution time: 13_500 nanoseconds. - Weight::from_parts(16_180_000, 897) + // Minimum execution time: 14_690 nanoseconds. + Weight::from_parts(15_010_000, 897) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -135,12 +135,12 @@ impl pallet_treasury::weights::WeightInfo for WeightInf /// The range of component `p` is `[0, 100]`. fn on_initialize_proposals(p: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `383 + p * (318 ±0)` + // Measured: `421 + p * (318 ±0)` // Estimated: `5423 + p * (7797 ±0)` - // Minimum execution time: 64_110 nanoseconds. - Weight::from_parts(112_864_897, 5423) - // Standard Error: 178_607 - .saturating_add(Weight::from_parts(45_837_241, 0).saturating_mul(p.into())) + // Minimum execution time: 65_130 nanoseconds. + Weight::from_parts(23_147_885, 5423) + // Standard Error: 194_401 + .saturating_add(Weight::from_parts(47_054_853, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(p.into()))) .saturating_add(T::DbWeight::get().writes(5)) diff --git a/runtime/common/src/weights/pallet_utility.rs b/runtime/common/src/weights/pallet_utility.rs index 0c0d143e8..720df677f 100644 --- a/runtime/common/src/weights/pallet_utility.rs +++ b/runtime/common/src/weights/pallet_utility.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_utility //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: `2024-01-15`, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: `2024-04-02`, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `zeitgeist-benchmark`, CPU: `AMD EPYC 7601 32-Core Processor` //! EXECUTION: `Some(Wasm)`, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024` @@ -57,43 +57,43 @@ impl pallet_utility::weights::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 10_870 nanoseconds. - Weight::from_parts(11_510_000, 0) - // Standard Error: 9_150 - .saturating_add(Weight::from_parts(6_647_766, 0).saturating_mul(c.into())) + // Minimum execution time: 10_800 nanoseconds. + Weight::from_parts(62_664_551, 0) + // Standard Error: 16_898 + .saturating_add(Weight::from_parts(6_509_047, 0).saturating_mul(c.into())) } fn as_derivative() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 7_520 nanoseconds. - Weight::from_parts(9_410_000, 0) + // Minimum execution time: 7_640 nanoseconds. + Weight::from_parts(8_280_000, 0) } /// The range of component `c` is `[0, 1000]`. fn batch_all(c: u32) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 10_510 nanoseconds. - Weight::from_parts(78_999_068, 0) - // Standard Error: 17_202 - .saturating_add(Weight::from_parts(6_728_886, 0).saturating_mul(c.into())) + // Minimum execution time: 10_960 nanoseconds. + Weight::from_parts(16_502_744, 0) + // Standard Error: 19_418 + .saturating_add(Weight::from_parts(6_791_423, 0).saturating_mul(c.into())) } fn dispatch_as() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 13_910 nanoseconds. - Weight::from_parts(14_460_000, 0) + // Minimum execution time: 13_670 nanoseconds. + Weight::from_parts(17_280_000, 0) } /// The range of component `c` is `[0, 1000]`. fn force_batch(c: u32) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 11_260 nanoseconds. - Weight::from_parts(8_094_244, 0) - // Standard Error: 58_787 - .saturating_add(Weight::from_parts(6_673_782, 0).saturating_mul(c.into())) + // Minimum execution time: 11_190 nanoseconds. + Weight::from_parts(45_743_448, 0) + // Standard Error: 18_905 + .saturating_add(Weight::from_parts(6_581_781, 0).saturating_mul(c.into())) } } diff --git a/runtime/common/src/weights/pallet_vesting.rs b/runtime/common/src/weights/pallet_vesting.rs index 460b986e7..a3f13b76e 100644 --- a/runtime/common/src/weights/pallet_vesting.rs +++ b/runtime/common/src/weights/pallet_vesting.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_vesting //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: `2024-01-15`, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: `2024-04-02`, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `zeitgeist-benchmark`, CPU: `AMD EPYC 7601 32-Core Processor` //! EXECUTION: `Some(Wasm)`, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024` @@ -58,16 +58,14 @@ impl pallet_vesting::weights::WeightInfo for WeightInfo /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[1, 28]`. - fn vest_locked(l: u32, s: u32) -> Weight { + fn vest_locked(l: u32, _s: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `405 + l * (25 ±0) + s * (40 ±0)` + // Measured: `438 + l * (25 ±0) + s * (40 ±0)` // Estimated: `7418` - // Minimum execution time: 38_830 nanoseconds. - Weight::from_parts(40_243_387, 7418) - // Standard Error: 13_742 - .saturating_add(Weight::from_parts(93_058, 0).saturating_mul(l.into())) - // Standard Error: 24_449 - .saturating_add(Weight::from_parts(163_917, 0).saturating_mul(s.into())) + // Minimum execution time: 38_030 nanoseconds. + Weight::from_parts(45_370_700, 7418) + // Standard Error: 9_518 + .saturating_add(Weight::from_parts(35_470, 0).saturating_mul(l.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -79,14 +77,14 @@ impl pallet_vesting::weights::WeightInfo for WeightInfo /// The range of component `s` is `[1, 28]`. fn vest_unlocked(l: u32, s: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `405 + l * (25 ±0) + s * (40 ±0)` + // Measured: `438 + l * (25 ±0) + s * (40 ±0)` // Estimated: `7418` - // Minimum execution time: 38_450 nanoseconds. - Weight::from_parts(43_347_252, 7418) - // Standard Error: 9_766 - .saturating_add(Weight::from_parts(48_570, 0).saturating_mul(l.into())) - // Standard Error: 17_375 - .saturating_add(Weight::from_parts(17_934, 0).saturating_mul(s.into())) + // Minimum execution time: 37_750 nanoseconds. + Weight::from_parts(43_409_597, 7418) + // Standard Error: 9_925 + .saturating_add(Weight::from_parts(66_173, 0).saturating_mul(l.into())) + // Standard Error: 17_659 + .saturating_add(Weight::from_parts(41_674, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -98,16 +96,14 @@ impl pallet_vesting::weights::WeightInfo for WeightInfo /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[1, 28]`. - fn vest_other_locked(l: u32, s: u32) -> Weight { + fn vest_other_locked(l: u32, _s: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `544 + l * (25 ±0) + s * (40 ±0)` + // Measured: `577 + l * (25 ±0) + s * (40 ±0)` // Estimated: `10025` - // Minimum execution time: 43_880 nanoseconds. - Weight::from_parts(46_021_890, 10025) - // Standard Error: 12_235 - .saturating_add(Weight::from_parts(93_769, 0).saturating_mul(l.into())) - // Standard Error: 21_768 - .saturating_add(Weight::from_parts(115_349, 0).saturating_mul(s.into())) + // Minimum execution time: 43_120 nanoseconds. + Weight::from_parts(60_360_304, 10025) + // Standard Error: 11_650 + .saturating_add(Weight::from_parts(3_405, 0).saturating_mul(l.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -119,16 +115,14 @@ impl pallet_vesting::weights::WeightInfo for WeightInfo /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[1, 28]`. - fn vest_other_unlocked(l: u32, s: u32) -> Weight { + fn vest_other_unlocked(l: u32, _s: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `544 + l * (25 ±0) + s * (40 ±0)` + // Measured: `577 + l * (25 ±0) + s * (40 ±0)` // Estimated: `10025` - // Minimum execution time: 43_890 nanoseconds. - Weight::from_parts(45_171_083, 10025) - // Standard Error: 14_381 - .saturating_add(Weight::from_parts(100_199, 0).saturating_mul(l.into())) - // Standard Error: 25_587 - .saturating_add(Weight::from_parts(158_229, 0).saturating_mul(s.into())) + // Minimum execution time: 43_141 nanoseconds. + Weight::from_parts(51_048_294, 10025) + // Standard Error: 10_316 + .saturating_add(Weight::from_parts(87_064, 0).saturating_mul(l.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -140,14 +134,12 @@ impl pallet_vesting::weights::WeightInfo for WeightInfo /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[0, 27]`. - fn vested_transfer(l: u32, _s: u32) -> Weight { + fn vested_transfer(_l: u32, _s: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `615 + l * (25 ±0) + s * (40 ±0)` + // Measured: `648 + l * (25 ±0) + s * (40 ±0)` // Estimated: `10025` - // Minimum execution time: 62_820 nanoseconds. - Weight::from_parts(74_828_952, 10025) - // Standard Error: 20_587 - .saturating_add(Weight::from_parts(27_325, 0).saturating_mul(l.into())) + // Minimum execution time: 61_871 nanoseconds. + Weight::from_parts(79_902_681, 10025) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -161,12 +153,12 @@ impl pallet_vesting::weights::WeightInfo for WeightInfo /// The range of component `s` is `[0, 27]`. fn force_vested_transfer(l: u32, _s: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `754 + l * (25 ±0) + s * (40 ±0)` + // Measured: `787 + l * (25 ±0) + s * (40 ±0)` // Estimated: `12632` - // Minimum execution time: 66_680 nanoseconds. - Weight::from_parts(78_411_765, 12632) - // Standard Error: 16_120 - .saturating_add(Weight::from_parts(6_898, 0).saturating_mul(l.into())) + // Minimum execution time: 65_900 nanoseconds. + Weight::from_parts(76_586_791, 12632) + // Standard Error: 15_299 + .saturating_add(Weight::from_parts(64_045, 0).saturating_mul(l.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -178,12 +170,14 @@ impl pallet_vesting::weights::WeightInfo for WeightInfo /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[2, 28]`. - fn not_unlocking_merge_schedules(_l: u32, _s: u32) -> Weight { + fn not_unlocking_merge_schedules(_l: u32, s: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `542 + l * (25 ±0) + s * (40 ±0)` + // Measured: `575 + l * (25 ±0) + s * (40 ±0)` // Estimated: `10025` - // Minimum execution time: 45_190 nanoseconds. - Weight::from_parts(54_486_163, 10025) + // Minimum execution time: 45_010 nanoseconds. + Weight::from_parts(53_524_739, 10025) + // Standard Error: 18_301 + .saturating_add(Weight::from_parts(3_389, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -195,16 +189,14 @@ impl pallet_vesting::weights::WeightInfo for WeightInfo /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[2, 28]`. - fn unlocking_merge_schedules(l: u32, s: u32) -> Weight { + fn unlocking_merge_schedules(l: u32, _s: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `542 + l * (25 ±0) + s * (40 ±0)` + // Measured: `575 + l * (25 ±0) + s * (40 ±0)` // Estimated: `10025` - // Minimum execution time: 45_100 nanoseconds. - Weight::from_parts(46_158_877, 10025) - // Standard Error: 14_211 - .saturating_add(Weight::from_parts(105_475, 0).saturating_mul(l.into())) - // Standard Error: 26_245 - .saturating_add(Weight::from_parts(168_563, 0).saturating_mul(s.into())) + // Minimum execution time: 43_770 nanoseconds. + Weight::from_parts(53_579_223, 10025) + // Standard Error: 9_606 + .saturating_add(Weight::from_parts(46_097, 0).saturating_mul(l.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } diff --git a/runtime/zeitgeist/Cargo.toml b/runtime/zeitgeist/Cargo.toml index 949e46a7c..dd13d35c2 100644 --- a/runtime/zeitgeist/Cargo.toml +++ b/runtime/zeitgeist/Cargo.toml @@ -415,7 +415,7 @@ force-debug = ["sp-debug-derive/force-debug"] authors = ["Zeitgeist PM "] edition = "2021" name = "zeitgeist-runtime" -version = "0.5.0" +version = "0.5.1" [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] diff --git a/runtime/zeitgeist/src/lib.rs b/runtime/zeitgeist/src/lib.rs index b0790d71d..b8d2e1b4d 100644 --- a/runtime/zeitgeist/src/lib.rs +++ b/runtime/zeitgeist/src/lib.rs @@ -94,10 +94,10 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("zeitgeist"), impl_name: create_runtime_str!("zeitgeist"), authoring_version: 1, - spec_version: 53, + spec_version: 54, impl_version: 1, apis: RUNTIME_API_VERSIONS, - transaction_version: 27, + transaction_version: 28, state_version: 1, }; diff --git a/zrml/authorized/Cargo.toml b/zrml/authorized/Cargo.toml index b55fdd302..df6c712e1 100644 --- a/zrml/authorized/Cargo.toml +++ b/zrml/authorized/Cargo.toml @@ -39,4 +39,4 @@ try-runtime = [ authors = ["Zeitgeist PM "] edition = "2021" name = "zrml-authorized" -version = "0.5.0" +version = "0.5.1" diff --git a/zrml/authorized/src/mock.rs b/zrml/authorized/src/mock.rs index 5669d8096..79768a916 100644 --- a/zrml/authorized/src/mock.rs +++ b/zrml/authorized/src/mock.rs @@ -38,8 +38,8 @@ use zeitgeist_primitives::{ }, traits::{DisputeResolutionApi, MarketOfDisputeResolutionApi}, types::{ - AccountIdTest, Balance, BlockNumber, BlockTest, Hash, Index, MarketId, Moment, - UncheckedExtrinsicTest, + AccountIdTest, Balance, BlockNumber, BlockTest, Hash, Index, MarketId, + Moment, UncheckedExtrinsicTest, }, }; diff --git a/zrml/authorized/src/weights.rs b/zrml/authorized/src/weights.rs index 97bcaf1b3..d3d836149 100644 --- a/zrml/authorized/src/weights.rs +++ b/zrml/authorized/src/weights.rs @@ -19,13 +19,13 @@ //! Autogenerated weights for zrml_authorized //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: `2024-01-15`, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: `2024-04-02`, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `zafoi`, CPU: `AMD Ryzen 9 5900X 12-Core Processor` -//! EXECUTION: `Some(Native)`, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024` +//! HOSTNAME: `zeitgeist-benchmark`, CPU: `AMD EPYC 7601 32-Core Processor` +//! EXECUTION: `Some(Wasm)`, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024` // Executed Command: -// ./target/release/zeitgeist +// ./target/production/zeitgeist // benchmark // pallet // --chain=dev @@ -33,7 +33,7 @@ // --repeat=20 // --pallet=zrml_authorized // --extrinsic=* -// --execution=native +// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --template=./misc/weight_template.hbs @@ -64,7 +64,7 @@ pub trait WeightInfoZeitgeist { pub struct WeightInfo(PhantomData); impl WeightInfoZeitgeist for WeightInfo { /// Storage: MarketCommons Markets (r:1 w:0) - /// Proof: MarketCommons Markets (max_values: None, max_size: Some(678), added: 3153, mode: MaxEncodedLen) + /// Proof: MarketCommons Markets (max_values: None, max_size: Some(676), added: 3151, mode: MaxEncodedLen) /// Storage: Authorized AuthorizedOutcomeReports (r:1 w:1) /// Proof: Authorized AuthorizedOutcomeReports (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen) /// Storage: PredictionMarkets MarketIdsPerDisputeBlock (r:1 w:1) @@ -72,25 +72,25 @@ impl WeightInfoZeitgeist for WeightInfo { /// The range of component `m` is `[1, 63]`. fn authorize_market_outcome_first_report(m: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `805 + m * (22 ±0)` - // Estimated: `9194` - // Minimum execution time: 40_600 nanoseconds. - Weight::from_parts(46_642_457, 9194) - // Standard Error: 26_413 - .saturating_add(Weight::from_parts(190_563, 0).saturating_mul(m.into())) + // Measured: `838 + m * (22 ±0)` + // Estimated: `9192` + // Minimum execution time: 39_680 nanoseconds. + Weight::from_parts(46_488_180, 9192) + // Standard Error: 9_632 + .saturating_add(Weight::from_parts(62_910, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } /// Storage: MarketCommons Markets (r:1 w:0) - /// Proof: MarketCommons Markets (max_values: None, max_size: Some(678), added: 3153, mode: MaxEncodedLen) + /// Proof: MarketCommons Markets (max_values: None, max_size: Some(676), added: 3151, mode: MaxEncodedLen) /// Storage: Authorized AuthorizedOutcomeReports (r:1 w:1) /// Proof: Authorized AuthorizedOutcomeReports (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen) fn authorize_market_outcome_existing_report() -> Weight { // Proof Size summary in bytes: // Measured: `610` - // Estimated: `5677` - // Minimum execution time: 35_410 nanoseconds. - Weight::from_parts(36_251_000, 5677) + // Estimated: `5675` + // Minimum execution time: 35_000 nanoseconds. + Weight::from_parts(35_660_000, 5675) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -98,8 +98,8 @@ impl WeightInfoZeitgeist for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 290 nanoseconds. - Weight::from_parts(320_000, 0) + // Minimum execution time: 270 nanoseconds. + Weight::from_parts(330_000, 0) } /// Storage: Authorized AuthorizedOutcomeReports (r:1 w:1) /// Proof: Authorized AuthorizedOutcomeReports (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen) @@ -107,8 +107,8 @@ impl WeightInfoZeitgeist for WeightInfo { // Proof Size summary in bytes: // Measured: `250` // Estimated: `2524` - // Minimum execution time: 10_110 nanoseconds. - Weight::from_parts(12_690_000, 2524) + // Minimum execution time: 10_240 nanoseconds. + Weight::from_parts(13_170_000, 2524) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -116,8 +116,8 @@ impl WeightInfoZeitgeist for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_680 nanoseconds. - Weight::from_parts(2_980_000, 0) + // Minimum execution time: 2_780 nanoseconds. + Weight::from_parts(3_200_000, 0) } /// Storage: Authorized AuthorizedOutcomeReports (r:1 w:0) /// Proof: Authorized AuthorizedOutcomeReports (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen) @@ -125,21 +125,21 @@ impl WeightInfoZeitgeist for WeightInfo { // Proof Size summary in bytes: // Measured: `250` // Estimated: `2524` - // Minimum execution time: 9_200 nanoseconds. - Weight::from_parts(9_520_000, 2524).saturating_add(T::DbWeight::get().reads(1)) + // Minimum execution time: 9_350 nanoseconds. + Weight::from_parts(9_680_000, 2524).saturating_add(T::DbWeight::get().reads(1)) } fn has_failed_weight() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 250 nanoseconds. - Weight::from_parts(280_000, 0) + // Minimum execution time: 280 nanoseconds. + Weight::from_parts(330_000, 0) } fn on_global_dispute_weight() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 270 nanoseconds. + // Minimum execution time: 280 nanoseconds. Weight::from_parts(310_000, 0) } /// Storage: Authorized AuthorizedOutcomeReports (r:0 w:1) @@ -148,7 +148,7 @@ impl WeightInfoZeitgeist for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_390 nanoseconds. - Weight::from_parts(2_970_000, 0).saturating_add(T::DbWeight::get().writes(1)) + // Minimum execution time: 2_440 nanoseconds. + Weight::from_parts(2_730_000, 0).saturating_add(T::DbWeight::get().writes(1)) } } diff --git a/zrml/court/Cargo.toml b/zrml/court/Cargo.toml index 6e1071d7a..e493ef843 100644 --- a/zrml/court/Cargo.toml +++ b/zrml/court/Cargo.toml @@ -48,4 +48,4 @@ try-runtime = [ authors = ["Zeitgeist PM "] edition = "2021" name = "zrml-court" -version = "0.5.0" +version = "0.5.1" diff --git a/zrml/court/src/mock.rs b/zrml/court/src/mock.rs index 6af67d134..969a42525 100644 --- a/zrml/court/src/mock.rs +++ b/zrml/court/src/mock.rs @@ -40,8 +40,8 @@ use zeitgeist_primitives::{ }, traits::{DisputeResolutionApi, MarketOfDisputeResolutionApi}, types::{ - AccountIdTest, Balance, BlockNumber, BlockTest, Hash, Index, MarketId, Moment, - UncheckedExtrinsicTest, + AccountIdTest, Balance, BlockNumber, BlockTest, Hash, Index, MarketId, + Moment, UncheckedExtrinsicTest, }, }; diff --git a/zrml/court/src/weights.rs b/zrml/court/src/weights.rs index e36156997..ee41164dd 100644 --- a/zrml/court/src/weights.rs +++ b/zrml/court/src/weights.rs @@ -19,13 +19,13 @@ //! Autogenerated weights for zrml_court //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: `2024-01-15`, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: `2024-04-02`, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `zafoi`, CPU: `AMD Ryzen 9 5900X 12-Core Processor` -//! EXECUTION: `Some(Native)`, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024` +//! HOSTNAME: `zeitgeist-benchmark`, CPU: `AMD EPYC 7601 32-Core Processor` +//! EXECUTION: `Some(Wasm)`, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024` // Executed Command: -// ./target/release/zeitgeist +// ./target/production/zeitgeist // benchmark // pallet // --chain=dev @@ -33,7 +33,7 @@ // --repeat=20 // --pallet=zrml_court // --extrinsic=* -// --execution=native +// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --template=./misc/weight_template.hbs @@ -75,7 +75,7 @@ pub trait WeightInfoZeitgeist { pub struct WeightInfo(PhantomData); impl WeightInfoZeitgeist for WeightInfo { /// Storage: Court CourtPool (r:1 w:1) - /// Proof: Court CourtPool (max_values: Some(1), max_size: Some(72002), added: 72497, mode: MaxEncodedLen) + /// Proof: Court CourtPool (max_values: Some(1), max_size: Some(96002), added: 96497, mode: MaxEncodedLen) /// Storage: Court Participants (r:1 w:1) /// Proof: Court Participants (max_values: None, max_size: Some(251), added: 2726, mode: MaxEncodedLen) /// Storage: Balances Locks (r:1 w:1) @@ -83,17 +83,17 @@ impl WeightInfoZeitgeist for WeightInfo { /// The range of component `j` is `[0, 999]`. fn join_court(j: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `1122 + j * (72 ±0)` - // Estimated: `78997` - // Minimum execution time: 48_070 nanoseconds. - Weight::from_parts(53_578_638, 78997) - // Standard Error: 1_163 - .saturating_add(Weight::from_parts(123_220, 0).saturating_mul(j.into())) + // Measured: `1179 + j * (96 ±0)` + // Estimated: `102997` + // Minimum execution time: 47_770 nanoseconds. + Weight::from_parts(49_025_721, 102997) + // Standard Error: 1_445 + .saturating_add(Weight::from_parts(166_850, 0).saturating_mul(j.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } /// Storage: Court CourtPool (r:1 w:1) - /// Proof: Court CourtPool (max_values: Some(1), max_size: Some(72002), added: 72497, mode: MaxEncodedLen) + /// Proof: Court CourtPool (max_values: Some(1), max_size: Some(96002), added: 96497, mode: MaxEncodedLen) /// Storage: Court Participants (r:6 w:1) /// Proof: Court Participants (max_values: None, max_size: Some(251), added: 2726, mode: MaxEncodedLen) /// Storage: Balances Locks (r:1 w:1) @@ -102,14 +102,14 @@ impl WeightInfoZeitgeist for WeightInfo { /// The range of component `d` is `[1, 5]`. fn delegate(j: u32, d: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `0 + j * (74 ±0) + d * (683 ±0)` - // Estimated: `78997 + d * (2726 ±0)` - // Minimum execution time: 81_570 nanoseconds. - Weight::from_parts(49_772_271, 78997) - // Standard Error: 1_786 - .saturating_add(Weight::from_parts(165_209, 0).saturating_mul(j.into())) - // Standard Error: 387_683 - .saturating_add(Weight::from_parts(8_924_347, 0).saturating_mul(d.into())) + // Measured: `0 + j * (98 ±0) + d * (683 ±0)` + // Estimated: `102997 + d * (2726 ±0)` + // Minimum execution time: 82_510 nanoseconds. + Weight::from_parts(46_003_031, 102997) + // Standard Error: 1_999 + .saturating_add(Weight::from_parts(211_518, 0).saturating_mul(j.into())) + // Standard Error: 434_031 + .saturating_add(Weight::from_parts(9_366_410, 0).saturating_mul(d.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(d.into()))) .saturating_add(T::DbWeight::get().writes(3)) @@ -118,16 +118,16 @@ impl WeightInfoZeitgeist for WeightInfo { /// Storage: Court Participants (r:1 w:1) /// Proof: Court Participants (max_values: None, max_size: Some(251), added: 2726, mode: MaxEncodedLen) /// Storage: Court CourtPool (r:1 w:1) - /// Proof: Court CourtPool (max_values: Some(1), max_size: Some(72002), added: 72497, mode: MaxEncodedLen) + /// Proof: Court CourtPool (max_values: Some(1), max_size: Some(96002), added: 96497, mode: MaxEncodedLen) /// The range of component `j` is `[0, 999]`. fn prepare_exit_court(j: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `1060 + j * (72 ±0)` - // Estimated: `75223` - // Minimum execution time: 31_170 nanoseconds. - Weight::from_parts(39_874_247, 75223) - // Standard Error: 1_059 - .saturating_add(Weight::from_parts(104_918, 0).saturating_mul(j.into())) + // Measured: `1117 + j * (96 ±0)` + // Estimated: `99223` + // Minimum execution time: 32_390 nanoseconds. + Weight::from_parts(47_006_282, 99223) + // Standard Error: 1_246 + .saturating_add(Weight::from_parts(131_629, 0).saturating_mul(j.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -139,8 +139,8 @@ impl WeightInfoZeitgeist for WeightInfo { // Proof Size summary in bytes: // Measured: `340` // Estimated: `6500` - // Minimum execution time: 42_610 nanoseconds. - Weight::from_parts(44_230_000, 6500) + // Minimum execution time: 42_680 nanoseconds. + Weight::from_parts(51_700_000, 6500) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -152,8 +152,8 @@ impl WeightInfoZeitgeist for WeightInfo { // Proof Size summary in bytes: // Measured: `340` // Estimated: `6500` - // Minimum execution time: 37_370 nanoseconds. - Weight::from_parts(43_080_000, 6500) + // Minimum execution time: 41_250 nanoseconds. + Weight::from_parts(50_460_000, 6500) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -164,19 +164,19 @@ impl WeightInfoZeitgeist for WeightInfo { /// The range of component `d` is `[1, 510]`. fn vote(d: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `451 + d * (53 ±0)` + // Measured: `484 + d * (53 ±0)` // Estimated: `155273` - // Minimum execution time: 55_760 nanoseconds. - Weight::from_parts(63_696_914, 155273) - // Standard Error: 1_663 - .saturating_add(Weight::from_parts(128_245, 0).saturating_mul(d.into())) + // Minimum execution time: 55_530 nanoseconds. + Weight::from_parts(64_922_164, 155273) + // Standard Error: 2_282 + .saturating_add(Weight::from_parts(174_248, 0).saturating_mul(d.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: Court CourtIdToMarketId (r:1 w:0) /// Proof: Court CourtIdToMarketId (max_values: None, max_size: Some(40), added: 2515, mode: MaxEncodedLen) /// Storage: MarketCommons Markets (r:1 w:0) - /// Proof: MarketCommons Markets (max_values: None, max_size: Some(678), added: 3153, mode: MaxEncodedLen) + /// Proof: MarketCommons Markets (max_values: None, max_size: Some(676), added: 3151, mode: MaxEncodedLen) /// Storage: Court Participants (r:1 w:0) /// Proof: Court Participants (max_values: None, max_size: Some(251), added: 2726, mode: MaxEncodedLen) /// Storage: Court Courts (r:1 w:0) @@ -186,19 +186,19 @@ impl WeightInfoZeitgeist for WeightInfo { /// The range of component `d` is `[1, 510]`. fn denounce_vote(d: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `1576 + d * (53 ±0)` - // Estimated: `163667` - // Minimum execution time: 60_591 nanoseconds. - Weight::from_parts(68_553_544, 163667) - // Standard Error: 2_739 - .saturating_add(Weight::from_parts(209_821, 0).saturating_mul(d.into())) + // Measured: `1609 + d * (53 ±0)` + // Estimated: `163665` + // Minimum execution time: 59_620 nanoseconds. + Weight::from_parts(71_363_111, 163665) + // Standard Error: 3_027 + .saturating_add(Weight::from_parts(236_470, 0).saturating_mul(d.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: Court CourtIdToMarketId (r:1 w:0) /// Proof: Court CourtIdToMarketId (max_values: None, max_size: Some(40), added: 2515, mode: MaxEncodedLen) /// Storage: MarketCommons Markets (r:1 w:0) - /// Proof: MarketCommons Markets (max_values: None, max_size: Some(678), added: 3153, mode: MaxEncodedLen) + /// Proof: MarketCommons Markets (max_values: None, max_size: Some(676), added: 3151, mode: MaxEncodedLen) /// Storage: Court Participants (r:1 w:0) /// Proof: Court Participants (max_values: None, max_size: Some(251), added: 2726, mode: MaxEncodedLen) /// Storage: Court Courts (r:1 w:0) @@ -208,12 +208,12 @@ impl WeightInfoZeitgeist for WeightInfo { /// The range of component `d` is `[1, 510]`. fn reveal_vote(d: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `2146 + d * (53 ±0)` - // Estimated: `163667` - // Minimum execution time: 98_871 nanoseconds. - Weight::from_parts(112_254_457, 163667) - // Standard Error: 2_693 - .saturating_add(Weight::from_parts(122_916, 0).saturating_mul(d.into())) + // Measured: `2179 + d * (53 ±0)` + // Estimated: `163665` + // Minimum execution time: 97_350 nanoseconds. + Weight::from_parts(111_113_722, 163665) + // Standard Error: 3_155 + .saturating_add(Weight::from_parts(165_701, 0).saturating_mul(d.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -222,11 +222,11 @@ impl WeightInfoZeitgeist for WeightInfo { /// Storage: Court CourtIdToMarketId (r:1 w:0) /// Proof: Court CourtIdToMarketId (max_values: None, max_size: Some(40), added: 2515, mode: MaxEncodedLen) /// Storage: MarketCommons Markets (r:1 w:0) - /// Proof: MarketCommons Markets (max_values: None, max_size: Some(678), added: 3153, mode: MaxEncodedLen) + /// Proof: MarketCommons Markets (max_values: None, max_size: Some(676), added: 3151, mode: MaxEncodedLen) /// Storage: Court SelectedDraws (r:1 w:1) /// Proof: Court SelectedDraws (max_values: None, max_size: Some(149974), added: 152449, mode: MaxEncodedLen) /// Storage: Court CourtPool (r:1 w:1) - /// Proof: Court CourtPool (max_values: Some(1), max_size: Some(72002), added: 72497, mode: MaxEncodedLen) + /// Proof: Court CourtPool (max_values: Some(1), max_size: Some(96002), added: 96497, mode: MaxEncodedLen) /// Storage: Court SelectionNonce (r:1 w:1) /// Proof: Court SelectionNonce (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) /// Storage: RandomnessCollectiveFlip RandomMaterial (r:1 w:0) @@ -245,14 +245,14 @@ impl WeightInfoZeitgeist for WeightInfo { /// The range of component `f` is `[0, 62]`. fn appeal(j: u32, a: u32, _r: u32, _f: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `880 + j * (129 ±0) + a * (27536 ±0) + r * (16 ±0) + f * (16 ±0)` - // Estimated: `515439 + j * (194 ±3) + a * (318078 ±1_049)` - // Minimum execution time: 3_512_041 nanoseconds. - Weight::from_parts(3_757_631_000, 515439) - // Standard Error: 80_324 - .saturating_add(Weight::from_parts(5_861_528, 0).saturating_mul(j.into())) - // Standard Error: 27_966_670 - .saturating_add(Weight::from_parts(4_428_133_284, 0).saturating_mul(a.into())) + // Measured: `913 + j * (153 ±0) + a * (27536 ±0) + r * (16 ±0) + f * (16 ±0)` + // Estimated: `539437 + j * (194 ±3) + a * (318078 ±1_049)` + // Minimum execution time: 3_947_303 nanoseconds. + Weight::from_parts(4_297_984_000, 539437) + // Standard Error: 98_993 + .saturating_add(Weight::from_parts(7_176_777, 0).saturating_mul(j.into())) + // Standard Error: 34_466_583 + .saturating_add(Weight::from_parts(4_809_431_368, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().reads((127_u64).saturating_mul(a.into()))) .saturating_add(T::DbWeight::get().writes(100)) @@ -271,12 +271,12 @@ impl WeightInfoZeitgeist for WeightInfo { /// The range of component `d` is `[5, 510]`. fn reassign_court_stakes(d: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `1011 + d * (587 ±0)` + // Measured: `1044 + d * (587 ±0)` // Estimated: `157880 + d * (5333 ±0)` - // Minimum execution time: 154_111 nanoseconds. - Weight::from_parts(176_730_000, 157880) - // Standard Error: 111_534 - .saturating_add(Weight::from_parts(67_369_442, 0).saturating_mul(d.into())) + // Minimum execution time: 154_191 nanoseconds. + Weight::from_parts(177_191_000, 157880) + // Standard Error: 148_180 + .saturating_add(Weight::from_parts(66_347_299, 0).saturating_mul(d.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(d.into()))) .saturating_add(T::DbWeight::get().writes(2)) @@ -289,23 +289,31 @@ impl WeightInfoZeitgeist for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 17_290 nanoseconds. - Weight::from_parts(22_370_000, 0).saturating_add(T::DbWeight::get().writes(1)) + // Minimum execution time: 15_200 nanoseconds. + Weight::from_parts(17_540_000, 0).saturating_add(T::DbWeight::get().writes(1)) } /// Storage: Court YearlyInflation (r:1 w:0) /// Proof: Court YearlyInflation (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: Court CourtPool (r:1 w:0) + /// Proof: Court CourtPool (max_values: Some(1), max_size: Some(96002), added: 96497, mode: MaxEncodedLen) + /// Storage: System Account (r:999 w:999) + /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) /// The range of component `j` is `[1, 1000]`. - fn handle_inflation(_j: u32) -> Weight { + fn handle_inflation(j: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `264 + j * (243 ±0)` - // Estimated: `2679996` - // Minimum execution time: 15_180 nanoseconds. - Weight::from_parts(6_159_567_000, 2679996) - .saturating_add(T::DbWeight::get().reads(1002)) - .saturating_add(T::DbWeight::get().writes(1000)) + // Measured: `0 + j * (267 ±0)` + // Estimated: `96996 + j * (2607 ±0)` + // Minimum execution time: 41_400 nanoseconds. + Weight::from_parts(43_650_000, 96996) + // Standard Error: 28_443 + .saturating_add(Weight::from_parts(20_158_777, 0).saturating_mul(j.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(j.into()))) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(j.into()))) + .saturating_add(Weight::from_parts(0, 2607).saturating_mul(j.into())) } /// Storage: Court CourtPool (r:1 w:1) - /// Proof: Court CourtPool (max_values: Some(1), max_size: Some(72002), added: 72497, mode: MaxEncodedLen) + /// Proof: Court CourtPool (max_values: Some(1), max_size: Some(96002), added: 96497, mode: MaxEncodedLen) /// Storage: Court SelectionNonce (r:1 w:1) /// Proof: Court SelectionNonce (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) /// Storage: RandomnessCollectiveFlip RandomMaterial (r:1 w:0) @@ -315,12 +323,12 @@ impl WeightInfoZeitgeist for WeightInfo { /// The range of component `a` is `[0, 3]`. fn select_participants(a: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `90735 + a * (16253 ±0)` - // Estimated: `151425 + a * (136685 ±1_677)` - // Minimum execution time: 1_553_414 nanoseconds. - Weight::from_parts(1_418_346_039, 151425) - // Standard Error: 42_495_557 - .saturating_add(Weight::from_parts(2_742_869_543, 0).saturating_mul(a.into())) + // Measured: `114768 + a * (16253 ±0)` + // Estimated: `175425 + a * (136685 ±1_677)` + // Minimum execution time: 1_765_266 nanoseconds. + Weight::from_parts(1_501_331_092, 175425) + // Standard Error: 43_997_267 + .saturating_add(Weight::from_parts(3_093_112_205, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(31)) .saturating_add(T::DbWeight::get().reads((50_u64).saturating_mul(a.into()))) .saturating_add(T::DbWeight::get().writes(26)) @@ -330,7 +338,7 @@ impl WeightInfoZeitgeist for WeightInfo { /// Storage: Court NextCourtId (r:1 w:1) /// Proof: Court NextCourtId (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) /// Storage: Court CourtPool (r:1 w:1) - /// Proof: Court CourtPool (max_values: Some(1), max_size: Some(72002), added: 72497, mode: MaxEncodedLen) + /// Proof: Court CourtPool (max_values: Some(1), max_size: Some(96002), added: 96497, mode: MaxEncodedLen) /// Storage: Court SelectionNonce (r:1 w:1) /// Proof: Court SelectionNonce (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) /// Storage: RandomnessCollectiveFlip RandomMaterial (r:1 w:0) @@ -353,14 +361,14 @@ impl WeightInfoZeitgeist for WeightInfo { /// The range of component `r` is `[0, 62]`. fn on_dispute(j: u32, r: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `6187 + j * (80 ±0) + r * (16 ±0)` - // Estimated: `157024 + j * (8 ±0) + r * (25 ±4)` - // Minimum execution time: 305_361 nanoseconds. - Weight::from_parts(406_257_471, 157024) - // Standard Error: 5_212 - .saturating_add(Weight::from_parts(234_425, 0).saturating_mul(j.into())) - // Standard Error: 80_784 - .saturating_add(Weight::from_parts(320_266, 0).saturating_mul(r.into())) + // Measured: `6220 + j * (104 ±0) + r * (16 ±0)` + // Estimated: `181024 + j * (8 ±0) + r * (25 ±4)` + // Minimum execution time: 303_281 nanoseconds. + Weight::from_parts(402_763_691, 181024) + // Standard Error: 5_171 + .saturating_add(Weight::from_parts(255_864, 0).saturating_mul(j.into())) + // Standard Error: 80_156 + .saturating_add(Weight::from_parts(45_042, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(34)) .saturating_add(T::DbWeight::get().writes(36)) .saturating_add(Weight::from_parts(0, 8).saturating_mul(j.into())) @@ -375,18 +383,18 @@ impl WeightInfoZeitgeist for WeightInfo { /// Storage: Court CourtIdToMarketId (r:1 w:0) /// Proof: Court CourtIdToMarketId (max_values: None, max_size: Some(40), added: 2515, mode: MaxEncodedLen) /// Storage: MarketCommons Markets (r:1 w:0) - /// Proof: MarketCommons Markets (max_values: None, max_size: Some(678), added: 3153, mode: MaxEncodedLen) + /// Proof: MarketCommons Markets (max_values: None, max_size: Some(676), added: 3151, mode: MaxEncodedLen) /// Storage: Court Participants (r:510 w:510) /// Proof: Court Participants (max_values: None, max_size: Some(251), added: 2726, mode: MaxEncodedLen) /// The range of component `d` is `[1, 510]`. fn on_resolution(d: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `970 + d * (256 ±0)` - // Estimated: `163456 + d * (2726 ±0)` - // Minimum execution time: 49_430 nanoseconds. - Weight::from_parts(51_040_000, 163456) - // Standard Error: 22_733 - .saturating_add(Weight::from_parts(7_308_501, 0).saturating_mul(d.into())) + // Measured: `1003 + d * (256 ±0)` + // Estimated: `163454 + d * (2726 ±0)` + // Minimum execution time: 47_570 nanoseconds. + Weight::from_parts(49_460_000, 163454) + // Standard Error: 17_645 + .saturating_add(Weight::from_parts(7_322_013, 0).saturating_mul(d.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(d.into()))) .saturating_add(T::DbWeight::get().writes(1)) @@ -404,12 +412,12 @@ impl WeightInfoZeitgeist for WeightInfo { /// The range of component `a` is `[0, 4]`. fn exchange(a: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `420 + a * (352 ±0)` + // Measured: `453 + a * (352 ±0)` // Estimated: `5339 + a * (6331 ±0)` - // Minimum execution time: 15_130 nanoseconds. - Weight::from_parts(18_804_523, 5339) - // Standard Error: 178_834 - .saturating_add(Weight::from_parts(34_697_386, 0).saturating_mul(a.into())) + // Minimum execution time: 15_150 nanoseconds. + Weight::from_parts(21_924_642, 5339) + // Standard Error: 238_203 + .saturating_add(Weight::from_parts(34_691_635, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(a.into()))) .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(a.into()))) @@ -423,25 +431,25 @@ impl WeightInfoZeitgeist for WeightInfo { // Proof Size summary in bytes: // Measured: `456` // Estimated: `5339` - // Minimum execution time: 12_750 nanoseconds. - Weight::from_parts(15_520_000, 5339).saturating_add(T::DbWeight::get().reads(2)) + // Minimum execution time: 13_120 nanoseconds. + Weight::from_parts(15_860_000, 5339).saturating_add(T::DbWeight::get().reads(2)) } /// Storage: Court MarketIdToCourtId (r:1 w:0) /// Proof: Court MarketIdToCourtId (max_values: None, max_size: Some(40), added: 2515, mode: MaxEncodedLen) /// Storage: Court CourtPool (r:1 w:0) - /// Proof: Court CourtPool (max_values: Some(1), max_size: Some(72002), added: 72497, mode: MaxEncodedLen) + /// Proof: Court CourtPool (max_values: Some(1), max_size: Some(96002), added: 96497, mode: MaxEncodedLen) /// Storage: Court Courts (r:1 w:0) /// Proof: Court Courts (max_values: None, max_size: Some(349), added: 2824, mode: MaxEncodedLen) /// Storage: Court CourtIdToMarketId (r:1 w:0) /// Proof: Court CourtIdToMarketId (max_values: None, max_size: Some(40), added: 2515, mode: MaxEncodedLen) /// Storage: MarketCommons Markets (r:1 w:0) - /// Proof: MarketCommons Markets (max_values: None, max_size: Some(678), added: 3153, mode: MaxEncodedLen) + /// Proof: MarketCommons Markets (max_values: None, max_size: Some(676), added: 3151, mode: MaxEncodedLen) fn has_failed() -> Weight { // Proof Size summary in bytes: - // Measured: `3222` - // Estimated: `83504` - // Minimum execution time: 38_700 nanoseconds. - Weight::from_parts(45_630_000, 83504).saturating_add(T::DbWeight::get().reads(5)) + // Measured: `3966` + // Estimated: `107502` + // Minimum execution time: 37_920 nanoseconds. + Weight::from_parts(46_370_000, 107502).saturating_add(T::DbWeight::get().reads(5)) } /// Storage: Court MarketIdToCourtId (r:1 w:0) /// Proof: Court MarketIdToCourtId (max_values: None, max_size: Some(40), added: 2515, mode: MaxEncodedLen) @@ -455,12 +463,12 @@ impl WeightInfoZeitgeist for WeightInfo { /// The range of component `d` is `[1, 510]`. fn on_global_dispute(_a: u32, d: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `486 + a * (66 ±0) + d * (256 ±0)` + // Measured: `519 + a * (66 ±0) + d * (256 ±0)` // Estimated: `157788 + d * (2726 ±0)` - // Minimum execution time: 45_390 nanoseconds. - Weight::from_parts(49_259_424, 157788) - // Standard Error: 31_231 - .saturating_add(Weight::from_parts(7_486_776, 0).saturating_mul(d.into())) + // Minimum execution time: 32_480 nanoseconds. + Weight::from_parts(33_571_000, 157788) + // Standard Error: 13_041 + .saturating_add(Weight::from_parts(7_475_688, 0).saturating_mul(d.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(d.into()))) .saturating_add(T::DbWeight::get().writes(2)) @@ -478,12 +486,12 @@ impl WeightInfoZeitgeist for WeightInfo { /// The range of component `d` is `[1, 510]`. fn clear(d: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `399 + d * (256 ±0)` + // Measured: `432 + d * (256 ±0)` // Estimated: `154964 + d * (2726 ±0)` - // Minimum execution time: 26_250 nanoseconds. - Weight::from_parts(26_920_000, 154964) - // Standard Error: 22_958 - .saturating_add(Weight::from_parts(7_260_221, 0).saturating_mul(d.into())) + // Minimum execution time: 30_280 nanoseconds. + Weight::from_parts(30_670_000, 154964) + // Standard Error: 18_750 + .saturating_add(Weight::from_parts(7_261_706, 0).saturating_mul(d.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(d.into()))) .saturating_add(T::DbWeight::get().writes(2)) diff --git a/zrml/global-disputes/Cargo.toml b/zrml/global-disputes/Cargo.toml index 50d018b3e..31f6f8b97 100644 --- a/zrml/global-disputes/Cargo.toml +++ b/zrml/global-disputes/Cargo.toml @@ -46,4 +46,4 @@ try-runtime = [ authors = ["Zeitgeist PM "] edition = "2021" name = "zrml-global-disputes" -version = "0.5.0" +version = "0.5.1" diff --git a/zrml/global-disputes/src/mock.rs b/zrml/global-disputes/src/mock.rs index 25132468a..090a64548 100644 --- a/zrml/global-disputes/src/mock.rs +++ b/zrml/global-disputes/src/mock.rs @@ -36,8 +36,8 @@ use zeitgeist_primitives::{ }, traits::{DisputeResolutionApi, MarketOfDisputeResolutionApi}, types::{ - AccountIdTest, Balance, BlockNumber, BlockTest, Hash, Index, MarketId, Moment, - UncheckedExtrinsicTest, + AccountIdTest, Balance, BlockNumber, BlockTest, Hash, Index, MarketId, + Moment, UncheckedExtrinsicTest, }, }; diff --git a/zrml/global-disputes/src/weights.rs b/zrml/global-disputes/src/weights.rs index 6ccc35602..5e3cf97cb 100644 --- a/zrml/global-disputes/src/weights.rs +++ b/zrml/global-disputes/src/weights.rs @@ -19,13 +19,13 @@ //! Autogenerated weights for zrml_global_disputes //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: `2024-01-15`, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: `2024-04-02`, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `zafoi`, CPU: `AMD Ryzen 9 5900X 12-Core Processor` -//! EXECUTION: `Some(Native)`, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024` +//! HOSTNAME: `zeitgeist-benchmark`, CPU: `AMD EPYC 7601 32-Core Processor` +//! EXECUTION: `Some(Wasm)`, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024` // Executed Command: -// ./target/release/zeitgeist +// ./target/production/zeitgeist // benchmark // pallet // --chain=dev @@ -33,7 +33,7 @@ // --repeat=20 // --pallet=zrml_global_disputes // --extrinsic=* -// --execution=native +// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --template=./misc/weight_template.hbs @@ -72,16 +72,14 @@ impl WeightInfoZeitgeist for WeightInfo { /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) /// The range of component `o` is `[2, 10]`. /// The range of component `v` is `[0, 49]`. - fn vote_on_outcome(o: u32, v: u32) -> Weight { + fn vote_on_outcome(_o: u32, v: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `510 + o * (33 ±0) + v * (32 ±0)` + // Measured: `543 + o * (33 ±0) + v * (32 ±0)` // Estimated: `13631` - // Minimum execution time: 59_970 nanoseconds. - Weight::from_parts(70_944_535, 13631) - // Standard Error: 99_660 - .saturating_add(Weight::from_parts(158_915, 0).saturating_mul(o.into())) - // Standard Error: 17_527 - .saturating_add(Weight::from_parts(73_873, 0).saturating_mul(v.into())) + // Minimum execution time: 56_670 nanoseconds. + Weight::from_parts(69_465_142, 13631) + // Standard Error: 14_768 + .saturating_add(Weight::from_parts(86_839, 0).saturating_mul(v.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -99,16 +97,16 @@ impl WeightInfoZeitgeist for WeightInfo { // Proof Size summary in bytes: // Measured: `0 + l * (467 ±0) + o * (1600 ±0)` // Estimated: `10497 + l * (2871 ±0)` - // Minimum execution time: 35_780 nanoseconds. - Weight::from_parts(44_476_307, 10497) - // Standard Error: 53_653 - .saturating_add(Weight::from_parts(4_271_681, 0).saturating_mul(l.into())) - // Standard Error: 281_603 - .saturating_add(Weight::from_parts(439_604, 0).saturating_mul(o.into())) + // Minimum execution time: 35_260 nanoseconds. + Weight::from_parts(34_550_861, 10497) + // Standard Error: 43_637 + .saturating_add(Weight::from_parts(4_439_605, 0).saturating_mul(l.into())) + // Standard Error: 229_033 + .saturating_add(Weight::from_parts(1_586_966, 0).saturating_mul(o.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(l.into()))) .saturating_add(T::DbWeight::get().writes(2)) - .saturating_add(Weight::from_parts(0, 2870).saturating_mul(l.into())) + .saturating_add(Weight::from_parts(0, 2871).saturating_mul(l.into())) } /// Storage: GlobalDisputes Locks (r:1 w:1) /// Proof: GlobalDisputes Locks (max_values: None, max_size: Some(1641), added: 4116, mode: MaxEncodedLen) @@ -124,19 +122,19 @@ impl WeightInfoZeitgeist for WeightInfo { // Proof Size summary in bytes: // Measured: `0 + l * (451 ±0) + o * (1600 ±0)` // Estimated: `10497 + l * (2871 ±0)` - // Minimum execution time: 35_680 nanoseconds. - Weight::from_parts(25_536_660, 10497) - // Standard Error: 40_297 - .saturating_add(Weight::from_parts(4_579_529, 0).saturating_mul(l.into())) - // Standard Error: 211_506 - .saturating_add(Weight::from_parts(1_769_468, 0).saturating_mul(o.into())) + // Minimum execution time: 32_150 nanoseconds. + Weight::from_parts(21_974_745, 10497) + // Standard Error: 38_707 + .saturating_add(Weight::from_parts(4_502_385, 0).saturating_mul(l.into())) + // Standard Error: 203_160 + .saturating_add(Weight::from_parts(1_872_956, 0).saturating_mul(o.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(l.into()))) .saturating_add(T::DbWeight::get().writes(2)) - .saturating_add(Weight::from_parts(0, 2870).saturating_mul(l.into())) + .saturating_add(Weight::from_parts(0, 2871).saturating_mul(l.into())) } /// Storage: MarketCommons Markets (r:1 w:0) - /// Proof: MarketCommons Markets (max_values: None, max_size: Some(678), added: 3153, mode: MaxEncodedLen) + /// Proof: MarketCommons Markets (max_values: None, max_size: Some(676), added: 3151, mode: MaxEncodedLen) /// Storage: GlobalDisputes GlobalDisputesInfo (r:1 w:1) /// Proof: GlobalDisputes GlobalDisputesInfo (max_values: None, max_size: Some(396), added: 2871, mode: MaxEncodedLen) /// Storage: GlobalDisputes Outcomes (r:1 w:1) @@ -144,12 +142,14 @@ impl WeightInfoZeitgeist for WeightInfo { /// Storage: System Account (r:1 w:1) /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) /// The range of component `w` is `[1, 10]`. - fn add_vote_outcome(_w: u32) -> Weight { + fn add_vote_outcome(w: u32) -> Weight { // Proof Size summary in bytes: // Measured: `723 + w * (32 ±0)` - // Estimated: `11501` - // Minimum execution time: 69_591 nanoseconds. - Weight::from_parts(88_511_398, 11501) + // Estimated: `11499` + // Minimum execution time: 67_910 nanoseconds. + Weight::from_parts(81_338_878, 11499) + // Standard Error: 96_089 + .saturating_add(Weight::from_parts(37_409, 0).saturating_mul(w.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -162,12 +162,12 @@ impl WeightInfoZeitgeist for WeightInfo { /// The range of component `o` is `[1, 10]`. fn reward_outcome_owner_shared_possession(o: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `490 + o * (41 ±0)` + // Measured: `523 + o * (41 ±0)` // Estimated: `8574 + o * (2790 ±20)` - // Minimum execution time: 67_260 nanoseconds. - Weight::from_parts(40_126_687, 8574) - // Standard Error: 326_372 - .saturating_add(Weight::from_parts(36_368_285, 0).saturating_mul(o.into())) + // Minimum execution time: 74_021 nanoseconds. + Weight::from_parts(56_045_009, 8574) + // Standard Error: 319_664 + .saturating_add(Weight::from_parts(31_254_358, 0).saturating_mul(o.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(o.into()))) .saturating_add(T::DbWeight::get().writes(1)) @@ -184,8 +184,8 @@ impl WeightInfoZeitgeist for WeightInfo { // Proof Size summary in bytes: // Measured: `570` // Estimated: `10955` - // Minimum execution time: 74_690 nanoseconds. - Weight::from_parts(90_080_000, 10955) + // Minimum execution time: 73_720 nanoseconds. + Weight::from_parts(90_400_000, 10955) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -197,12 +197,12 @@ impl WeightInfoZeitgeist for WeightInfo { /// The range of component `o` is `[1, 10]`. fn purge_outcomes(k: u32, _o: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `409 + k * (122 ±0) + o * (32 ±0)` + // Measured: `442 + k * (122 ±0) + o * (32 ±0)` // Estimated: `8611 + k * (2870 ±0)` - // Minimum execution time: 88_640 nanoseconds. - Weight::from_parts(106_570_000, 8611) - // Standard Error: 41_012 - .saturating_add(Weight::from_parts(18_091_486, 0).saturating_mul(k.into())) + // Minimum execution time: 89_061 nanoseconds. + Weight::from_parts(90_760_000, 8611) + // Standard Error: 41_431 + .saturating_add(Weight::from_parts(18_137_023, 0).saturating_mul(k.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(k.into()))) .saturating_add(T::DbWeight::get().writes(2)) @@ -217,12 +217,12 @@ impl WeightInfoZeitgeist for WeightInfo { /// The range of component `o` is `[1, 10]`. fn refund_vote_fees(k: u32, _o: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `409 + k * (122 ±0) + o * (32 ±0)` + // Measured: `442 + k * (122 ±0) + o * (32 ±0)` // Estimated: `8611 + k * (2870 ±0)` - // Minimum execution time: 85_661 nanoseconds. - Weight::from_parts(320_805_229, 8611) - // Standard Error: 87_560 - .saturating_add(Weight::from_parts(17_351_127, 0).saturating_mul(k.into())) + // Minimum execution time: 85_100 nanoseconds. + Weight::from_parts(37_928_811, 8611) + // Standard Error: 79_913 + .saturating_add(Weight::from_parts(18_292_158, 0).saturating_mul(k.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(k.into()))) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/zrml/liquidity-mining/Cargo.toml b/zrml/liquidity-mining/Cargo.toml index 358d2b125..a02105d44 100644 --- a/zrml/liquidity-mining/Cargo.toml +++ b/zrml/liquidity-mining/Cargo.toml @@ -41,4 +41,4 @@ try-runtime = [ authors = ["Zeitgeist PM "] edition = "2021" name = "zrml-liquidity-mining" -version = "0.5.0" +version = "0.5.1" diff --git a/zrml/liquidity-mining/src/weights.rs b/zrml/liquidity-mining/src/weights.rs index 6cfe59345..4cc6b056c 100644 --- a/zrml/liquidity-mining/src/weights.rs +++ b/zrml/liquidity-mining/src/weights.rs @@ -19,13 +19,13 @@ //! Autogenerated weights for zrml_liquidity_mining //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: `2024-01-15`, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: `2024-04-02`, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `zafoi`, CPU: `AMD Ryzen 9 5900X 12-Core Processor` -//! EXECUTION: `Some(Native)`, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024` +//! HOSTNAME: `zeitgeist-benchmark`, CPU: `AMD EPYC 7601 32-Core Processor` +//! EXECUTION: `Some(Wasm)`, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024` // Executed Command: -// ./target/release/zeitgeist +// ./target/production/zeitgeist // benchmark // pallet // --chain=dev @@ -33,7 +33,7 @@ // --repeat=20 // --pallet=zrml_liquidity_mining // --extrinsic=* -// --execution=native +// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --template=./misc/weight_template.hbs @@ -61,7 +61,7 @@ impl WeightInfoZeitgeist for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_910 nanoseconds. - Weight::from_parts(5_880_000, 0).saturating_add(T::DbWeight::get().writes(1)) + // Minimum execution time: 4_490 nanoseconds. + Weight::from_parts(5_290_000, 0).saturating_add(T::DbWeight::get().writes(1)) } } diff --git a/zrml/market-commons/Cargo.toml b/zrml/market-commons/Cargo.toml index 730d0e5ed..b1fc136a5 100644 --- a/zrml/market-commons/Cargo.toml +++ b/zrml/market-commons/Cargo.toml @@ -33,4 +33,4 @@ try-runtime = [ authors = ["Zeitgeist PM "] edition = "2021" name = "zrml-market-commons" -version = "0.5.0" +version = "0.5.1" diff --git a/zrml/neo-swaps/Cargo.toml b/zrml/neo-swaps/Cargo.toml index 4e457f224..5cd0e1f15 100644 --- a/zrml/neo-swaps/Cargo.toml +++ b/zrml/neo-swaps/Cargo.toml @@ -108,4 +108,4 @@ try-runtime = [ authors = ["Zeitgeist PM "] edition = "2021" name = "zrml-neo-swaps" -version = "0.5.0" +version = "0.5.1" diff --git a/zrml/neo-swaps/src/consts.rs b/zrml/neo-swaps/src/consts.rs index 19d0af5f7..270c9fc1a 100644 --- a/zrml/neo-swaps/src/consts.rs +++ b/zrml/neo-swaps/src/consts.rs @@ -22,7 +22,7 @@ pub(crate) const EXP_NUMERICAL_LIMIT: u128 = 10; /// Numerical lower limit for ln arguments (fixed point number). pub(crate) const LN_NUMERICAL_LIMIT: u128 = BASE / 10; /// The maximum number of assets allowed in a pool. -pub(crate) const MAX_ASSETS: u16 = 128; +pub(crate) const MAX_ASSETS: u32 = 128; pub(crate) const _1: u128 = BASE; pub(crate) const _2: u128 = 2 * _1; diff --git a/zrml/neo-swaps/src/lib.rs b/zrml/neo-swaps/src/lib.rs index 6c3ae66ff..a1339025d 100644 --- a/zrml/neo-swaps/src/lib.rs +++ b/zrml/neo-swaps/src/lib.rs @@ -38,11 +38,11 @@ pub use pallet::*; #[frame_support::pallet] mod pallet { use crate::{ - consts::{LN_NUMERICAL_LIMIT, MAX_ASSETS}, + consts::LN_NUMERICAL_LIMIT, liquidity_tree::types::{BenchmarkInfo, LiquidityTree, LiquidityTreeError}, math::{Math, MathOps}, traits::{pool_operations::PoolOperations, LiquiditySharesManager}, - types::{FeeDistribution, Pool}, + types::{FeeDistribution, MaxAssets, Pool}, weights::*, }; use alloc::{collections::BTreeMap, vec, vec::Vec}; @@ -74,7 +74,7 @@ mod pallet { }; use zrml_market_commons::MarketCommonsPalletApi; - pub(crate) const STORAGE_VERSION: StorageVersion = StorageVersion::new(1); + pub(crate) const STORAGE_VERSION: StorageVersion = StorageVersion::new(2); // These should not be config parameters to avoid misconfigurations. pub(crate) const EXIT_FEE: u128 = CENT / 10; @@ -99,7 +99,7 @@ mod pallet { pub(crate) type MarketIdOf = <::MarketCommons as MarketCommonsPalletApi>::MarketId; pub(crate) type LiquidityTreeOf = LiquidityTree::MaxLiquidityTreeDepth>; - pub(crate) type PoolOf = Pool>; + pub(crate) type PoolOf = Pool, MaxAssets>; #[pallet::config] pub trait Config: frame_system::Config { @@ -267,6 +267,8 @@ mod pallet { LiquidityTreeError(LiquidityTreeError), /// The relative value of a new LP position is too low. MinRelativeLiquidityThresholdViolated, + /// Narrowing type conversion occurred. + NarrowingConversion, } #[derive(Decode, Encode, Eq, PartialEq, PalletError, RuntimeDebug, TypeInfo)] @@ -311,7 +313,7 @@ mod pallet { /// Depends on the implementation of `CompleteSetOperationsApi` and `ExternalFees`; when /// using the canonical implementations, the runtime complexity is `O(asset_count)`. #[pallet::call_index(0)] - #[pallet::weight(T::WeightInfo::buy(*asset_count as u32))] + #[pallet::weight(T::WeightInfo::buy((*asset_count).saturated_into()))] #[transactional] pub fn buy( origin: OriginFor, @@ -325,7 +327,7 @@ mod pallet { let asset_count_real = T::MarketCommons::market(&market_id)?.outcomes(); ensure!(asset_count == asset_count_real, Error::::IncorrectAssetCount); Self::do_buy(who, market_id, asset_out, amount_in, min_amount_out)?; - Ok(Some(T::WeightInfo::buy(asset_count as u32)).into()) + Ok(Some(T::WeightInfo::buy(asset_count.into())).into()) } /// Sell outcome tokens to the specified market. @@ -355,7 +357,7 @@ mod pallet { /// Depends on the implementation of `CompleteSetOperationsApi` and `ExternalFees`; when /// using the canonical implementations, the runtime complexity is `O(asset_count)`. #[pallet::call_index(1)] - #[pallet::weight(T::WeightInfo::sell(*asset_count as u32))] + #[pallet::weight(T::WeightInfo::sell((*asset_count).saturated_into()))] #[transactional] pub fn sell( origin: OriginFor, @@ -369,7 +371,7 @@ mod pallet { let asset_count_real = T::MarketCommons::market(&market_id)?.outcomes(); ensure!(asset_count == asset_count_real, Error::::IncorrectAssetCount); Self::do_sell(who, market_id, asset_in, amount_in, min_amount_out)?; - Ok(Some(T::WeightInfo::sell(asset_count as u32)).into()) + Ok(Some(T::WeightInfo::sell(asset_count.into())).into()) } /// Join the liquidity pool for the specified market. @@ -396,9 +398,9 @@ mod pallet { /// providers in the pool. #[pallet::call_index(2)] #[pallet::weight( - T::WeightInfo::join_in_place(max_amounts_in.len() as u32) - .max(T::WeightInfo::join_reassigned(max_amounts_in.len() as u32)) - .max(T::WeightInfo::join_leaf(max_amounts_in.len() as u32)) + T::WeightInfo::join_in_place(max_amounts_in.len().saturated_into()) + .max(T::WeightInfo::join_reassigned(max_amounts_in.len().saturated_into())) + .max(T::WeightInfo::join_leaf(max_amounts_in.len().saturated_into())) )] #[transactional] pub fn join( @@ -409,7 +411,11 @@ mod pallet { ) -> DispatchResultWithPostInfo { let who = ensure_signed(origin)?; let asset_count = T::MarketCommons::market(&market_id)?.outcomes(); - ensure!(max_amounts_in.len() == asset_count as usize, Error::::IncorrectVecLen); + let asset_count_usize: usize = asset_count.into(); + // Ensure that the conversion in the weight calculation doesn't saturate. + let _: u32 = + max_amounts_in.len().try_into().map_err(|_| Error::::NarrowingConversion)?; + ensure!(max_amounts_in.len() == asset_count_usize, Error::::IncorrectVecLen); Self::do_join(who, market_id, pool_shares_amount, max_amounts_in) } @@ -446,7 +452,7 @@ mod pallet { /// pool's liquidity tree, or, equivalently, `log_2(m)` where `m` is the number of liquidity /// providers in the pool. #[pallet::call_index(3)] - #[pallet::weight(T::WeightInfo::exit(min_amounts_out.len() as u32))] + #[pallet::weight(T::WeightInfo::exit(min_amounts_out.len().saturated_into()))] #[transactional] pub fn exit( origin: OriginFor, @@ -456,9 +462,12 @@ mod pallet { ) -> DispatchResultWithPostInfo { let who = ensure_signed(origin)?; let asset_count = T::MarketCommons::market(&market_id)?.outcomes(); - ensure!(min_amounts_out.len() == asset_count as usize, Error::::IncorrectVecLen); + let asset_count_u32: u32 = asset_count.into(); + let min_amounts_out_len: u32 = + min_amounts_out.len().try_into().map_err(|_| Error::::NarrowingConversion)?; + ensure!(min_amounts_out_len == asset_count_u32, Error::::IncorrectVecLen); Self::do_exit(who, market_id, pool_shares_amount_out, min_amounts_out)?; - Ok(Some(T::WeightInfo::exit(asset_count as u32)).into()) + Ok(Some(T::WeightInfo::exit(min_amounts_out_len)).into()) } /// Withdraw swap fees from the specified market. @@ -510,7 +519,7 @@ mod pallet { /// /// `O(n)` where `n` is the number of assets in the pool. #[pallet::call_index(5)] - #[pallet::weight(T::WeightInfo::deploy_pool(spot_prices.len() as u32))] + #[pallet::weight(T::WeightInfo::deploy_pool(spot_prices.len().saturated_into()))] #[transactional] pub fn deploy_pool( origin: OriginFor, @@ -521,9 +530,12 @@ mod pallet { ) -> DispatchResultWithPostInfo { let who = ensure_signed(origin)?; let asset_count = T::MarketCommons::market(&market_id)?.outcomes(); - ensure!(spot_prices.len() == asset_count as usize, Error::::IncorrectVecLen); + let asset_count_u32: u32 = asset_count.into(); + let spot_prices_len: u32 = + spot_prices.len().try_into().map_err(|_| Error::::NarrowingConversion)?; + ensure!(spot_prices_len == asset_count_u32, Error::::IncorrectVecLen); Self::do_deploy_pool(who, market_id, amount, spot_prices, swap_fee)?; - Ok(Some(T::WeightInfo::deploy_pool(asset_count as u32)).into()) + Ok(Some(T::WeightInfo::deploy_pool(spot_prices_len)).into()) } } @@ -672,8 +684,10 @@ mod pallet { ensure!(pool_shares_amount != Zero::zero(), Error::::ZeroAmount); let market = T::MarketCommons::market(&market_id)?; ensure!(market.status == MarketStatus::Active, Error::::MarketNotActive); - let asset_count = max_amounts_in.len() as u32; - ensure!(asset_count == market.outcomes() as u32, Error::::IncorrectAssetCount); + let asset_count_u16: u16 = + max_amounts_in.len().try_into().map_err(|_| Error::::NarrowingConversion)?; + let asset_count_u32: u32 = asset_count_u16.into(); + ensure!(asset_count_u16 == market.outcomes(), Error::::IncorrectAssetCount); let benchmark_info = Self::try_mutate_pool(&market_id, |pool| { let ratio = pool_shares_amount.bdiv_ceil(pool.liquidity_shares_manager.total_shares()?)?; @@ -712,9 +726,9 @@ mod pallet { Ok(benchmark_info) })?; let weight = match benchmark_info { - BenchmarkInfo::InPlace => T::WeightInfo::join_in_place(asset_count), - BenchmarkInfo::Reassigned => T::WeightInfo::join_reassigned(asset_count), - BenchmarkInfo::Leaf => T::WeightInfo::join_leaf(asset_count), + BenchmarkInfo::InPlace => T::WeightInfo::join_in_place(asset_count_u32), + BenchmarkInfo::Reassigned => T::WeightInfo::join_reassigned(asset_count_u32), + BenchmarkInfo::Leaf => T::WeightInfo::join_leaf(asset_count_u32), }; Ok((Some(weight)).into()) } @@ -832,9 +846,11 @@ mod pallet { let market = T::MarketCommons::market(&market_id)?; ensure!(market.status == MarketStatus::Active, Error::::MarketNotActive); ensure!(market.scoring_rule == ScoringRule::Lmsr, Error::::InvalidTradingMechanism); - let asset_count = spot_prices.len(); - ensure!(asset_count as u16 == market.outcomes(), Error::::IncorrectVecLen); - ensure!(market.outcomes() <= MAX_ASSETS, Error::::AssetCountAboveMax); + let asset_count_u16: u16 = + spot_prices.len().try_into().map_err(|_| Error::::NarrowingConversion)?; + let asset_count_u32: u32 = asset_count_u16.into(); + ensure!(asset_count_u16 == market.outcomes(), Error::::IncorrectVecLen); + ensure!(asset_count_u32 <= MaxAssets::get(), Error::::AssetCountAboveMax); ensure!(swap_fee >= MIN_SWAP_FEE.saturated_into(), Error::::SwapFeeBelowMin); ensure!(swap_fee <= T::MaxSwapFee::get(), Error::::SwapFeeAboveMax); ensure!( @@ -869,7 +885,7 @@ mod pallet { let collateral = market.base_asset; let pool = Pool { account_id: pool_account_id.clone(), - reserves: reserves.clone(), + reserves: reserves.clone().try_into().map_err(|_| Error::::Unexpected)?, collateral: collateral.into(), liquidity_parameter, liquidity_shares_manager: LiquidityTree::new(who.clone(), amount)?, diff --git a/zrml/neo-swaps/src/migration.rs b/zrml/neo-swaps/src/migration.rs index fb9ed7fb7..2aa4996f9 100644 --- a/zrml/neo-swaps/src/migration.rs +++ b/zrml/neo-swaps/src/migration.rs @@ -15,6 +15,239 @@ // You should have received a copy of the GNU General Public License // along with Zeitgeist. If not, see . +use crate::{ + traits::LiquiditySharesManager, types::Pool, AssetOf, BalanceOf, Config, LiquidityTreeOf, + Pallet, Pools, +}; +use alloc::collections::BTreeMap; +use core::marker::PhantomData; +use frame_support::{ + dispatch::Weight, + log, + traits::{Get, OnRuntimeUpgrade, StorageVersion}, + RuntimeDebug, +}; +use parity_scale_codec::{Decode, Encode}; +use scale_info::TypeInfo; +use sp_runtime::Saturating; + +cfg_if::cfg_if! { + if #[cfg(feature = "try-runtime")] { + use crate::{MarketIdOf}; + use alloc::{format, vec::Vec}; + use frame_support::{migration::storage_key_iter, pallet_prelude::Twox64Concat}; + } +} + +cfg_if::cfg_if! { + if #[cfg(any(feature = "try-runtime", test))] { + const NEO_SWAPS: &[u8] = b"NeoSwaps"; + const POOLS: &[u8] = b"Pools"; + } +} + +const NEO_SWAPS_REQUIRED_STORAGE_VERSION: u16 = 1; +const NEO_SWAPS_NEXT_STORAGE_VERSION: u16 = NEO_SWAPS_REQUIRED_STORAGE_VERSION + 1; + +#[derive(Clone, Decode, Encode, Eq, PartialEq, RuntimeDebug, TypeInfo)] +#[scale_info(skip_type_params(T))] +pub struct OldPool +where + T: Config, + LSM: LiquiditySharesManager, +{ + pub account_id: T::AccountId, + pub reserves: BTreeMap, BalanceOf>, + pub collateral: AssetOf, + pub liquidity_parameter: BalanceOf, + pub liquidity_shares_manager: LSM, + pub swap_fee: BalanceOf, +} + +type OldPoolOf = OldPool>; + +pub struct MigratePoolReservesToBoundedBTreeMap(PhantomData); + +impl OnRuntimeUpgrade for MigratePoolReservesToBoundedBTreeMap +where + T: Config, +{ + fn on_runtime_upgrade() -> Weight { + let mut total_weight = T::DbWeight::get().reads(1); + let neo_swaps_version = StorageVersion::get::>(); + if neo_swaps_version != NEO_SWAPS_REQUIRED_STORAGE_VERSION { + log::info!( + "MigratePoolReservesToBoundedBTreeMap: neo-swaps version is {:?}, but {:?} is \ + required", + neo_swaps_version, + NEO_SWAPS_REQUIRED_STORAGE_VERSION, + ); + return total_weight; + } + log::info!("MigratePoolReservesToBoundedBTreeMap: Starting..."); + let mut translated = 0u64; + Pools::::translate::, _>(|_, pool| { + // Can't fail unless `MaxAssets` is misconfigured. If it fails after all, we delete the + // pool. This may seem drastic, but is actually cleaner than trying some half-baked + // recovery and allows us to do a manual recovery of funds. + let reserves = pool.reserves.try_into().ok()?; + translated.saturating_inc(); + Some(Pool { + account_id: pool.account_id, + reserves, + collateral: pool.collateral, + liquidity_parameter: pool.liquidity_parameter, + liquidity_shares_manager: pool.liquidity_shares_manager, + swap_fee: pool.swap_fee, + }) + }); + log::info!("MigratePoolReservesToBoundedBTreeMap: Upgraded {} pools.", translated); + total_weight = + total_weight.saturating_add(T::DbWeight::get().reads_writes(translated, translated)); + StorageVersion::new(NEO_SWAPS_NEXT_STORAGE_VERSION).put::>(); + total_weight = total_weight.saturating_add(T::DbWeight::get().writes(1)); + log::info!("MigratePoolReservesToBoundedBTreeMap: Done!"); + total_weight + } + + #[cfg(feature = "try-runtime")] + fn pre_upgrade() -> Result, &'static str> { + let old_pools = + storage_key_iter::, OldPoolOf, Twox64Concat>(NEO_SWAPS, POOLS) + .collect::>(); + Ok(old_pools.encode()) + } + + #[cfg(feature = "try-runtime")] + fn post_upgrade(previous_state: Vec) -> Result<(), &'static str> { + let old_pools: BTreeMap, OldPoolOf> = + Decode::decode(&mut &previous_state[..]) + .map_err(|_| "Failed to decode state: Invalid state")?; + let new_pool_count = Pools::::iter().count(); + assert_eq!(old_pools.len(), new_pool_count); + for (market_id, new_pool) in Pools::::iter() { + let old_pool = + old_pools.get(&market_id).expect(&format!("Pool {:?} not found", market_id)[..]); + assert_eq!(new_pool.account_id, old_pool.account_id); + assert_eq!(new_pool.reserves.into_inner(), old_pool.reserves); + assert_eq!(new_pool.collateral, old_pool.collateral); + assert_eq!(new_pool.liquidity_parameter, old_pool.liquidity_parameter); + assert_eq!(new_pool.liquidity_shares_manager, old_pool.liquidity_shares_manager); + assert_eq!(new_pool.swap_fee, old_pool.swap_fee); + } + log::info!( + "MigratePoolReservesToBoundedBTreeMap: Post-upgrade pool count is {}!", + new_pool_count + ); + Ok(()) + } +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::{ + liquidity_tree::types::LiquidityTree, + mock::{ExtBuilder, Runtime}, + MarketIdOf, PoolOf, Pools, + }; + use alloc::collections::BTreeMap; + use frame_support::{ + dispatch::fmt::Debug, migration::put_storage_value, storage_root, StateVersion, + StorageHasher, Twox64Concat, + }; + use parity_scale_codec::Encode; + use zeitgeist_primitives::types::Asset; + + #[test] + fn on_runtime_upgrade_increments_the_storage_version() { + ExtBuilder::default().build().execute_with(|| { + set_up_version(); + MigratePoolReservesToBoundedBTreeMap::::on_runtime_upgrade(); + assert_eq!(StorageVersion::get::>(), NEO_SWAPS_NEXT_STORAGE_VERSION); + }); + } + + #[test] + fn on_runtime_upgrade_is_noop_if_versions_are_not_correct() { + ExtBuilder::default().build().execute_with(|| { + StorageVersion::new(NEO_SWAPS_NEXT_STORAGE_VERSION).put::>(); + let (_, new_pools) = construct_old_new_tuple(); + populate_test_data::, PoolOf>( + NEO_SWAPS, POOLS, new_pools, + ); + let tmp = storage_root(StateVersion::V1); + MigratePoolReservesToBoundedBTreeMap::::on_runtime_upgrade(); + assert_eq!(tmp, storage_root(StateVersion::V1)); + }); + } + + #[test] + fn on_runtime_upgrade_correctly_updates_markets() { + ExtBuilder::default().build().execute_with(|| { + set_up_version(); + let (old_pools, new_pools) = construct_old_new_tuple(); + populate_test_data::, OldPoolOf>( + NEO_SWAPS, POOLS, old_pools, + ); + MigratePoolReservesToBoundedBTreeMap::::on_runtime_upgrade(); + let actual = Pools::get(0u128).unwrap(); + assert_eq!(actual, new_pools[0]); + }); + } + + fn set_up_version() { + StorageVersion::new(NEO_SWAPS_REQUIRED_STORAGE_VERSION).put::>(); + } + + fn construct_old_new_tuple() -> (Vec>, Vec>) { + let account_id = 1; + let mut old_reserves = BTreeMap::new(); + old_reserves.insert(Asset::CategoricalOutcome(2, 3), 4); + let new_reserves = old_reserves.clone().try_into().unwrap(); + let collateral = Asset::Ztg; + let liquidity_parameter = 5; + let swap_fee = 6; + let total_shares = 7; + let fees = 8; + + let mut liquidity_shares_manager = LiquidityTree::new(account_id, total_shares).unwrap(); + liquidity_shares_manager.nodes.get_mut(0).unwrap().fees = fees; + + let old_pool = OldPoolOf { + account_id, + reserves: old_reserves, + collateral, + liquidity_parameter, + liquidity_shares_manager: liquidity_shares_manager.clone(), + swap_fee, + }; + let new_pool = Pool { + account_id, + reserves: new_reserves, + collateral, + liquidity_parameter, + liquidity_shares_manager, + swap_fee, + }; + (vec![old_pool], vec![new_pool]) + } + + #[allow(unused)] + fn populate_test_data(pallet: &[u8], prefix: &[u8], data: Vec) + where + H: StorageHasher, + K: TryFrom + Encode, + V: Encode + Clone, + >::Error: Debug, + { + for (key, value) in data.iter().enumerate() { + let storage_hash = utility::key_to_hash::(K::try_from(key).unwrap()); + put_storage_value::(pallet, prefix, &storage_hash, (*value).clone()); + } + } +} + mod utility { use alloc::vec::Vec; use frame_support::StorageHasher; diff --git a/zrml/neo-swaps/src/mock.rs b/zrml/neo-swaps/src/mock.rs index 28de6bf34..7a14ccd22 100644 --- a/zrml/neo-swaps/src/mock.rs +++ b/zrml/neo-swaps/src/mock.rs @@ -101,7 +101,7 @@ parameter_types! { pub const OracleBond: Balance = 0; pub const ValidityBond: Balance = 0; pub const DisputeBond: Balance = 0; - pub const MaxCategories: u16 = MAX_ASSETS + 1; + pub const MaxCategories: u16 = MAX_ASSETS as u16 + 1; } pub struct DeployPoolNoop; @@ -340,7 +340,6 @@ impl zrml_prediction_markets::Config for Runtime { type Court = Court; type Currency = Balances; type DeployPool = DeployPoolNoop; - type DestroyOrigin = EnsureSignedBy; type DisputeBond = DisputeBond; type RuntimeEvent = RuntimeEvent; type GlobalDisputes = GlobalDisputes; diff --git a/zrml/neo-swaps/src/tests/deploy_pool.rs b/zrml/neo-swaps/src/tests/deploy_pool.rs index 8b3f017a7..0591cb2c0 100644 --- a/zrml/neo-swaps/src/tests/deploy_pool.rs +++ b/zrml/neo-swaps/src/tests/deploy_pool.rs @@ -262,7 +262,7 @@ fn deploy_pool_fails_on_asset_count_above_max() { let market_id = create_market( ALICE, BASE_ASSET, - MarketType::Categorical(category_count), + MarketType::Categorical(category_count as u16), ScoringRule::Lmsr, ); let liquidity = _10; diff --git a/zrml/neo-swaps/src/tests/sell.rs b/zrml/neo-swaps/src/tests/sell.rs index 9308de914..b6f618310 100644 --- a/zrml/neo-swaps/src/tests/sell.rs +++ b/zrml/neo-swaps/src/tests/sell.rs @@ -267,7 +267,7 @@ fn sell_fails_if_price_is_too_low() { // speaking this leaves the pool in an inconsistent state (reserve recorded in the `Pool` // struct is smaller than actual reserve), but this doesn't matter in this test. NeoSwaps::try_mutate_pool(&market_id, |pool| { - pool.reserves.insert(asset_in, 11 * pool.liquidity_parameter); + pool.reserves.try_insert(asset_in, 11 * pool.liquidity_parameter).unwrap(); Ok(()) }) .unwrap(); @@ -306,7 +306,7 @@ fn sell_fails_if_price_is_pushed_below_threshold() { NeoSwaps::try_mutate_pool(&market_id, |pool| { // The price is right at the brink here. Any further shift and sells won't be accepted // anymore. - pool.reserves.insert(asset_in, 10 * pool.liquidity_parameter); + pool.reserves.try_insert(asset_in, 10 * pool.liquidity_parameter).unwrap(); Ok(()) }) .unwrap(); diff --git a/zrml/neo-swaps/src/types/max_assets.rs b/zrml/neo-swaps/src/types/max_assets.rs new file mode 100644 index 000000000..9a9ce0ebd --- /dev/null +++ b/zrml/neo-swaps/src/types/max_assets.rs @@ -0,0 +1,27 @@ +// Copyright 2024 Forecasting Technologies LTD. +// +// This file is part of Zeitgeist. +// +// Zeitgeist 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. +// +// Zeitgeist 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 Zeitgeist. If not, see . + +use crate::consts::MAX_ASSETS; +use sp_runtime::traits::Get; + +pub(crate) struct MaxAssets; + +impl Get for MaxAssets { + fn get() -> u32 { + MAX_ASSETS + } +} diff --git a/zrml/neo-swaps/src/types/mod.rs b/zrml/neo-swaps/src/types/mod.rs index 30734e23e..14da6c7fc 100644 --- a/zrml/neo-swaps/src/types/mod.rs +++ b/zrml/neo-swaps/src/types/mod.rs @@ -16,7 +16,9 @@ // along with Zeitgeist. If not, see . mod fee_distribution; +mod max_assets; mod pool; pub(crate) use fee_distribution::*; +pub(crate) use max_assets::*; pub(crate) use pool::*; diff --git a/zrml/neo-swaps/src/types/pool.rs b/zrml/neo-swaps/src/types/pool.rs index 301dc89d0..683088840 100644 --- a/zrml/neo-swaps/src/types/pool.rs +++ b/zrml/neo-swaps/src/types/pool.rs @@ -16,37 +16,48 @@ // along with Zeitgeist. If not, see . use crate::{ - consts::{EXP_NUMERICAL_LIMIT, MAX_ASSETS}, + consts::EXP_NUMERICAL_LIMIT, math::{Math, MathOps}, pallet::{AssetOf, BalanceOf, Config}, traits::{LiquiditySharesManager, PoolOperations}, Error, }; -use alloc::{collections::BTreeMap, vec::Vec}; +use alloc::{fmt::Debug, vec::Vec}; +use frame_support::{ + storage::bounded_btree_map::BoundedBTreeMap, CloneNoBound, PartialEqNoBound, + RuntimeDebugNoBound, +}; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use scale_info::TypeInfo; use sp_runtime::{ - traits::{CheckedAdd, CheckedSub}, - DispatchError, DispatchResult, RuntimeDebug, SaturatedConversion, Saturating, + traits::{CheckedAdd, CheckedSub, Get}, + DispatchError, DispatchResult, SaturatedConversion, Saturating, }; -#[derive(Clone, Decode, Encode, Eq, PartialEq, RuntimeDebug, TypeInfo)] -#[scale_info(skip_type_params(T))] -pub struct Pool +#[derive( + CloneNoBound, Decode, Encode, Eq, MaxEncodedLen, PartialEqNoBound, RuntimeDebugNoBound, TypeInfo, +)] +#[scale_info(skip_type_params(S, T))] +pub struct Pool where - LSM: LiquiditySharesManager, + T: Config, + LSM: Clone + Debug + LiquiditySharesManager + PartialEq, + S: Get, { pub account_id: T::AccountId, - pub reserves: BTreeMap, BalanceOf>, + pub reserves: BoundedBTreeMap, BalanceOf, S>, pub collateral: AssetOf, pub liquidity_parameter: BalanceOf, pub liquidity_shares_manager: LSM, pub swap_fee: BalanceOf, } -impl + TypeInfo> PoolOperations for Pool +impl PoolOperations for Pool where + T: Config, BalanceOf: SaturatedConversion, + LSM: Clone + Debug + LiquiditySharesManager + TypeInfo + PartialEq, + S: Get, { fn assets(&self) -> Vec> { self.reserves.keys().cloned().collect() @@ -117,30 +128,3 @@ where Math::::calculate_buy_ln_argument(reserve, amount_in, self.liquidity_parameter) } } - -// TODO(#1214): Replace BTreeMap with BoundedBTreeMap and remove the unnecessary `MaxEncodedLen` -// implementation. -impl> MaxEncodedLen for Pool -where - T::AccountId: MaxEncodedLen, - AssetOf: MaxEncodedLen, - BalanceOf: MaxEncodedLen, - LSM: MaxEncodedLen, -{ - fn max_encoded_len() -> usize { - let len_account_id = T::AccountId::max_encoded_len(); - let len_reserves = 1usize.saturating_add((MAX_ASSETS as usize).saturating_mul( - >::max_encoded_len().saturating_add(BalanceOf::::max_encoded_len()), - )); - let len_collateral = AssetOf::::max_encoded_len(); - let len_liquidity_parameter = BalanceOf::::max_encoded_len(); - let len_liquidity_shares_manager = LSM::max_encoded_len(); - let len_swap_fee = BalanceOf::::max_encoded_len(); - len_account_id - .saturating_add(len_reserves) - .saturating_add(len_collateral) - .saturating_add(len_liquidity_parameter) - .saturating_add(len_liquidity_shares_manager) - .saturating_add(len_swap_fee) - } -} diff --git a/zrml/neo-swaps/src/weights.rs b/zrml/neo-swaps/src/weights.rs index 62c46a7d7..86336abb0 100644 --- a/zrml/neo-swaps/src/weights.rs +++ b/zrml/neo-swaps/src/weights.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for zrml_neo_swaps //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: `2024-01-15`, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: `2024-04-03`, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `zeitgeist-benchmark`, CPU: `AMD EPYC 7601 32-Core Processor` //! EXECUTION: `Some(Wasm)`, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024` @@ -33,7 +33,7 @@ // --repeat=20 // --pallet=zrml_neo_swaps // --extrinsic=* -// --execution=native +// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --template=./misc/weight_template.hbs @@ -63,7 +63,7 @@ pub trait WeightInfoZeitgeist { pub struct WeightInfo(PhantomData); impl WeightInfoZeitgeist for WeightInfo { /// Storage: MarketCommons Markets (r:1 w:0) - /// Proof: MarketCommons Markets (max_values: None, max_size: Some(678), added: 3153, mode: MaxEncodedLen) + /// Proof: MarketCommons Markets (max_values: None, max_size: Some(676), added: 3151, mode: MaxEncodedLen) /// Storage: NeoSwaps Pools (r:1 w:1) /// Proof: NeoSwaps Pools (max_values: None, max_size: Some(144745), added: 147220, mode: MaxEncodedLen) /// Storage: System Account (r:3 w:3) @@ -77,20 +77,20 @@ impl WeightInfoZeitgeist for WeightInfo { /// The range of component `n` is `[2, 128]`. fn buy(n: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `2693 + n * (195 ±0)` - // Estimated: `160792 + n * (5116 ±0)` - // Minimum execution time: 450_981 nanoseconds. - Weight::from_parts(456_952_561, 160792) - // Standard Error: 210_027 - .saturating_add(Weight::from_parts(19_290_495, 0).saturating_mul(n.into())) + // Measured: `2763 + n * (195 ±0)` + // Estimated: `160790 + n * (7816 ±0)` + // Minimum execution time: 422_191 nanoseconds. + Weight::from_parts(415_813_912, 160790) + // Standard Error: 113_104 + .saturating_add(Weight::from_parts(21_705_911, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(n.into()))) + .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(5)) .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(n.into()))) - .saturating_add(Weight::from_parts(0, 5116).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(0, 7816).saturating_mul(n.into())) } /// Storage: MarketCommons Markets (r:1 w:0) - /// Proof: MarketCommons Markets (max_values: None, max_size: Some(678), added: 3153, mode: MaxEncodedLen) + /// Proof: MarketCommons Markets (max_values: None, max_size: Some(676), added: 3151, mode: MaxEncodedLen) /// Storage: NeoSwaps Pools (r:1 w:1) /// Proof: NeoSwaps Pools (max_values: None, max_size: Some(144745), added: 147220, mode: MaxEncodedLen) /// Storage: MarketAssets Asset (r:128 w:0) @@ -104,20 +104,20 @@ impl WeightInfoZeitgeist for WeightInfo { /// The range of component `n` is `[2, 128]`. fn sell(n: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `2855 + n * (195 ±0)` - // Estimated: `160792 + n * (5116 ±0)` - // Minimum execution time: 315_041 nanoseconds. - Weight::from_parts(261_744_587, 160792) - // Standard Error: 130_952 - .saturating_add(Weight::from_parts(28_294_554, 0).saturating_mul(n.into())) + // Measured: `2925 + n * (195 ±0)` + // Estimated: `160790 + n * (7816 ±0)` + // Minimum execution time: 329_001 nanoseconds. + Weight::from_parts(315_364_117, 160790) + // Standard Error: 121_331 + .saturating_add(Weight::from_parts(30_608_512, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(n.into()))) + .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(5)) .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(n.into()))) - .saturating_add(Weight::from_parts(0, 5116).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(0, 7816).saturating_mul(n.into())) } /// Storage: MarketCommons Markets (r:1 w:0) - /// Proof: MarketCommons Markets (max_values: None, max_size: Some(678), added: 3153, mode: MaxEncodedLen) + /// Proof: MarketCommons Markets (max_values: None, max_size: Some(676), added: 3151, mode: MaxEncodedLen) /// Storage: NeoSwaps Pools (r:1 w:1) /// Proof: NeoSwaps Pools (max_values: None, max_size: Some(144745), added: 147220, mode: MaxEncodedLen) /// Storage: MarketAssets Asset (r:128 w:0) @@ -129,20 +129,20 @@ impl WeightInfoZeitgeist for WeightInfo { /// The range of component `n` is `[2, 128]`. fn join_in_place(n: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `140822 + n * (261 ±0)` - // Estimated: `152980 + n * (5196 ±0)` - // Minimum execution time: 541_431 nanoseconds. - Weight::from_parts(901_153_315, 152980) - // Standard Error: 248_938 - .saturating_add(Weight::from_parts(46_826_279, 0).saturating_mul(n.into())) + // Measured: `140892 + n * (261 ±0)` + // Estimated: `152978 + n * (7896 ±0)` + // Minimum execution time: 619_812 nanoseconds. + Weight::from_parts(998_550_767, 152978) + // Standard Error: 261_199 + .saturating_add(Weight::from_parts(48_546_703, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(n.into()))) + .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(n.into()))) - .saturating_add(Weight::from_parts(0, 5196).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(0, 7896).saturating_mul(n.into())) } /// Storage: MarketCommons Markets (r:1 w:0) - /// Proof: MarketCommons Markets (max_values: None, max_size: Some(678), added: 3153, mode: MaxEncodedLen) + /// Proof: MarketCommons Markets (max_values: None, max_size: Some(676), added: 3151, mode: MaxEncodedLen) /// Storage: NeoSwaps Pools (r:1 w:1) /// Proof: NeoSwaps Pools (max_values: None, max_size: Some(144745), added: 147220, mode: MaxEncodedLen) /// Storage: MarketAssets Asset (r:128 w:0) @@ -154,20 +154,20 @@ impl WeightInfoZeitgeist for WeightInfo { /// The range of component `n` is `[2, 128]`. fn join_reassigned(n: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `140618 + n * (261 ±0)` - // Estimated: `152980 + n * (5196 ±0)` - // Minimum execution time: 770_081 nanoseconds. - Weight::from_parts(977_585_660, 152980) - // Standard Error: 240_547 - .saturating_add(Weight::from_parts(47_067_211, 0).saturating_mul(n.into())) + // Measured: `140688 + n * (261 ±0)` + // Estimated: `152978 + n * (7896 ±0)` + // Minimum execution time: 755_593 nanoseconds. + Weight::from_parts(1_067_288_438, 152978) + // Standard Error: 241_540 + .saturating_add(Weight::from_parts(48_634_194, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(n.into()))) + .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(n.into()))) - .saturating_add(Weight::from_parts(0, 5196).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(0, 7896).saturating_mul(n.into())) } /// Storage: MarketCommons Markets (r:1 w:0) - /// Proof: MarketCommons Markets (max_values: None, max_size: Some(678), added: 3153, mode: MaxEncodedLen) + /// Proof: MarketCommons Markets (max_values: None, max_size: Some(676), added: 3151, mode: MaxEncodedLen) /// Storage: NeoSwaps Pools (r:1 w:1) /// Proof: NeoSwaps Pools (max_values: None, max_size: Some(144745), added: 147220, mode: MaxEncodedLen) /// Storage: MarketAssets Asset (r:128 w:0) @@ -179,20 +179,20 @@ impl WeightInfoZeitgeist for WeightInfo { /// The range of component `n` is `[2, 128]`. fn join_leaf(n: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `140623 + n * (261 ±0)` - // Estimated: `152980 + n * (5196 ±0)` - // Minimum execution time: 1_106_843 nanoseconds. - Weight::from_parts(1_104_397_667, 152980) - // Standard Error: 342_655 - .saturating_add(Weight::from_parts(49_860_093, 0).saturating_mul(n.into())) + // Measured: `140693 + n * (261 ±0)` + // Estimated: `152978 + n * (7896 ±0)` + // Minimum execution time: 1_012_133 nanoseconds. + Weight::from_parts(1_386_173_433, 152978) + // Standard Error: 255_117 + .saturating_add(Weight::from_parts(45_025_669, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(n.into()))) + .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(n.into()))) - .saturating_add(Weight::from_parts(0, 5196).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(0, 7896).saturating_mul(n.into())) } /// Storage: MarketCommons Markets (r:1 w:0) - /// Proof: MarketCommons Markets (max_values: None, max_size: Some(678), added: 3153, mode: MaxEncodedLen) + /// Proof: MarketCommons Markets (max_values: None, max_size: Some(676), added: 3151, mode: MaxEncodedLen) /// Storage: NeoSwaps Pools (r:1 w:1) /// Proof: NeoSwaps Pools (max_values: None, max_size: Some(144745), added: 147220, mode: MaxEncodedLen) /// Storage: MarketAssets Asset (r:128 w:0) @@ -204,17 +204,17 @@ impl WeightInfoZeitgeist for WeightInfo { /// The range of component `n` is `[2, 128]`. fn exit(n: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `140719 + n * (261 ±0)` - // Estimated: `152980 + n * (5196 ±0)` - // Minimum execution time: 1_197_914 nanoseconds. - Weight::from_parts(1_716_602_393, 152980) - // Standard Error: 271_840 - .saturating_add(Weight::from_parts(47_371_723, 0).saturating_mul(n.into())) + // Measured: `140789 + n * (261 ±0)` + // Estimated: `152978 + n * (7896 ±0)` + // Minimum execution time: 1_083_803 nanoseconds. + Weight::from_parts(1_150_830_447, 152978) + // Standard Error: 358_660 + .saturating_add(Weight::from_parts(52_580_899, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(n.into()))) + .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(n.into()))) - .saturating_add(Weight::from_parts(0, 5196).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(0, 7896).saturating_mul(n.into())) } /// Storage: NeoSwaps Pools (r:1 w:1) /// Proof: NeoSwaps Pools (max_values: None, max_size: Some(144745), added: 147220, mode: MaxEncodedLen) @@ -222,15 +222,15 @@ impl WeightInfoZeitgeist for WeightInfo { /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) fn withdraw_fees() -> Weight { // Proof Size summary in bytes: - // Measured: `139283` + // Measured: `139317` // Estimated: `152434` - // Minimum execution time: 1_407_515 nanoseconds. - Weight::from_parts(1_604_315_000, 152434) + // Minimum execution time: 1_230_254 nanoseconds. + Weight::from_parts(1_370_164_000, 152434) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } /// Storage: MarketCommons Markets (r:1 w:0) - /// Proof: MarketCommons Markets (max_values: None, max_size: Some(678), added: 3153, mode: MaxEncodedLen) + /// Proof: MarketCommons Markets (max_values: None, max_size: Some(676), added: 3151, mode: MaxEncodedLen) /// Storage: NeoSwaps Pools (r:1 w:1) /// Proof: NeoSwaps Pools (max_values: None, max_size: Some(144745), added: 147220, mode: MaxEncodedLen) /// Storage: MarketAssets Asset (r:128 w:0) @@ -242,16 +242,16 @@ impl WeightInfoZeitgeist for WeightInfo { /// The range of component `n` is `[2, 128]`. fn deploy_pool(n: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `2069 + n * (113 ±0)` - // Estimated: `152980 + n * (5196 ±0)` - // Minimum execution time: 239_391 nanoseconds. - Weight::from_parts(102_113_981, 152980) - // Standard Error: 537_232 - .saturating_add(Weight::from_parts(47_234_501, 0).saturating_mul(n.into())) + // Measured: `2139 + n * (113 ±0)` + // Estimated: `152978 + n * (7896 ±0)` + // Minimum execution time: 295_661 nanoseconds. + Weight::from_parts(242_823_513, 152978) + // Standard Error: 125_668 + .saturating_add(Weight::from_parts(46_583_679, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(n.into()))) + .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(n.into()))) - .saturating_add(Weight::from_parts(0, 5196).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(0, 7896).saturating_mul(n.into())) } } diff --git a/zrml/orderbook/Cargo.toml b/zrml/orderbook/Cargo.toml index e6ad5bdc3..e2b33ced1 100644 --- a/zrml/orderbook/Cargo.toml +++ b/zrml/orderbook/Cargo.toml @@ -63,4 +63,4 @@ try-runtime = [ authors = ["Zeitgeist PM "] edition = "2021" name = "zrml-orderbook" -version = "0.5.0" +version = "0.5.1" diff --git a/zrml/orderbook/src/weights.rs b/zrml/orderbook/src/weights.rs index 7c6ecc1dd..c82a1169d 100644 --- a/zrml/orderbook/src/weights.rs +++ b/zrml/orderbook/src/weights.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for zrml_orderbook //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: `2024-01-15`, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: `2024-04-03`, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `zeitgeist-benchmark`, CPU: `AMD EPYC 7601 32-Core Processor` //! EXECUTION: `Some(Wasm)`, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024` @@ -33,7 +33,7 @@ // --repeat=20 // --pallet=zrml_orderbook // --extrinsic=* -// --execution=native +// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --template=./misc/weight_template.hbs @@ -65,15 +65,15 @@ impl WeightInfoZeitgeist for WeightInfo { // Proof Size summary in bytes: // Measured: `283` // Estimated: `6341` - // Minimum execution time: 41_041 nanoseconds. - Weight::from_parts(50_010_000, 6341) + // Minimum execution time: 43_141 nanoseconds. + Weight::from_parts(52_860_000, 6341) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } /// Storage: Orderbook Orders (r:1 w:1) /// Proof: Orderbook Orders (max_values: None, max_size: Some(142), added: 2617, mode: MaxEncodedLen) /// Storage: MarketCommons Markets (r:1 w:0) - /// Proof: MarketCommons Markets (max_values: None, max_size: Some(678), added: 3153, mode: MaxEncodedLen) + /// Proof: MarketCommons Markets (max_values: None, max_size: Some(676), added: 3151, mode: MaxEncodedLen) /// Storage: MarketAssets Asset (r:1 w:0) /// Proof: MarketAssets Asset (max_values: None, max_size: Some(225), added: 2700, mode: MaxEncodedLen) /// Storage: Balances Reserves (r:1 w:1) @@ -84,15 +84,15 @@ impl WeightInfoZeitgeist for WeightInfo { /// Proof: Tokens Accounts (max_values: None, max_size: Some(123), added: 2598, mode: MaxEncodedLen) fn fill_order() -> Weight { // Proof Size summary in bytes: - // Measured: `1081` - // Estimated: `17297` - // Minimum execution time: 115_061 nanoseconds. - Weight::from_parts(139_860_000, 17297) - .saturating_add(T::DbWeight::get().reads(6)) + // Measured: `1190` + // Estimated: `19995` + // Minimum execution time: 122_271 nanoseconds. + Weight::from_parts(148_040_000, 19995) + .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(5)) } /// Storage: MarketCommons Markets (r:1 w:0) - /// Proof: MarketCommons Markets (max_values: None, max_size: Some(678), added: 3153, mode: MaxEncodedLen) + /// Proof: MarketCommons Markets (max_values: None, max_size: Some(676), added: 3151, mode: MaxEncodedLen) /// Storage: MarketAssets Asset (r:1 w:0) /// Proof: MarketAssets Asset (max_values: None, max_size: Some(225), added: 2700, mode: MaxEncodedLen) /// Storage: Orderbook NextOrderId (r:1 w:1) @@ -103,11 +103,11 @@ impl WeightInfoZeitgeist for WeightInfo { /// Proof: Orderbook Orders (max_values: None, max_size: Some(142), added: 2617, mode: MaxEncodedLen) fn place_order() -> Weight { // Proof Size summary in bytes: - // Measured: `334` - // Estimated: `7388` - // Minimum execution time: 45_140 nanoseconds. - Weight::from_parts(56_180_000, 7388) - .saturating_add(T::DbWeight::get().reads(3)) + // Measured: `410` + // Estimated: `10086` + // Minimum execution time: 55_520 nanoseconds. + Weight::from_parts(67_450_000, 10086) + .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } } diff --git a/zrml/parimutuel/Cargo.toml b/zrml/parimutuel/Cargo.toml index 92cd83486..64df6b4d7 100644 --- a/zrml/parimutuel/Cargo.toml +++ b/zrml/parimutuel/Cargo.toml @@ -50,4 +50,4 @@ try-runtime = [ authors = ["Zeitgeist PM "] edition = "2021" name = "zrml-parimutuel" -version = "0.5.0" +version = "0.5.1" diff --git a/zrml/parimutuel/src/weights.rs b/zrml/parimutuel/src/weights.rs index a6e9ca6c0..8c13a994b 100644 --- a/zrml/parimutuel/src/weights.rs +++ b/zrml/parimutuel/src/weights.rs @@ -19,13 +19,13 @@ //! Autogenerated weights for zrml_parimutuel //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: `2024-01-15`, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: `2024-04-03`, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `zafoi`, CPU: `AMD Ryzen 9 5900X 12-Core Processor` -//! EXECUTION: `Some(Native)`, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024` +//! HOSTNAME: `zeitgeist-benchmark`, CPU: `AMD EPYC 7601 32-Core Processor` +//! EXECUTION: `Some(Wasm)`, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024` // Executed Command: -// ./target/release/zeitgeist +// ./target/production/zeitgeist // benchmark // pallet // --chain=dev @@ -33,7 +33,7 @@ // --repeat=20 // --pallet=zrml_parimutuel // --extrinsic=* -// --execution=native +// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --template=./misc/weight_template.hbs @@ -60,7 +60,7 @@ pub trait WeightInfoZeitgeist { pub struct WeightInfo(PhantomData); impl WeightInfoZeitgeist for WeightInfo { /// Storage: MarketCommons Markets (r:1 w:0) - /// Proof: MarketCommons Markets (max_values: None, max_size: Some(678), added: 3153, mode: MaxEncodedLen) + /// Proof: MarketCommons Markets (max_values: None, max_size: Some(676), added: 3151, mode: MaxEncodedLen) /// Storage: System Account (r:1 w:1) /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) /// Storage: MarketAssets Asset (r:1 w:0) @@ -71,52 +71,59 @@ impl WeightInfoZeitgeist for WeightInfo { /// Proof: Tokens TotalIssuance (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) fn buy() -> Weight { // Proof Size summary in bytes: - // Measured: `1815` - // Estimated: `10876` - // Minimum execution time: 134_190 nanoseconds. - Weight::from_parts(155_681_000, 10876) - .saturating_add(T::DbWeight::get().reads(4)) + // Measured: `1924` + // Estimated: `13574` + // Minimum execution time: 134_820 nanoseconds. + Weight::from_parts(158_201_000, 13574) + .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) } /// Storage: MarketCommons Markets (r:1 w:0) - /// Proof: MarketCommons Markets (max_values: None, max_size: Some(678), added: 3153, mode: MaxEncodedLen) - /// Storage: MarketAssets Asset (r:1 w:0) + /// Proof: MarketCommons Markets (max_values: None, max_size: Some(676), added: 3151, mode: MaxEncodedLen) + /// Storage: MarketAssets Asset (r:1 w:1) /// Proof: MarketAssets Asset (max_values: None, max_size: Some(225), added: 2700, mode: MaxEncodedLen) - /// Storage: Tokens TotalIssuance (r:1 w:1) - /// Proof: Tokens TotalIssuance (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) - /// Storage: Tokens Accounts (r:1 w:1) - /// Proof: Tokens Accounts (max_values: None, max_size: Some(123), added: 2598, mode: MaxEncodedLen) + /// Storage: MarketAssets Account (r:1 w:1) + /// Proof: MarketAssets Account (max_values: None, max_size: Some(117), added: 2592, mode: MaxEncodedLen) /// Storage: System Account (r:1 w:1) /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) + /// Storage: AssetRouter DestroyAssets (r:1 w:1) + /// Proof: AssetRouter DestroyAssets (max_values: Some(1), max_size: Some(40962), added: 41457, mode: MaxEncodedLen) + /// Storage: Tokens TotalIssuance (r:1 w:0) + /// Proof: Tokens TotalIssuance (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) + /// Storage: AssetRouter IndestructibleAssets (r:1 w:0) + /// Proof: AssetRouter IndestructibleAssets (max_values: Some(1), max_size: Some(38914), added: 39409, mode: MaxEncodedLen) fn claim_rewards() -> Weight { // Proof Size summary in bytes: - // Measured: `2312` - // Estimated: `10876` - // Minimum execution time: 127_580 nanoseconds. - Weight::from_parts(180_511_000, 10876) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(3)) + // Measured: `3225` + // Estimated: `94434` + // Minimum execution time: 186_311 nanoseconds. + Weight::from_parts(219_911_000, 94434) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(4)) } /// Storage: MarketCommons Markets (r:1 w:0) - /// Proof: MarketCommons Markets (max_values: None, max_size: Some(678), added: 3153, mode: MaxEncodedLen) - /// Storage: MarketAssets Asset (r:2 w:0) + /// Proof: MarketCommons Markets (max_values: None, max_size: Some(676), added: 3151, mode: MaxEncodedLen) + /// Storage: MarketAssets Asset (r:2 w:1) /// Proof: MarketAssets Asset (max_values: None, max_size: Some(225), added: 2700, mode: MaxEncodedLen) - /// Storage: Tokens TotalIssuance (r:2 w:1) - /// Proof: Tokens TotalIssuance (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) - /// Storage: Tokens Accounts (r:1 w:1) - /// Proof: Tokens Accounts (max_values: None, max_size: Some(123), added: 2598, mode: MaxEncodedLen) + /// Storage: MarketAssets Account (r:1 w:1) + /// Proof: MarketAssets Account (max_values: None, max_size: Some(117), added: 2592, mode: MaxEncodedLen) /// Storage: System Account (r:1 w:1) /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) + /// Storage: AssetRouter DestroyAssets (r:1 w:1) + /// Proof: AssetRouter DestroyAssets (max_values: Some(1), max_size: Some(40962), added: 41457, mode: MaxEncodedLen) + /// Storage: Tokens TotalIssuance (r:1 w:0) + /// Proof: Tokens TotalIssuance (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) + /// Storage: AssetRouter IndestructibleAssets (r:1 w:0) + /// Proof: AssetRouter IndestructibleAssets (max_values: Some(1), max_size: Some(38914), added: 39409, mode: MaxEncodedLen) fn claim_refunds() -> Weight { // Proof Size summary in bytes: - // Measured: `2312` - // Estimated: `13394` - // Minimum execution time: 119_110 nanoseconds. - Weight::from_parts(132_660_000, 13394) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(3)) + // Measured: `3528` + // Estimated: `97134` + // Minimum execution time: 192_641 nanoseconds. + Weight::from_parts(199_451_000, 97134) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes(4)) } - /// Storage: MarketCommons Markets (r:1 w:0) /// Proof: MarketCommons Markets (max_values: None, max_size: Some(676), added: 3151, mode: MaxEncodedLen) /// Storage: MarketAssets Asset (r:64 w:64) @@ -125,8 +132,8 @@ impl WeightInfoZeitgeist for WeightInfo { // Proof Size summary in bytes: // Measured: `1187` // Estimated: `175951` - // Minimum execution time: 159_784 nanoseconds. - Weight::from_parts(161_183_000, 175951) + // Minimum execution time: 507_042 nanoseconds. + Weight::from_parts(703_113_000, 175951) .saturating_add(T::DbWeight::get().reads(65)) .saturating_add(T::DbWeight::get().writes(64)) } @@ -144,8 +151,8 @@ impl WeightInfoZeitgeist for WeightInfo { // Proof Size summary in bytes: // Measured: `18377` // Estimated: `417969` - // Minimum execution time: 367_119 nanoseconds. - Weight::from_parts(370_038_000, 417969) + // Minimum execution time: 1_071_673 nanoseconds. + Weight::from_parts(1_317_464_000, 417969) .saturating_add(T::DbWeight::get().reads(131)) .saturating_add(T::DbWeight::get().writes(65)) } diff --git a/zrml/prediction-markets/Cargo.toml b/zrml/prediction-markets/Cargo.toml index 707b7c1c1..4ed6dbf1a 100644 --- a/zrml/prediction-markets/Cargo.toml +++ b/zrml/prediction-markets/Cargo.toml @@ -97,4 +97,4 @@ try-runtime = [ authors = ["Zeitgeist PM "] edition = "2021" name = "zrml-prediction-markets" -version = "0.5.0" +version = "0.5.1" diff --git a/zrml/prediction-markets/runtime-api/Cargo.toml b/zrml/prediction-markets/runtime-api/Cargo.toml index 81c32e411..8f45d3fe3 100644 --- a/zrml/prediction-markets/runtime-api/Cargo.toml +++ b/zrml/prediction-markets/runtime-api/Cargo.toml @@ -15,4 +15,4 @@ std = [ authors = ["Zeitgeist PM "] edition = "2021" name = "zrml-prediction-markets-runtime-api" -version = "0.5.0" +version = "0.5.1" diff --git a/zrml/prediction-markets/src/benchmarks.rs b/zrml/prediction-markets/src/benchmarks.rs index eb19904b4..c0c137bb1 100644 --- a/zrml/prediction-markets/src/benchmarks.rs +++ b/zrml/prediction-markets/src/benchmarks.rs @@ -280,10 +280,10 @@ benchmarks! { ).unwrap(); } - let close_origin = T::CloseOrigin::try_successful_origin().unwrap(); + let resolve_origin = T::ResolveOrigin::try_successful_origin().unwrap(); let call = Call::::admin_move_market_to_resolved { market_id }; }: { - call.dispatch_bypass_filter(close_origin)? + call.dispatch_bypass_filter(resolve_origin)? } verify { assert_last_event::(Event::MarketResolved::( market_id, @@ -316,10 +316,10 @@ benchmarks! { ).unwrap(); } - let close_origin = T::CloseOrigin::try_successful_origin().unwrap(); + let resolve_origin = T::ResolveOrigin::try_successful_origin().unwrap(); let call = Call::::admin_move_market_to_resolved { market_id }; }: { - call.dispatch_bypass_filter(close_origin)? + call.dispatch_bypass_filter(resolve_origin)? } verify { assert_last_event::(Event::MarketResolved::( market_id, @@ -368,10 +368,10 @@ benchmarks! { ).unwrap(); } - let close_origin = T::CloseOrigin::try_successful_origin().unwrap(); + let resolve_origin = T::ResolveOrigin::try_successful_origin().unwrap(); let call = Call::::admin_move_market_to_resolved { market_id }; }: { - call.dispatch_bypass_filter(close_origin)? + call.dispatch_bypass_filter(resolve_origin)? } verify { assert_last_event::(Event::MarketResolved::( market_id, @@ -421,10 +421,10 @@ benchmarks! { ).unwrap(); } - let close_origin = T::CloseOrigin::try_successful_origin().unwrap(); + let resolve_origin = T::ResolveOrigin::try_successful_origin().unwrap(); let call = Call::::admin_move_market_to_resolved { market_id }; }: { - call.dispatch_bypass_filter(close_origin)? + call.dispatch_bypass_filter(resolve_origin)? } verify { assert_last_event::(Event::MarketResolved::( market_id, @@ -456,10 +456,10 @@ benchmarks! { Some(MarketDisputeMechanism::Court), )?; - let approve_origin = T::ApproveOrigin::try_successful_origin().unwrap(); + let request_edit_origin = T::RequestEditOrigin::try_successful_origin().unwrap(); let edit_reason = vec![0_u8; r as usize]; let call = Call::::request_edit{ market_id, edit_reason }; - }: { call.dispatch_bypass_filter(approve_origin)? } verify {} + }: { call.dispatch_bypass_filter(request_edit_origin)? } verify {} buy_complete_set { let a in (T::MinCategories::get().into())..T::MaxCategories::get().into(); @@ -529,10 +529,10 @@ benchmarks! { .dispatch_bypass_filter(RawOrigin::Signed(caller.clone()).into())?; let market_id = zrml_market_commons::Pallet::::latest_market_id()?; - let approve_origin = T::ApproveOrigin::try_successful_origin().unwrap(); + let request_edit_origin = T::RequestEditOrigin::try_successful_origin().unwrap(); let edit_reason = vec![0_u8; 1024]; Call::::request_edit{ market_id, edit_reason } - .dispatch_bypass_filter(approve_origin)?; + .dispatch_bypass_filter(request_edit_origin)?; for i in 0..m { MarketIdsPerCloseTimeFrame::::try_mutate( diff --git a/zrml/prediction-markets/src/lib.rs b/zrml/prediction-markets/src/lib.rs index 61f649d2f..288105660 100644 --- a/zrml/prediction-markets/src/lib.rs +++ b/zrml/prediction-markets/src/lib.rs @@ -1630,9 +1630,6 @@ mod pallet { MarketId = MarketIdOf, >; - /// The origin that is allowed to destroy markets. - type DestroyOrigin: EnsureOrigin; - /// The base amount of currency that must be bonded in order to create a dispute. #[pallet::constant] type DisputeBond: Get>; @@ -3054,14 +3051,10 @@ mod pallet { } let sender_is_oracle = sender == market.oracle; - let origin_has_permission = T::ResolveOrigin::ensure_origin(origin).is_ok(); - let sender_is_outsider = !sender_is_oracle && !origin_has_permission; + let sender_is_outsider = !sender_is_oracle; if should_check_origin { - ensure!( - sender_is_oracle || origin_has_permission, - Error::::ReporterNotOracle - ); + ensure!(sender_is_oracle, Error::::ReporterNotOracle); } else if sender_is_outsider { let outsider_bond = T::OutsiderBond::get(); @@ -3103,9 +3096,7 @@ mod pallet { ) -> DispatchResultWithPostInfo { >::mutate_market(&market_id, |market| { let sender = ensure_signed(origin.clone())?; - let sender_is_oracle = sender == market.oracle; - let origin_has_permission = T::ResolveOrigin::ensure_origin(origin).is_ok(); - ensure!(sender_is_oracle || origin_has_permission, Error::::ReporterNotOracle); + ensure!(sender == market.oracle, Error::::ReporterNotOracle); market.report = Some(market_report.clone()); market.status = MarketStatus::Reported; Ok(()) diff --git a/zrml/prediction-markets/src/mock.rs b/zrml/prediction-markets/src/mock.rs index 3f0ef4230..392a7d2df 100644 --- a/zrml/prediction-markets/src/mock.rs +++ b/zrml/prediction-markets/src/mock.rs @@ -34,8 +34,6 @@ use frame_support::{ }, }; use frame_system::{EnsureRoot, EnsureSigned, EnsureSignedBy}; -#[cfg(feature = "parachain")] -use orml_asset_registry::AssetMetadata; use parity_scale_codec::Compact; use sp_arithmetic::per_things::Percent; use sp_runtime::{ @@ -68,10 +66,12 @@ use zeitgeist_primitives::{ AccountIdTest, Amount, Assets, Balance, BasicCurrencyAdapter, BlockNumber, BlockTest, CampaignAsset, CampaignAssetClass, CampaignAssetId, Currencies, CustomAsset, CustomAssetId, Hash, Index, MarketAsset, MarketId, Moment, ResultWithWeightInfo, UncheckedExtrinsicTest, - XcmAsset, }, }; +#[cfg(feature = "parachain")] +use {orml_asset_registry::AssetMetadata, zeitgeist_primitives::types::XcmAsset}; + pub(super) const ON_PROPOSAL_STORAGE: [u8; 4] = [0x09, 0x09, 0x00, 0x00]; pub(super) const ON_ACTIVATION_STORAGE: [u8; 4] = [0x09, 0x09, 0x00, 0x01]; pub(super) const ON_CLOSURE_STORAGE: [u8; 4] = [0x09, 0x09, 0x00, 0x02]; @@ -86,6 +86,12 @@ pub const DAVE: AccountIdTest = 3; pub const EVE: AccountIdTest = 4; pub const FRED: AccountIdTest = 5; pub const SUDO: AccountIdTest = 69; +pub const APPROVE_ORIGIN: AccountIdTest = 70; +pub const REJECT_ORIGIN: AccountIdTest = 71; +pub const CLOSE_MARKET_EARLY_ORIGIN: AccountIdTest = 72; +pub const CLOSE_ORIGIN: AccountIdTest = 73; +pub const REQUEST_EDIT_ORIGIN: AccountIdTest = 74; +pub const RESOLVE_ORIGIN: AccountIdTest = 75; pub const INITIAL_BALANCE: u128 = 1_000 * BASE; @@ -191,6 +197,12 @@ impl DeployPoolMock { ord_parameter_types! { pub const Sudo: AccountIdTest = SUDO; + pub const ApproveOrigin: AccountIdTest = APPROVE_ORIGIN; + pub const RejectOrigin: AccountIdTest = REJECT_ORIGIN; + pub const CloseMarketEarlyOrigin: AccountIdTest = CLOSE_MARKET_EARLY_ORIGIN; + pub const CloseOrigin: AccountIdTest = CLOSE_ORIGIN; + pub const RequestEditOrigin: AccountIdTest = REQUEST_EDIT_ORIGIN; + pub const ResolveOrigin: AccountIdTest = RESOLVE_ORIGIN; } parameter_types! { pub const AdvisoryBond: Balance = 11 * CENT; @@ -235,7 +247,7 @@ construct_runtime!( impl crate::Config for Runtime { type AdvisoryBond = AdvisoryBond; type AdvisoryBondSlashPercentage = AdvisoryBondSlashPercentage; - type ApproveOrigin = EnsureSignedBy; + type ApproveOrigin = EnsureSignedBy; type AssetCreator = AssetRouter; type AssetDestroyer = AssetRouter; type AssetManager = AssetManager; @@ -243,15 +255,14 @@ impl crate::Config for Runtime { type AssetRegistry = MockRegistry; type Authorized = Authorized; type CloseEarlyDisputeBond = CloseEarlyDisputeBond; - type CloseMarketEarlyOrigin = EnsureSignedBy; + type CloseMarketEarlyOrigin = EnsureSignedBy; type CloseEarlyProtectionTimeFramePeriod = CloseEarlyProtectionTimeFramePeriod; type CloseEarlyProtectionBlockPeriod = CloseEarlyProtectionBlockPeriod; type CloseEarlyRequestBond = CloseEarlyRequestBond; - type CloseOrigin = EnsureSignedBy; + type CloseOrigin = EnsureSignedBy; type Currency = Balances; type MaxCreatorFee = MaxCreatorFee; type Court = Court; - type DestroyOrigin = EnsureSignedBy; type DeployPool = DeployPoolMock; type DisputeBond = DisputeBond; type RuntimeEvent = RuntimeEvent; @@ -274,9 +285,9 @@ impl crate::Config for Runtime { type PalletId = PmPalletId; type CloseEarlyBlockPeriod = CloseEarlyBlockPeriod; type CloseEarlyTimeFramePeriod = CloseEarlyTimeFramePeriod; - type RejectOrigin = EnsureSignedBy; - type RequestEditOrigin = EnsureSignedBy; - type ResolveOrigin = EnsureSignedBy; + type RejectOrigin = EnsureSignedBy; + type RequestEditOrigin = EnsureSignedBy; + type ResolveOrigin = EnsureSignedBy; type SimpleDisputes = SimpleDisputes; type Slash = Treasury; type ValidityBond = ValidityBond; diff --git a/zrml/prediction-markets/src/tests/admin_move_market_to_closed.rs b/zrml/prediction-markets/src/tests/admin_move_market_to_closed.rs index 5cc92b88c..8fbef6fe2 100644 --- a/zrml/prediction-markets/src/tests/admin_move_market_to_closed.rs +++ b/zrml/prediction-markets/src/tests/admin_move_market_to_closed.rs @@ -36,7 +36,7 @@ fn admin_move_market_to_closed_successfully_closes_market_and_sets_end_blocknumb run_blocks(3); let market_id = 0; assert_ok!(PredictionMarkets::admin_move_market_to_closed( - RuntimeOrigin::signed(SUDO), + RuntimeOrigin::signed(CloseOrigin::get()), market_id )); let market = MarketCommons::market(&market_id).unwrap(); @@ -81,7 +81,7 @@ fn admin_move_market_to_closed_successfully_closes_market_and_sets_end_timestamp run_blocks(shift_blocks); assert_ok!(PredictionMarkets::admin_move_market_to_closed( - RuntimeOrigin::signed(SUDO), + RuntimeOrigin::signed(CloseOrigin::get()), market_id )); let market = MarketCommons::market(&market_id).unwrap(); @@ -97,7 +97,10 @@ fn admin_move_market_to_closed_successfully_closes_market_and_sets_end_timestamp fn admin_move_market_to_closed_fails_if_market_does_not_exist() { ExtBuilder::default().build().execute_with(|| { assert_noop!( - PredictionMarkets::admin_move_market_to_closed(RuntimeOrigin::signed(SUDO), 0), + PredictionMarkets::admin_move_market_to_closed( + RuntimeOrigin::signed(CloseOrigin::get()), + 0 + ), zrml_market_commons::Error::::MarketDoesNotExist ); }); @@ -122,7 +125,10 @@ fn admin_move_market_to_closed_fails_if_market_is_not_active(market_status: Mark Ok(()) })); assert_noop!( - PredictionMarkets::admin_move_market_to_closed(RuntimeOrigin::signed(SUDO), market_id), + PredictionMarkets::admin_move_market_to_closed( + RuntimeOrigin::signed(CloseOrigin::get()), + market_id + ), Error::::MarketIsNotActive, ); }); @@ -158,7 +164,10 @@ fn admin_move_market_to_closed_correctly_clears_auto_close_blocks() { Some(MarketDisputeMechanism::SimpleDisputes), ScoringRule::Lmsr, )); - assert_ok!(PredictionMarkets::admin_move_market_to_closed(RuntimeOrigin::signed(SUDO), 0)); + assert_ok!(PredictionMarkets::admin_move_market_to_closed( + RuntimeOrigin::signed(CloseOrigin::get()), + 0 + )); let auto_close = MarketIdsPerCloseBlock::::get(66).into_inner(); assert_eq!(auto_close, vec![1]); diff --git a/zrml/prediction-markets/src/tests/admin_move_market_to_resolved.rs b/zrml/prediction-markets/src/tests/admin_move_market_to_resolved.rs index 1d1826093..a82c5f89e 100644 --- a/zrml/prediction-markets/src/tests/admin_move_market_to_resolved.rs +++ b/zrml/prediction-markets/src/tests/admin_move_market_to_resolved.rs @@ -57,7 +57,7 @@ fn admin_move_market_to_resolved_resolves_reported_market() { outcome_report.clone() )); assert_ok!(PredictionMarkets::admin_move_market_to_resolved( - RuntimeOrigin::signed(SUDO), + RuntimeOrigin::signed(ResolveOrigin::get()), market_id )); @@ -94,7 +94,78 @@ fn admin_move_market_to_resolved_resolves_reported_market() { }); } -// TODO(#1239) resolves disputed market +#[test] +fn admin_move_market_to_resolved_resolves_disputed_market() { + // NOTE: Bonds are always in ZTG, irrespective of base_asset. + let test = |base_asset: BaseAsset| { + let end = 33; + simple_create_categorical_market( + base_asset, + MarketCreation::Permissionless, + 0..end, + ScoringRule::Lmsr, + ); + let market_id = 0; + + // Give ALICE `SENTINEL_AMOUNT` free and reserved ZTG; we record the free balance to check + // that the correct bonds are unreserved! + assert_ok!(AssetManager::deposit(Asset::Ztg, &ALICE, 2 * SENTINEL_AMOUNT)); + assert_ok!(Balances::reserve_named( + &PredictionMarkets::reserve_id(), + &ALICE, + SENTINEL_AMOUNT + )); + let balance_free_before = Balances::free_balance(ALICE); + let balance_reserved_before = + Balances::reserved_balance_named(&PredictionMarkets::reserve_id(), &ALICE); + + let market = MarketCommons::market(&0).unwrap(); + let grace_period = end + market.deadlines.grace_period; + run_to_block(grace_period + 1); + let category = 1; + let outcome_report = OutcomeReport::Categorical(category); + assert_ok!(PredictionMarkets::report( + RuntimeOrigin::signed(BOB), + market_id, + OutcomeReport::Categorical(0), + )); + assert_ok!(PredictionMarkets::dispute(RuntimeOrigin::signed(CHARLIE), market_id)); + assert_ok!(Authorized::authorize_market_outcome( + RuntimeOrigin::signed(AuthorizedDisputeResolutionUser::get()), + market_id, + outcome_report.clone(), + )); + assert_ok!(PredictionMarkets::admin_move_market_to_resolved( + RuntimeOrigin::signed(ResolveOrigin::get()), + market_id + )); + + let market = MarketCommons::market(&market_id).unwrap(); + assert_eq!(market.status, MarketStatus::Resolved); + assert_eq!(market.resolved_outcome.unwrap(), outcome_report); + System::assert_last_event( + Event::MarketResolved(market_id, MarketStatus::Resolved, outcome_report).into(), + ); + + assert_eq!( + Balances::reserved_balance_named(&PredictionMarkets::reserve_id(), &ALICE), + balance_reserved_before + - ::OracleBond::get() + - ::ValidityBond::get() + ); + assert_eq!( + Balances::free_balance(ALICE), + balance_free_before + ::ValidityBond::get() + ); + }; + ExtBuilder::default().build().execute_with(|| { + test(BaseAsset::Ztg); + }); + #[cfg(feature = "parachain")] + ExtBuilder::default().build().execute_with(|| { + test(BaseAsset::ForeignAsset(100)); + }); +} #[test_case(MarketStatus::Active)] #[test_case(MarketStatus::Closed)] @@ -116,7 +187,7 @@ fn admin_move_market_to_resolved_fails_if_market_is_not_reported_or_disputed( })); assert_noop!( PredictionMarkets::admin_move_market_to_resolved( - RuntimeOrigin::signed(SUDO), + RuntimeOrigin::signed(ResolveOrigin::get()), market_id, ), Error::::InvalidMarketStatus, diff --git a/zrml/prediction-markets/src/tests/approve_market.rs b/zrml/prediction-markets/src/tests/approve_market.rs index c2bf82081..c3c603f21 100644 --- a/zrml/prediction-markets/src/tests/approve_market.rs +++ b/zrml/prediction-markets/src/tests/approve_market.rs @@ -17,12 +17,38 @@ // along with Zeitgeist. If not, see . use super::*; +use test_case::test_case; use crate::MarketIdsForEdit; use sp_runtime::DispatchError; -// TODO(#1239) Be more granular with regards to origins -// TODO(#1239) Approve fails if market status is not proposed +#[test_case(MarketStatus::Active)] +#[test_case(MarketStatus::Closed)] +#[test_case(MarketStatus::Reported)] +#[test_case(MarketStatus::Disputed)] +#[test_case(MarketStatus::Resolved)] +fn fails_if_market_status_is_not_proposed(market_status: MarketStatus) { + ExtBuilder::default().build().execute_with(|| { + simple_create_categorical_market( + BaseAsset::Ztg, + MarketCreation::Advised, + 0..2, + ScoringRule::Lmsr, + ); + let market_id = 0; + assert_ok!(MarketCommons::mutate_market(&market_id, |market| { + market.status = market_status; + Ok(()) + })); + assert_noop!( + PredictionMarkets::approve_market( + RuntimeOrigin::signed(ApproveOrigin::get()), + market_id + ), + Error::::MarketIsNotProposed + ); + }); +} #[test] fn it_allows_advisory_origin_to_approve_markets() { @@ -43,8 +69,10 @@ fn it_allows_advisory_origin_to_approve_markets() { DispatchError::BadOrigin ); - // Now it should work from SUDO - assert_ok!(PredictionMarkets::approve_market(RuntimeOrigin::signed(SUDO), 0)); + assert_ok!(PredictionMarkets::approve_market( + RuntimeOrigin::signed(ApproveOrigin::get()), + 0 + )); let after_market = MarketCommons::market(&0); assert_eq!(after_market.unwrap().status, MarketStatus::Active); @@ -68,11 +96,15 @@ fn market_with_edit_request_cannot_be_approved() { let edit_reason = vec![0_u8; ::MaxEditReasonLen::get() as usize]; - assert_ok!(PredictionMarkets::request_edit(RuntimeOrigin::signed(SUDO), 0, edit_reason)); + assert_ok!(PredictionMarkets::request_edit( + RuntimeOrigin::signed(RequestEditOrigin::get()), + 0, + edit_reason + )); assert!(MarketIdsForEdit::::contains_key(0)); assert_noop!( - PredictionMarkets::approve_market(RuntimeOrigin::signed(SUDO), 0), + PredictionMarkets::approve_market(RuntimeOrigin::signed(ApproveOrigin::get()), 0), Error::::MarketEditRequestAlreadyInProgress ); }); @@ -99,7 +131,10 @@ fn approve_market_correctly_unreserves_advisory_bond() { let market_id = 0; let alice_balance_before = Balances::free_balance(ALICE); check_reserve(&ALICE, AdvisoryBond::get() + OracleBond::get()); - assert_ok!(PredictionMarkets::approve_market(RuntimeOrigin::signed(SUDO), market_id)); + assert_ok!(PredictionMarkets::approve_market( + RuntimeOrigin::signed(ApproveOrigin::get()), + market_id + )); check_reserve(&ALICE, OracleBond::get()); assert_eq!(Balances::free_balance(ALICE), alice_balance_before + AdvisoryBond::get()); let market = MarketCommons::market(&market_id).unwrap(); @@ -127,7 +162,10 @@ fn does_trigger_market_transition_api() { 1..2, ScoringRule::Lmsr, ); - assert_ok!(PredictionMarkets::approve_market(RuntimeOrigin::signed(SUDO), 0)); + assert_ok!(PredictionMarkets::approve_market( + RuntimeOrigin::signed(ApproveOrigin::get()), + 0 + )); assert!(StateTransitionMock::on_activation_triggered()); }); } diff --git a/zrml/prediction-markets/src/tests/buy_complete_set.rs b/zrml/prediction-markets/src/tests/buy_complete_set.rs index 4cc7a79b4..0296f2d0e 100644 --- a/zrml/prediction-markets/src/tests/buy_complete_set.rs +++ b/zrml/prediction-markets/src/tests/buy_complete_set.rs @@ -19,8 +19,6 @@ use super::*; use test_case::test_case; -// TODO(#1239) buy_complete_set fails if market doesn't exist - #[test] fn buy_complete_set_works() { let test = |base_asset: BaseAsset| { @@ -151,3 +149,13 @@ fn buy_complete_set_fails_if_market_has_wrong_scoring_rule(scoring_rule: Scoring ); }); } + +#[test] +fn fails_if_market_is_not_found() { + ExtBuilder::default().build().execute_with(|| { + assert_noop!( + PredictionMarkets::buy_complete_set(RuntimeOrigin::signed(FRED), 0, 1), + zrml_market_commons::Error::::MarketDoesNotExist, + ); + }); +} diff --git a/zrml/prediction-markets/src/tests/close_market.rs b/zrml/prediction-markets/src/tests/close_market.rs index 9e666d01a..448cf2861 100644 --- a/zrml/prediction-markets/src/tests/close_market.rs +++ b/zrml/prediction-markets/src/tests/close_market.rs @@ -22,8 +22,6 @@ use test_case::test_case; use crate::MarketIdsPerCloseBlock; use sp_runtime::traits::Zero; -// TODO(#1239) MarketDoesNotExist - // TODO(#1239) Split test #[test] fn close_trusted_market_works() { @@ -62,11 +60,6 @@ fn close_trusted_market_works() { let auto_closes = MarketIdsPerCloseBlock::::get(end); assert_eq!(auto_closes.first().cloned().unwrap(), market_id); - assert_noop!( - PredictionMarkets::close_trusted_market(RuntimeOrigin::signed(BOB), market_id), - Error::::CallerNotMarketCreator - ); - assert_ok!(PredictionMarkets::close_trusted_market( RuntimeOrigin::signed(market_creator), market_id @@ -80,6 +73,36 @@ fn close_trusted_market_works() { }); } +#[test] +fn fails_if_caller_is_not_market_creator() { + ExtBuilder::default().build().execute_with(|| { + let end = 10; + let market_creator = ALICE; + assert_ok!(PredictionMarkets::create_market( + RuntimeOrigin::signed(market_creator), + BaseAsset::Ztg, + Perbill::zero(), + BOB, + MarketPeriod::Block(0..end), + Deadlines { + grace_period: 0, + oracle_duration: ::MinOracleDuration::get(), + dispute_duration: Zero::zero(), + }, + gen_metadata(0x99), + MarketCreation::Permissionless, + MarketType::Categorical(3), + None, + ScoringRule::Lmsr, + )); + run_to_block(end - 1); + assert_noop!( + PredictionMarkets::close_trusted_market(RuntimeOrigin::signed(BOB), 0), + Error::::CallerNotMarketCreator + ); + }); +} + #[test] fn close_trusted_market_fails_if_not_trusted() { ExtBuilder::default().build().execute_with(|| { @@ -165,6 +188,16 @@ fn close_trusted_market_fails_if_invalid_market_state(status: MarketStatus) { }); } +#[test] +fn fails_if_market_is_not_found() { + ExtBuilder::default().build().execute_with(|| { + assert_noop!( + PredictionMarkets::close_trusted_market(RuntimeOrigin::signed(ALICE), 3), + zrml_market_commons::Error::::MarketDoesNotExist + ); + }); +} + #[test] fn does_trigger_market_transition_api_permissionless() { ExtBuilder::default().build().execute_with(|| { diff --git a/zrml/prediction-markets/src/tests/create_market.rs b/zrml/prediction-markets/src/tests/create_market.rs index a59aa0fa6..70b1c6355 100644 --- a/zrml/prediction-markets/src/tests/create_market.rs +++ b/zrml/prediction-markets/src/tests/create_market.rs @@ -26,9 +26,88 @@ use zeitgeist_primitives::{ types::{BlockNumber, Bond, MarketBonds, Moment}, }; -// TODO(#1239) FeeTooHigh not verified -// TODO(#1239) InvalidMultihash not verified -// TODO(#1239) Creation fails if user can't afford the bonds +#[test_case( + MarketCreation::Advised, + ::AdvisoryBond::get() + ::OracleBond::get() - 1 +)] +#[test_case( + MarketCreation::Permissionless, + ::ValidityBond::get() + ::OracleBond::get() - 1 +)] +fn fails_if_user_cannot_afford_bonds_advised( + market_creation: MarketCreation, + balance: BalanceOf, +) { + ExtBuilder::default().build().execute_with(|| { + let creator = 999; + assert_ok!(AssetManager::deposit(Asset::Ztg, &creator, balance)); + assert_noop!( + PredictionMarkets::create_market( + RuntimeOrigin::signed(creator), + BaseAsset::Ztg, + ::MaxCreatorFee::get(), + BOB, + MarketPeriod::Block(123..456), + get_deadlines(), + gen_metadata(2), + market_creation, + MarketType::Scalar(0..=1), + Some(MarketDisputeMechanism::SimpleDisputes), + ScoringRule::Lmsr, + ), + pallet_balances::Error::::InsufficientBalance + ); + }); +} + +#[test] +fn fails_on_fee_too_high() { + ExtBuilder::default().build().execute_with(|| { + let one_billionth = Perbill::from_rational(1u128, 1_000_000_000u128); + assert_noop!( + PredictionMarkets::create_market( + RuntimeOrigin::signed(ALICE), + BaseAsset::Ztg, + ::MaxCreatorFee::get() + one_billionth, + BOB, + MarketPeriod::Block(123..456), + get_deadlines(), + gen_metadata(2), + MarketCreation::Permissionless, + MarketType::Scalar(0..=1), + Some(MarketDisputeMechanism::SimpleDisputes), + ScoringRule::Lmsr, + ), + Error::::FeeTooHigh + ); + }); +} + +#[test] +fn fails_on_invalid_multihash() { + ExtBuilder::default().build().execute_with(|| { + let mut metadata = [0xff; 50]; + metadata[0] = 0x15; + metadata[1] = 0x29; + let multihash = MultiHash::Sha3_384(metadata); + assert_noop!( + PredictionMarkets::create_market( + RuntimeOrigin::signed(ALICE), + BaseAsset::Ztg, + ::MaxCreatorFee::get(), + BOB, + MarketPeriod::Block(123..456), + get_deadlines(), + multihash, + MarketCreation::Permissionless, + MarketType::Scalar(0..=1), + Some(MarketDisputeMechanism::SimpleDisputes), + ScoringRule::Lmsr, + ), + Error::::InvalidMultihash + ); + }); +} #[test_case(std::ops::RangeInclusive::new(7, 6); "empty range")] #[test_case(555..=555; "one element as range")] diff --git a/zrml/prediction-markets/src/tests/dispute.rs b/zrml/prediction-markets/src/tests/dispute.rs index b06000d78..8dc16635b 100644 --- a/zrml/prediction-markets/src/tests/dispute.rs +++ b/zrml/prediction-markets/src/tests/dispute.rs @@ -36,39 +36,34 @@ fn it_allows_to_dispute_the_outcome_of_a_market() { 0..end, ScoringRule::Lmsr, ); + let market_id = 0; // Run to the end of the trading phase. - let market = MarketCommons::market(&0).unwrap(); + let market = MarketCommons::market(&market_id).unwrap(); let grace_period = end + market.deadlines.grace_period; run_to_block(grace_period + 1); assert_ok!(PredictionMarkets::report( RuntimeOrigin::signed(BOB), - 0, + market_id, OutcomeReport::Categorical(1) )); let dispute_at = grace_period + 2; run_to_block(dispute_at); - assert_ok!(PredictionMarkets::dispute(RuntimeOrigin::signed(CHARLIE), 0,)); - assert_ok!(SimpleDisputes::suggest_outcome( - RuntimeOrigin::signed(CHARLIE), - 0, - OutcomeReport::Categorical(0) - )); - - let market = MarketCommons::market(&0).unwrap(); + assert_ok!(PredictionMarkets::dispute(RuntimeOrigin::signed(CHARLIE), 0)); + let market = MarketCommons::market(&market_id).unwrap(); assert_eq!(market.status, MarketStatus::Disputed); - let disputes = zrml_simple_disputes::Disputes::::get(0); - assert_eq!(disputes.len(), 1); - let dispute = &disputes[0]; - assert_eq!(dispute.at, dispute_at); - assert_eq!(dispute.by, CHARLIE); - assert_eq!(dispute.outcome, OutcomeReport::Categorical(0)); - - let dispute_ends_at = dispute_at + market.deadlines.dispute_duration; + // Ensure that the MDM interacts correctly with auto resolution. + assert_ok!(Authorized::authorize_market_outcome( + RuntimeOrigin::signed(AuthorizedDisputeResolutionUser::get()), + market_id, + OutcomeReport::Categorical(0), + )); + let dispute_ends_at = + dispute_at + ::CorrectionPeriod::get(); let market_ids = MarketIdsPerDisputeBlock::::get(dispute_ends_at); assert_eq!(market_ids.len(), 1); assert_eq!(market_ids[0], 0); @@ -107,7 +102,7 @@ fn dispute_fails_disputed_already() { let dispute_at = grace_period + 2; run_to_block(dispute_at); - assert_ok!(PredictionMarkets::dispute(RuntimeOrigin::signed(CHARLIE), 0,)); + assert_ok!(PredictionMarkets::dispute(RuntimeOrigin::signed(CHARLIE), 0)); assert_noop!( PredictionMarkets::dispute(RuntimeOrigin::signed(CHARLIE), 0), diff --git a/zrml/prediction-markets/src/tests/dispute_early_close.rs b/zrml/prediction-markets/src/tests/dispute_early_close.rs index 074b10012..8ed76eee4 100644 --- a/zrml/prediction-markets/src/tests/dispute_early_close.rs +++ b/zrml/prediction-markets/src/tests/dispute_early_close.rs @@ -142,9 +142,10 @@ fn dispute_early_close_fails_if_scheduled_as_sudo() { )); let market_id = 0; - assert_ok!( - PredictionMarkets::schedule_early_close(RuntimeOrigin::signed(SUDO), market_id,) - ); + assert_ok!(PredictionMarkets::schedule_early_close( + RuntimeOrigin::signed(CloseMarketEarlyOrigin::get()), + market_id + )); run_blocks(1); @@ -221,7 +222,10 @@ fn dispute_early_close_fails_if_already_rejected() { assert_ok!(PredictionMarkets::dispute_early_close(RuntimeOrigin::signed(BOB), market_id,)); - assert_ok!(PredictionMarkets::reject_early_close(RuntimeOrigin::signed(SUDO), market_id,)); + assert_ok!(PredictionMarkets::reject_early_close( + RuntimeOrigin::signed(CloseMarketEarlyOrigin::get()), + market_id + )); let market = MarketCommons::market(&market_id).unwrap(); assert_eq!(market.early_close.unwrap().state, EarlyCloseState::Rejected); @@ -377,9 +381,10 @@ fn schedule_early_close_disputed_sudo_schedule_and_settle_bonds() { let free_bob = Balances::free_balance(BOB); let free_alice = Balances::free_balance(ALICE); - assert_ok!( - PredictionMarkets::schedule_early_close(RuntimeOrigin::signed(SUDO), market_id,) - ); + assert_ok!(PredictionMarkets::schedule_early_close( + RuntimeOrigin::signed(CloseMarketEarlyOrigin::get()), + market_id + )); let reserved_bob_after = Balances::reserved_balance(BOB); let reserved_alice_after = Balances::reserved_balance(ALICE); diff --git a/zrml/prediction-markets/src/tests/edit_market.rs b/zrml/prediction-markets/src/tests/edit_market.rs index 7bc90dc9f..0dbb0e077 100644 --- a/zrml/prediction-markets/src/tests/edit_market.rs +++ b/zrml/prediction-markets/src/tests/edit_market.rs @@ -41,8 +41,12 @@ fn only_creator_can_edit_market() { let edit_reason = vec![0_u8; ::MaxEditReasonLen::get() as usize]; - // Now it should work from SUDO - assert_ok!(PredictionMarkets::request_edit(RuntimeOrigin::signed(SUDO), 0, edit_reason)); + // Now it should work for the designated origin. + assert_ok!(PredictionMarkets::request_edit( + RuntimeOrigin::signed(RequestEditOrigin::get()), + 0, + edit_reason + )); assert!(MarketIdsForEdit::::contains_key(0)); @@ -80,8 +84,12 @@ fn edit_cycle_for_proposed_markets() { let edit_reason = vec![0_u8; ::MaxEditReasonLen::get() as usize]; - // Now it should work from SUDO - assert_ok!(PredictionMarkets::request_edit(RuntimeOrigin::signed(SUDO), 0, edit_reason)); + // Now it should work for the designated origin. + assert_ok!(PredictionMarkets::request_edit( + RuntimeOrigin::signed(RequestEditOrigin::get()), + 0, + edit_reason + )); assert!(MarketIdsForEdit::::contains_key(0)); @@ -126,8 +134,12 @@ fn edit_market_with_foreign_asset() { let edit_reason = vec![0_u8; ::MaxEditReasonLen::get() as usize]; - // Now it should work from SUDO - assert_ok!(PredictionMarkets::request_edit(RuntimeOrigin::signed(SUDO), 0, edit_reason)); + // Now it should work for the designated origin. + assert_ok!(PredictionMarkets::request_edit( + RuntimeOrigin::signed(RequestEditOrigin::get()), + 0, + edit_reason + )); assert!(MarketIdsForEdit::::contains_key(0)); diff --git a/zrml/prediction-markets/src/tests/integration.rs b/zrml/prediction-markets/src/tests/integration.rs index 347879638..86b72158f 100644 --- a/zrml/prediction-markets/src/tests/integration.rs +++ b/zrml/prediction-markets/src/tests/integration.rs @@ -17,13 +17,15 @@ // along with Zeitgeist. If not, see . use super::*; - -use alloc::collections::BTreeMap; -use zeitgeist_primitives::types::OutcomeReport; - use crate::MarketIdsPerDisputeBlock; +use alloc::collections::BTreeMap; use orml_traits::MultiReservableCurrency; -use zeitgeist_primitives::{constants::MILLISECS_PER_BLOCK, types::ScalarPosition}; +use sp_runtime::Perquintill; +use zeitgeist_primitives::{ + constants::MILLISECS_PER_BLOCK, + types::{OutcomeReport, ScalarPosition}, +}; +use zrml_court::types::{CourtStatus, Draw, Vote}; use zrml_global_disputes::{ types::{OutcomeInfo, Possession}, GlobalDisputesPalletApi, Outcomes, PossessionOf, @@ -479,6 +481,242 @@ fn authorized_correctly_resolves_disputed_market() { }); } +#[test] +fn it_resolves_a_disputed_court_market() { + let test = |base_asset: BaseAsset| { + let juror_0 = 1000; + let juror_1 = 1001; + let juror_2 = 1002; + let juror_3 = 1003; + let juror_4 = 1004; + let juror_5 = 1005; + + for j in &[juror_0, juror_1, juror_2, juror_3, juror_4, juror_5] { + let amount = ::MinJurorStake::get() + *j; + assert_ok!(AssetManager::deposit(Asset::Ztg, j, amount + SENTINEL_AMOUNT)); + assert_ok!(Court::join_court(RuntimeOrigin::signed(*j), amount)); + } + + // just to have enough jurors for the dispute + for j in 1006..(1006 + Court::necessary_draws_weight(0usize) as u32) { + let juror = j as u128; + let amount = ::MinJurorStake::get() + juror; + assert_ok!(AssetManager::deposit(Asset::Ztg, &juror, amount + SENTINEL_AMOUNT)); + assert_ok!(Court::join_court(RuntimeOrigin::signed(juror), amount)); + } + + let end = 2; + assert_ok!(PredictionMarkets::create_market( + RuntimeOrigin::signed(ALICE), + base_asset, + Perbill::zero(), + BOB, + MarketPeriod::Block(0..end), + get_deadlines(), + gen_metadata(2), + MarketCreation::Permissionless, + MarketType::Categorical(::MinCategories::get()), + Some(MarketDisputeMechanism::Court), + ScoringRule::Lmsr, + )); + + let market_id = 0; + let market = MarketCommons::market(&0).unwrap(); + + let report_at = end + market.deadlines.grace_period + 1; + run_to_block(report_at); + + assert_ok!(PredictionMarkets::report( + RuntimeOrigin::signed(BOB), + market_id, + OutcomeReport::Categorical(0) + )); + + assert_ok!(PredictionMarkets::dispute(RuntimeOrigin::signed(CHARLIE), market_id,)); + + let court = zrml_court::Courts::::get(market_id).unwrap(); + let vote_start = court.round_ends.pre_vote + 1; + + run_to_block(vote_start); + + // overwrite draws to disregard randomness + zrml_court::SelectedDraws::::remove(market_id); + let mut draws = zrml_court::SelectedDraws::::get(market_id); + for juror in &[juror_0, juror_1, juror_2, juror_3, juror_4, juror_5] { + let draw = Draw { + court_participant: *juror, + weight: 1, + vote: Vote::Drawn, + slashable: ::MinJurorStake::get(), + }; + let index = draws + .binary_search_by_key(juror, |draw| draw.court_participant) + .unwrap_or_else(|j| j); + draws.try_insert(index, draw).unwrap(); + } + let old_draws = draws.clone(); + zrml_court::SelectedDraws::::insert(market_id, draws); + + let salt = ::Hash::default(); + + // outcome_0 is the plurality decision => right outcome + let outcome_0 = OutcomeReport::Categorical(0); + let vote_item_0 = VoteItem::Outcome(outcome_0.clone()); + // outcome_1 is the wrong outcome + let outcome_1 = OutcomeReport::Categorical(1); + let vote_item_1 = VoteItem::Outcome(outcome_1); + + let commitment_0 = BlakeTwo256::hash_of(&(juror_0, vote_item_0.clone(), salt)); + assert_ok!(Court::vote(RuntimeOrigin::signed(juror_0), market_id, commitment_0)); + + // juror_1 votes for non-plurality outcome => slashed later + let commitment_1 = BlakeTwo256::hash_of(&(juror_1, vote_item_1.clone(), salt)); + assert_ok!(Court::vote(RuntimeOrigin::signed(juror_1), market_id, commitment_1)); + + let commitment_2 = BlakeTwo256::hash_of(&(juror_2, vote_item_0.clone(), salt)); + assert_ok!(Court::vote(RuntimeOrigin::signed(juror_2), market_id, commitment_2)); + + let commitment_3 = BlakeTwo256::hash_of(&(juror_3, vote_item_0.clone(), salt)); + assert_ok!(Court::vote(RuntimeOrigin::signed(juror_3), market_id, commitment_3)); + + // juror_4 fails to vote in time + + let commitment_5 = BlakeTwo256::hash_of(&(juror_5, vote_item_0.clone(), salt)); + assert_ok!(Court::vote(RuntimeOrigin::signed(juror_5), market_id, commitment_5)); + + // juror_3 is denounced by juror_0 => slashed later + assert_ok!(Court::denounce_vote( + RuntimeOrigin::signed(juror_0), + market_id, + juror_3, + vote_item_0.clone(), + salt + )); + + let aggregation_start = court.round_ends.vote + 1; + run_to_block(aggregation_start); + + assert_ok!(Court::reveal_vote( + RuntimeOrigin::signed(juror_0), + market_id, + vote_item_0.clone(), + salt + )); + assert_ok!(Court::reveal_vote( + RuntimeOrigin::signed(juror_1), + market_id, + vote_item_1, + salt + )); + + let wrong_salt = BlakeTwo256::hash_of(&69); + assert_noop!( + Court::reveal_vote( + RuntimeOrigin::signed(juror_2), + market_id, + vote_item_0.clone(), + wrong_salt + ), + zrml_court::Error::::CommitmentHashMismatch + ); + assert_ok!(Court::reveal_vote( + RuntimeOrigin::signed(juror_2), + market_id, + vote_item_0.clone(), + salt + )); + + assert_noop!( + Court::reveal_vote( + RuntimeOrigin::signed(juror_3), + market_id, + vote_item_0.clone(), + salt + ), + zrml_court::Error::::VoteAlreadyDenounced + ); + + assert_noop!( + Court::reveal_vote( + RuntimeOrigin::signed(juror_4), + market_id, + vote_item_0.clone(), + salt + ), + zrml_court::Error::::JurorDidNotVote + ); + + // juror_5 fails to reveal in time + + let resolve_at = court.round_ends.appeal; + let market_ids = MarketIdsPerDisputeBlock::::get(resolve_at); + assert_eq!(market_ids.len(), 1); + + run_blocks(resolve_at); + + let market_after = MarketCommons::market(&0).unwrap(); + assert_eq!(market_after.status, MarketStatus::Resolved); + assert_eq!(market_after.resolved_outcome, Some(outcome_0)); + let court_after = zrml_court::Courts::::get(market_id).unwrap(); + assert_eq!(court_after.status, CourtStatus::Closed { winner: vote_item_0 }); + + let free_juror_0_before = Balances::free_balance(juror_0); + let free_juror_1_before = Balances::free_balance(juror_1); + let free_juror_2_before = Balances::free_balance(juror_2); + let free_juror_3_before = Balances::free_balance(juror_3); + let free_juror_4_before = Balances::free_balance(juror_4); + let free_juror_5_before = Balances::free_balance(juror_5); + + assert_ok!(Court::reassign_court_stakes(RuntimeOrigin::signed(juror_0), market_id)); + + let free_juror_0_after = Balances::free_balance(juror_0); + let slashable_juror_0 = + old_draws.iter().find(|draw| draw.court_participant == juror_0).unwrap().slashable; + let free_juror_1_after = Balances::free_balance(juror_1); + let slashable_juror_1 = + old_draws.iter().find(|draw| draw.court_participant == juror_1).unwrap().slashable; + let free_juror_2_after = Balances::free_balance(juror_2); + let slashable_juror_2 = + old_draws.iter().find(|draw| draw.court_participant == juror_2).unwrap().slashable; + let free_juror_3_after = Balances::free_balance(juror_3); + let slashable_juror_3 = + old_draws.iter().find(|draw| draw.court_participant == juror_3).unwrap().slashable; + let free_juror_4_after = Balances::free_balance(juror_4); + let slashable_juror_4 = + old_draws.iter().find(|draw| draw.court_participant == juror_4).unwrap().slashable; + let free_juror_5_after = Balances::free_balance(juror_5); + let slashable_juror_5 = + old_draws.iter().find(|draw| draw.court_participant == juror_5).unwrap().slashable; + + let mut total_slashed = 0; + // juror_1 voted for the wrong outcome => slashed + assert_eq!(free_juror_1_before - free_juror_1_after, slashable_juror_1); + total_slashed += slashable_juror_1; + // juror_3 was denounced by juror_0 => slashed + assert_eq!(free_juror_3_before - free_juror_3_after, slashable_juror_3); + total_slashed += slashable_juror_3; + // juror_4 failed to vote => slashed + assert_eq!(free_juror_4_before - free_juror_4_after, slashable_juror_4); + total_slashed += slashable_juror_4; + // juror_5 failed to reveal => slashed + assert_eq!(free_juror_5_before - free_juror_5_after, slashable_juror_5); + total_slashed += slashable_juror_5; + // juror_0 and juror_2 voted for the right outcome => rewarded + let total_winner_stake = slashable_juror_0 + slashable_juror_2; + let juror_0_share = Perquintill::from_rational(slashable_juror_0, total_winner_stake); + assert_eq!(free_juror_0_after, free_juror_0_before + juror_0_share * total_slashed); + let juror_2_share = Perquintill::from_rational(slashable_juror_2, total_winner_stake); + assert_eq!(free_juror_2_after, free_juror_2_before + juror_2_share * total_slashed); + }; + ExtBuilder::default().build().execute_with(|| { + test(BaseAsset::Ztg); + }); + #[cfg(feature = "parachain")] + ExtBuilder::default().build().execute_with(|| { + test(BaseAsset::ForeignAsset(100)); + }); +} + #[test] fn outsider_reports_wrong_outcome() { // NOTE: Bonds are always in ZTG, irrespective of base_asset. diff --git a/zrml/prediction-markets/src/tests/mod.rs b/zrml/prediction-markets/src/tests/mod.rs index e4d159553..662ff84f8 100644 --- a/zrml/prediction-markets/src/tests/mod.rs +++ b/zrml/prediction-markets/src/tests/mod.rs @@ -122,7 +122,7 @@ fn simple_create_categorical_market( gen_metadata(2), creation, MarketType::Categorical(::MinCategories::get()), - Some(MarketDisputeMechanism::SimpleDisputes), + Some(MarketDisputeMechanism::Authorized), scoring_rule )); } diff --git a/zrml/prediction-markets/src/tests/on_market_close.rs b/zrml/prediction-markets/src/tests/on_market_close.rs index ae8762b21..f5189bd3c 100644 --- a/zrml/prediction-markets/src/tests/on_market_close.rs +++ b/zrml/prediction-markets/src/tests/on_market_close.rs @@ -101,7 +101,7 @@ fn on_market_close_auto_rejects_expired_advised_market_with_edit_request() { let edit_reason = vec![0_u8; ::MaxEditReasonLen::get() as usize]; assert_ok!(PredictionMarkets::request_edit( - RuntimeOrigin::signed(SUDO), + RuntimeOrigin::signed(RequestEditOrigin::get()), market_id, edit_reason )); diff --git a/zrml/prediction-markets/src/tests/on_resolution.rs b/zrml/prediction-markets/src/tests/on_resolution.rs index 4f640ed33..a7a9672da 100644 --- a/zrml/prediction-markets/src/tests/on_resolution.rs +++ b/zrml/prediction-markets/src/tests/on_resolution.rs @@ -19,12 +19,8 @@ use super::*; use crate::{MarketIdsPerDisputeBlock, MarketIdsPerReportBlock}; -use sp_runtime::{ - traits::{BlakeTwo256, Hash, Zero}, - Perquintill, -}; +use sp_runtime::traits::Zero; use zeitgeist_primitives::types::{Bond, OutcomeReport, Report}; -use zrml_court::types::{CourtStatus, Draw, Vote, VoteItem}; #[test] fn it_correctly_resolves_a_market_that_was_reported_on() { @@ -84,404 +80,6 @@ fn it_correctly_resolves_a_market_that_was_reported_on() { }); } -#[test] -fn it_resolves_a_disputed_market() { - let test = |base_asset: BaseAsset| { - let end = 2; - simple_create_categorical_market( - base_asset, - MarketCreation::Permissionless, - 0..end, - ScoringRule::Lmsr, - ); - - assert_ok!(PredictionMarkets::buy_complete_set(RuntimeOrigin::signed(CHARLIE), 0, CENT)); - let market = MarketCommons::market(&0).unwrap(); - - let report_at = end + market.deadlines.grace_period + 1; - run_to_block(report_at); - - assert_ok!(PredictionMarkets::report( - RuntimeOrigin::signed(BOB), - 0, - OutcomeReport::Categorical(0) - )); - - assert_ok!(PredictionMarkets::dispute(RuntimeOrigin::signed(CHARLIE), 0,)); - - let market = MarketCommons::market(&0).unwrap(); - assert_eq!(market.status, MarketStatus::Disputed); - - let charlie_reserved = Balances::reserved_balance(CHARLIE); - assert_eq!(charlie_reserved, DisputeBond::get()); - - let dispute_at_0 = report_at + 1; - run_to_block(dispute_at_0); - - assert_ok!(SimpleDisputes::suggest_outcome( - RuntimeOrigin::signed(CHARLIE), - 0, - OutcomeReport::Categorical(1) - )); - - let dispute_at_1 = report_at + 2; - run_to_block(dispute_at_1); - - assert_ok!(SimpleDisputes::suggest_outcome( - RuntimeOrigin::signed(DAVE), - 0, - OutcomeReport::Categorical(0) - )); - - let dispute_at_2 = report_at + 3; - run_to_block(dispute_at_2); - - assert_ok!(SimpleDisputes::suggest_outcome( - RuntimeOrigin::signed(EVE), - 0, - OutcomeReport::Categorical(1) - )); - - let market = MarketCommons::market(&0).unwrap(); - assert_eq!(market.status, MarketStatus::Disputed); - - // check everyone's deposits - let charlie_reserved = Balances::reserved_balance(CHARLIE); - assert_eq!( - charlie_reserved, - DisputeBond::get() + ::OutcomeBond::get() - ); - - let dave_reserved = Balances::reserved_balance(DAVE); - assert_eq!( - dave_reserved, - ::OutcomeBond::get() - + ::OutcomeFactor::get() - ); - - let eve_reserved = Balances::reserved_balance(EVE); - assert_eq!( - eve_reserved, - ::OutcomeBond::get() - + 2 * ::OutcomeFactor::get() - ); - - // check disputes length - let disputes = zrml_simple_disputes::Disputes::::get(0); - assert_eq!(disputes.len(), 3); - - // make sure the old mappings of market id per dispute block are erased - let market_ids_1 = MarketIdsPerDisputeBlock::::get( - dispute_at_0 + market.deadlines.dispute_duration, - ); - assert_eq!(market_ids_1.len(), 0); - - let market_ids_2 = MarketIdsPerDisputeBlock::::get( - dispute_at_1 + market.deadlines.dispute_duration, - ); - assert_eq!(market_ids_2.len(), 0); - - let market_ids_3 = MarketIdsPerDisputeBlock::::get( - dispute_at_2 + market.deadlines.dispute_duration, - ); - assert_eq!(market_ids_3.len(), 1); - - run_blocks(market.deadlines.dispute_duration); - - let market_after = MarketCommons::market(&0).unwrap(); - assert_eq!(market_after.status, MarketStatus::Resolved); - let disputes = zrml_simple_disputes::Disputes::::get(0); - assert_eq!(disputes.len(), 0); - - assert_ok!(PredictionMarkets::redeem_shares(RuntimeOrigin::signed(CHARLIE), 0)); - - // Make sure rewards are right: - // - // Slashed amounts: - // - Dave's reserve: ::OutcomeBond::get() + ::OutcomeFactor::get() - // - Alice's oracle bond: OracleBond::get() - // simple-disputes reward: ::OutcomeBond::get() + ::OutcomeFactor::get() - // Charlie gets OracleBond, because the dispute was justified. - // A dispute is justified if the oracle's report is different to the final outcome. - // - // Charlie and Eve each receive half of the simple-disputes reward as bounty. - let dave_reserved = ::OutcomeBond::get() - + ::OutcomeFactor::get(); - let total_slashed = dave_reserved; - - let charlie_balance = Balances::free_balance(CHARLIE); - assert_eq!(charlie_balance, 1_000 * BASE + OracleBond::get() + total_slashed / 2); - let charlie_reserved_2 = Balances::reserved_balance(CHARLIE); - assert_eq!(charlie_reserved_2, 0); - let eve_balance = Balances::free_balance(EVE); - assert_eq!(eve_balance, 1_000 * BASE + total_slashed / 2); - - let dave_balance = Balances::free_balance(DAVE); - assert_eq!(dave_balance, 1_000 * BASE - dave_reserved); - - let alice_balance = Balances::free_balance(ALICE); - assert_eq!(alice_balance, 1_000 * BASE - OracleBond::get()); - - // bob kinda gets away scot-free since Alice is held responsible - // for her designated reporter - let bob_balance = Balances::free_balance(BOB); - assert_eq!(bob_balance, 1_000 * BASE); - - assert!(market_after.bonds.creation.unwrap().is_settled); - assert!(market_after.bonds.oracle.unwrap().is_settled); - assert!(market_after.bonds.dispute.unwrap().is_settled); - }; - ExtBuilder::default().build().execute_with(|| { - test(BaseAsset::CampaignAsset(100)); - }); - ExtBuilder::default().build().execute_with(|| { - test(BaseAsset::Ztg); - }); - #[cfg(feature = "parachain")] - ExtBuilder::default().build().execute_with(|| { - test(BaseAsset::ForeignAsset(100)); - }); -} - -#[test] -fn it_resolves_a_disputed_court_market() { - let test = |base_asset: BaseAsset| { - let juror_0 = 1000; - let juror_1 = 1001; - let juror_2 = 1002; - let juror_3 = 1003; - let juror_4 = 1004; - let juror_5 = 1005; - - for j in &[juror_0, juror_1, juror_2, juror_3, juror_4, juror_5] { - let amount = ::MinJurorStake::get() + *j; - assert_ok!(AssetManager::deposit(Asset::Ztg, j, amount + SENTINEL_AMOUNT)); - assert_ok!(Court::join_court(RuntimeOrigin::signed(*j), amount)); - } - - // just to have enough jurors for the dispute - for j in 1006..(1006 + Court::necessary_draws_weight(0usize) as u32) { - let juror = j as u128; - let amount = ::MinJurorStake::get() + juror; - assert_ok!(AssetManager::deposit(Asset::Ztg, &juror, amount + SENTINEL_AMOUNT)); - assert_ok!(Court::join_court(RuntimeOrigin::signed(juror), amount)); - } - - let end = 2; - assert_ok!(PredictionMarkets::create_market( - RuntimeOrigin::signed(ALICE), - base_asset, - Perbill::zero(), - BOB, - MarketPeriod::Block(0..end), - get_deadlines(), - gen_metadata(2), - MarketCreation::Permissionless, - MarketType::Categorical(::MinCategories::get()), - Some(MarketDisputeMechanism::Court), - ScoringRule::Lmsr, - )); - - let market_id = 0; - let market = MarketCommons::market(&0).unwrap(); - - let report_at = end + market.deadlines.grace_period + 1; - run_to_block(report_at); - - assert_ok!(PredictionMarkets::report( - RuntimeOrigin::signed(BOB), - market_id, - OutcomeReport::Categorical(0) - )); - - assert_ok!(PredictionMarkets::dispute(RuntimeOrigin::signed(CHARLIE), market_id,)); - - let court = zrml_court::Courts::::get(market_id).unwrap(); - let vote_start = court.round_ends.pre_vote + 1; - - run_to_block(vote_start); - - // overwrite draws to disregard randomness - zrml_court::SelectedDraws::::remove(market_id); - let mut draws = zrml_court::SelectedDraws::::get(market_id); - for juror in &[juror_0, juror_1, juror_2, juror_3, juror_4, juror_5] { - let draw = Draw { - court_participant: *juror, - weight: 1, - vote: Vote::Drawn, - slashable: ::MinJurorStake::get(), - }; - let index = draws - .binary_search_by_key(juror, |draw| draw.court_participant) - .unwrap_or_else(|j| j); - draws.try_insert(index, draw).unwrap(); - } - let old_draws = draws.clone(); - zrml_court::SelectedDraws::::insert(market_id, draws); - - let salt = ::Hash::default(); - - // outcome_0 is the plurality decision => right outcome - let outcome_0 = OutcomeReport::Categorical(0); - let vote_item_0 = VoteItem::Outcome(outcome_0.clone()); - // outcome_1 is the wrong outcome - let outcome_1 = OutcomeReport::Categorical(1); - let vote_item_1 = VoteItem::Outcome(outcome_1); - - let commitment_0 = BlakeTwo256::hash_of(&(juror_0, vote_item_0.clone(), salt)); - assert_ok!(Court::vote(RuntimeOrigin::signed(juror_0), market_id, commitment_0)); - - // juror_1 votes for non-plurality outcome => slashed later - let commitment_1 = BlakeTwo256::hash_of(&(juror_1, vote_item_1.clone(), salt)); - assert_ok!(Court::vote(RuntimeOrigin::signed(juror_1), market_id, commitment_1)); - - let commitment_2 = BlakeTwo256::hash_of(&(juror_2, vote_item_0.clone(), salt)); - assert_ok!(Court::vote(RuntimeOrigin::signed(juror_2), market_id, commitment_2)); - - let commitment_3 = BlakeTwo256::hash_of(&(juror_3, vote_item_0.clone(), salt)); - assert_ok!(Court::vote(RuntimeOrigin::signed(juror_3), market_id, commitment_3)); - - // juror_4 fails to vote in time - - let commitment_5 = BlakeTwo256::hash_of(&(juror_5, vote_item_0.clone(), salt)); - assert_ok!(Court::vote(RuntimeOrigin::signed(juror_5), market_id, commitment_5)); - - // juror_3 is denounced by juror_0 => slashed later - assert_ok!(Court::denounce_vote( - RuntimeOrigin::signed(juror_0), - market_id, - juror_3, - vote_item_0.clone(), - salt - )); - - let aggregation_start = court.round_ends.vote + 1; - run_to_block(aggregation_start); - - assert_ok!(Court::reveal_vote( - RuntimeOrigin::signed(juror_0), - market_id, - vote_item_0.clone(), - salt - )); - assert_ok!(Court::reveal_vote( - RuntimeOrigin::signed(juror_1), - market_id, - vote_item_1, - salt - )); - - let wrong_salt = BlakeTwo256::hash_of(&69); - assert_noop!( - Court::reveal_vote( - RuntimeOrigin::signed(juror_2), - market_id, - vote_item_0.clone(), - wrong_salt - ), - zrml_court::Error::::CommitmentHashMismatch - ); - assert_ok!(Court::reveal_vote( - RuntimeOrigin::signed(juror_2), - market_id, - vote_item_0.clone(), - salt - )); - - assert_noop!( - Court::reveal_vote( - RuntimeOrigin::signed(juror_3), - market_id, - vote_item_0.clone(), - salt - ), - zrml_court::Error::::VoteAlreadyDenounced - ); - - assert_noop!( - Court::reveal_vote( - RuntimeOrigin::signed(juror_4), - market_id, - vote_item_0.clone(), - salt - ), - zrml_court::Error::::JurorDidNotVote - ); - - // juror_5 fails to reveal in time - - let resolve_at = court.round_ends.appeal; - let market_ids = MarketIdsPerDisputeBlock::::get(resolve_at); - assert_eq!(market_ids.len(), 1); - - run_blocks(resolve_at); - - let market_after = MarketCommons::market(&0).unwrap(); - assert_eq!(market_after.status, MarketStatus::Resolved); - assert_eq!(market_after.resolved_outcome, Some(outcome_0)); - let court_after = zrml_court::Courts::::get(market_id).unwrap(); - assert_eq!(court_after.status, CourtStatus::Closed { winner: vote_item_0 }); - - let free_juror_0_before = Balances::free_balance(juror_0); - let free_juror_1_before = Balances::free_balance(juror_1); - let free_juror_2_before = Balances::free_balance(juror_2); - let free_juror_3_before = Balances::free_balance(juror_3); - let free_juror_4_before = Balances::free_balance(juror_4); - let free_juror_5_before = Balances::free_balance(juror_5); - - assert_ok!(Court::reassign_court_stakes(RuntimeOrigin::signed(juror_0), market_id)); - - let free_juror_0_after = Balances::free_balance(juror_0); - let slashable_juror_0 = - old_draws.iter().find(|draw| draw.court_participant == juror_0).unwrap().slashable; - let free_juror_1_after = Balances::free_balance(juror_1); - let slashable_juror_1 = - old_draws.iter().find(|draw| draw.court_participant == juror_1).unwrap().slashable; - let free_juror_2_after = Balances::free_balance(juror_2); - let slashable_juror_2 = - old_draws.iter().find(|draw| draw.court_participant == juror_2).unwrap().slashable; - let free_juror_3_after = Balances::free_balance(juror_3); - let slashable_juror_3 = - old_draws.iter().find(|draw| draw.court_participant == juror_3).unwrap().slashable; - let free_juror_4_after = Balances::free_balance(juror_4); - let slashable_juror_4 = - old_draws.iter().find(|draw| draw.court_participant == juror_4).unwrap().slashable; - let free_juror_5_after = Balances::free_balance(juror_5); - let slashable_juror_5 = - old_draws.iter().find(|draw| draw.court_participant == juror_5).unwrap().slashable; - - let mut total_slashed = 0; - // juror_1 voted for the wrong outcome => slashed - assert_eq!(free_juror_1_before - free_juror_1_after, slashable_juror_1); - total_slashed += slashable_juror_1; - // juror_3 was denounced by juror_0 => slashed - assert_eq!(free_juror_3_before - free_juror_3_after, slashable_juror_3); - total_slashed += slashable_juror_3; - // juror_4 failed to vote => slashed - assert_eq!(free_juror_4_before - free_juror_4_after, slashable_juror_4); - total_slashed += slashable_juror_4; - // juror_5 failed to reveal => slashed - assert_eq!(free_juror_5_before - free_juror_5_after, slashable_juror_5); - total_slashed += slashable_juror_5; - // juror_0 and juror_2 voted for the right outcome => rewarded - let total_winner_stake = slashable_juror_0 + slashable_juror_2; - let juror_0_share = Perquintill::from_rational(slashable_juror_0, total_winner_stake); - assert_eq!(free_juror_0_after, free_juror_0_before + juror_0_share * total_slashed); - let juror_2_share = Perquintill::from_rational(slashable_juror_2, total_winner_stake); - assert_eq!(free_juror_2_after, free_juror_2_before + juror_2_share * total_slashed); - }; - ExtBuilder::default().build().execute_with(|| { - test(BaseAsset::CampaignAsset(100)); - }); - ExtBuilder::default().build().execute_with(|| { - test(BaseAsset::Ztg); - }); - #[cfg(feature = "parachain")] - ExtBuilder::default().build().execute_with(|| { - test(BaseAsset::ForeignAsset(100)); - }); -} - #[test] fn on_resolution_correctly_reserves_and_unreserves_bonds_for_approved_advised_market_on_oracle_report() { @@ -502,7 +100,10 @@ fn on_resolution_correctly_reserves_and_unreserves_bonds_for_approved_advised_ma Some(MarketDisputeMechanism::SimpleDisputes), ScoringRule::Lmsr, )); - assert_ok!(PredictionMarkets::approve_market(RuntimeOrigin::signed(SUDO), 0)); + assert_ok!(PredictionMarkets::approve_market( + RuntimeOrigin::signed(ApproveOrigin::get()), + 0 + )); let alice_balance_before = Balances::free_balance(ALICE); check_reserve(&ALICE, OracleBond::get()); let market = MarketCommons::market(&0).unwrap(); @@ -551,7 +152,10 @@ fn on_resolution_correctly_reserves_and_unreserves_bonds_for_approved_advised_ma Some(MarketDisputeMechanism::SimpleDisputes), ScoringRule::Lmsr, )); - assert_ok!(PredictionMarkets::approve_market(RuntimeOrigin::signed(SUDO), 0)); + assert_ok!(PredictionMarkets::approve_market( + RuntimeOrigin::signed(ApproveOrigin::get()), + 0 + )); let alice_balance_before = Balances::free_balance(ALICE); check_reserve(&ALICE, OracleBond::get()); let market = MarketCommons::market(&0).unwrap(); @@ -655,7 +259,10 @@ fn on_resolution_correctly_reserves_and_unreserves_bonds_for_approved_advised_ma Some(MarketDisputeMechanism::SimpleDisputes), ScoringRule::Lmsr, )); - assert_ok!(PredictionMarkets::approve_market(RuntimeOrigin::signed(SUDO), 0)); + assert_ok!(PredictionMarkets::approve_market( + RuntimeOrigin::signed(ApproveOrigin::get()), + 0 + )); let alice_balance_before = Balances::free_balance(ALICE); check_reserve(&ALICE, OracleBond::get()); let market = MarketCommons::market(&0).unwrap(); @@ -773,7 +380,10 @@ fn on_resolution_correctly_reserves_and_unreserves_bonds_for_advised_approved_ma Some(MarketDisputeMechanism::SimpleDisputes), ScoringRule::Lmsr, )); - assert_ok!(PredictionMarkets::approve_market(RuntimeOrigin::signed(SUDO), 0)); + assert_ok!(PredictionMarkets::approve_market( + RuntimeOrigin::signed(ApproveOrigin::get()), + 0 + )); let alice_balance_before = Balances::free_balance(ALICE); check_reserve(&ALICE, OracleBond::get()); let market = MarketCommons::market(&0).unwrap(); @@ -912,7 +522,10 @@ fn on_resolution_correctly_reserves_and_unreserves_bonds_for_advised_approved_ma let outsider = CHARLIE; - assert_ok!(PredictionMarkets::approve_market(RuntimeOrigin::signed(SUDO), 0)); + assert_ok!(PredictionMarkets::approve_market( + RuntimeOrigin::signed(ApproveOrigin::get()), + 0 + )); let alice_balance_before = Balances::free_balance(ALICE); check_reserve(&ALICE, OracleBond::get()); let market = MarketCommons::market(&0).unwrap(); diff --git a/zrml/prediction-markets/src/tests/reject_early_close.rs b/zrml/prediction-markets/src/tests/reject_early_close.rs index 2a61054ad..0a99c5b87 100644 --- a/zrml/prediction-markets/src/tests/reject_early_close.rs +++ b/zrml/prediction-markets/src/tests/reject_early_close.rs @@ -44,7 +44,10 @@ fn reject_early_close_emits_event() { assert_ok!(PredictionMarkets::dispute_early_close(RuntimeOrigin::signed(BOB), market_id,)); - assert_ok!(PredictionMarkets::reject_early_close(RuntimeOrigin::signed(SUDO), market_id,)); + assert_ok!(PredictionMarkets::reject_early_close( + RuntimeOrigin::signed(CloseMarketEarlyOrigin::get()), + market_id + )); System::assert_last_event(Event::MarketEarlyCloseRejected { market_id }.into()); }); @@ -72,7 +75,10 @@ fn reject_early_close_fails_if_state_is_scheduled_as_market_creator() { )); assert_noop!( - PredictionMarkets::reject_early_close(RuntimeOrigin::signed(SUDO), market_id,), + PredictionMarkets::reject_early_close( + RuntimeOrigin::signed(CloseMarketEarlyOrigin::get()), + market_id + ), Error::::InvalidEarlyCloseState ); }); @@ -94,14 +100,21 @@ fn reject_early_close_fails_if_state_is_rejected() { let market_id = 0; - assert_ok!( - PredictionMarkets::schedule_early_close(RuntimeOrigin::signed(SUDO), market_id,) - ); + assert_ok!(PredictionMarkets::schedule_early_close( + RuntimeOrigin::signed(CloseMarketEarlyOrigin::get()), + market_id + )); - assert_ok!(PredictionMarkets::reject_early_close(RuntimeOrigin::signed(SUDO), market_id,)); + assert_ok!(PredictionMarkets::reject_early_close( + RuntimeOrigin::signed(CloseMarketEarlyOrigin::get()), + market_id + )); assert_noop!( - PredictionMarkets::reject_early_close(RuntimeOrigin::signed(SUDO), market_id,), + PredictionMarkets::reject_early_close( + RuntimeOrigin::signed(CloseMarketEarlyOrigin::get()), + market_id + ), Error::::InvalidEarlyCloseState ); }); @@ -126,9 +139,10 @@ fn reject_early_close_resets_to_old_market_period() { )); let market_id = 0; - assert_ok!( - PredictionMarkets::schedule_early_close(RuntimeOrigin::signed(SUDO), market_id,) - ); + assert_ok!(PredictionMarkets::schedule_early_close( + RuntimeOrigin::signed(CloseMarketEarlyOrigin::get()), + market_id + )); let now = >::block_number(); let new_end = now + ::CloseEarlyProtectionBlockPeriod::get(); @@ -137,7 +151,10 @@ fn reject_early_close_resets_to_old_market_period() { run_blocks(1); - assert_ok!(PredictionMarkets::reject_early_close(RuntimeOrigin::signed(SUDO), market_id,)); + assert_ok!(PredictionMarkets::reject_early_close( + RuntimeOrigin::signed(CloseMarketEarlyOrigin::get()), + market_id + )); let market_ids_at_new_end = >::get(new_end); assert!(market_ids_at_new_end.is_empty()); @@ -180,7 +197,10 @@ fn reject_early_close_settles_bonds() { let free_bob = Balances::free_balance(BOB); let free_alice = Balances::free_balance(ALICE); - assert_ok!(PredictionMarkets::reject_early_close(RuntimeOrigin::signed(SUDO), market_id,)); + assert_ok!(PredictionMarkets::reject_early_close( + RuntimeOrigin::signed(CloseMarketEarlyOrigin::get()), + market_id + )); let market = MarketCommons::market(&market_id).unwrap(); assert_eq!(market.early_close.unwrap().state, EarlyCloseState::Rejected); diff --git a/zrml/prediction-markets/src/tests/reject_market.rs b/zrml/prediction-markets/src/tests/reject_market.rs index 02e0b979d..96bf08052 100644 --- a/zrml/prediction-markets/src/tests/reject_market.rs +++ b/zrml/prediction-markets/src/tests/reject_market.rs @@ -39,7 +39,7 @@ fn it_allows_the_advisory_origin_to_reject_markets() { let reject_reason: Vec = vec![0; ::MaxRejectReasonLen::get() as usize]; assert_ok!(PredictionMarkets::reject_market( - RuntimeOrigin::signed(SUDO), + RuntimeOrigin::signed(RejectOrigin::get()), 0, reject_reason.clone() )); @@ -71,7 +71,11 @@ fn reject_errors_if_reject_reason_is_too_long() { let reject_reason: Vec = vec![0; ::MaxRejectReasonLen::get() as usize + 1]; assert_noop!( - PredictionMarkets::reject_market(RuntimeOrigin::signed(SUDO), 0, reject_reason), + PredictionMarkets::reject_market( + RuntimeOrigin::signed(RejectOrigin::get()), + 0, + reject_reason + ), Error::::RejectReasonLengthExceedsMaxRejectReasonLen ); }); @@ -95,9 +99,17 @@ fn it_allows_the_advisory_origin_to_reject_markets_with_edit_request() { let edit_reason = vec![0_u8; ::MaxEditReasonLen::get() as usize]; let reject_reason = vec![0_u8; ::MaxRejectReasonLen::get() as usize]; - assert_ok!(PredictionMarkets::request_edit(RuntimeOrigin::signed(SUDO), 0, edit_reason)); + assert_ok!(PredictionMarkets::request_edit( + RuntimeOrigin::signed(RequestEditOrigin::get()), + 0, + edit_reason + )); assert!(MarketIdsForEdit::::contains_key(0)); - assert_ok!(PredictionMarkets::reject_market(RuntimeOrigin::signed(SUDO), 0, reject_reason)); + assert_ok!(PredictionMarkets::reject_market( + RuntimeOrigin::signed(RejectOrigin::get()), + 0, + reject_reason + )); assert!(!MarketIdsForEdit::::contains_key(0)); assert_noop!( @@ -134,7 +146,11 @@ fn reject_market_unreserves_oracle_bond_and_slashes_advisory_bond() { let reject_reason: Vec = vec![0; ::MaxRejectReasonLen::get() as usize]; - assert_ok!(PredictionMarkets::reject_market(RuntimeOrigin::signed(SUDO), 0, reject_reason)); + assert_ok!(PredictionMarkets::reject_market( + RuntimeOrigin::signed(RejectOrigin::get()), + 0, + reject_reason + )); // AdvisoryBond gets slashed after reject_market // OracleBond gets unreserved after reject_market @@ -199,7 +215,11 @@ fn reject_market_clears_auto_close_blocks() { ); let reject_reason: Vec = vec![0; ::MaxRejectReasonLen::get() as usize]; - assert_ok!(PredictionMarkets::reject_market(RuntimeOrigin::signed(SUDO), 0, reject_reason)); + assert_ok!(PredictionMarkets::reject_market( + RuntimeOrigin::signed(RejectOrigin::get()), + 0, + reject_reason + )); let auto_close = MarketIdsPerCloseBlock::::get(66); assert_eq!(auto_close.len(), 1); @@ -220,7 +240,11 @@ fn reject_market_fails_on_permissionless_market() { let reject_reason: Vec = vec![0; ::MaxRejectReasonLen::get() as usize]; assert_noop!( - PredictionMarkets::reject_market(RuntimeOrigin::signed(SUDO), 0, reject_reason), + PredictionMarkets::reject_market( + RuntimeOrigin::signed(RejectOrigin::get()), + 0, + reject_reason + ), Error::::InvalidMarketStatus ); }); @@ -236,11 +260,18 @@ fn reject_market_fails_on_approved_market() { 0..2, ScoringRule::Lmsr, ); - assert_ok!(PredictionMarkets::approve_market(RuntimeOrigin::signed(SUDO), 0)); + assert_ok!(PredictionMarkets::approve_market( + RuntimeOrigin::signed(ApproveOrigin::get()), + 0 + )); let reject_reason: Vec = vec![0; ::MaxRejectReasonLen::get() as usize]; assert_noop!( - PredictionMarkets::reject_market(RuntimeOrigin::signed(SUDO), 0, reject_reason), + PredictionMarkets::reject_market( + RuntimeOrigin::signed(RejectOrigin::get()), + 0, + reject_reason + ), Error::::InvalidMarketStatus ); }); diff --git a/zrml/prediction-markets/src/tests/report.rs b/zrml/prediction-markets/src/tests/report.rs index 63d4df739..bda4ccf2e 100644 --- a/zrml/prediction-markets/src/tests/report.rs +++ b/zrml/prediction-markets/src/tests/report.rs @@ -58,19 +58,6 @@ fn it_allows_to_report_the_outcome_of_a_market() { assert_eq!(market_after.status, MarketStatus::Reported); assert_eq!(report.outcome, OutcomeReport::Categorical(1)); assert_eq!(report.by, market_after.oracle); - - // Reset and report again as approval origin - let _ = MarketCommons::mutate_market(&0, |market| { - market.status = MarketStatus::Closed; - market.report = None; - Ok(()) - }); - - assert_ok!(PredictionMarkets::report( - RuntimeOrigin::signed(SUDO), - 0, - OutcomeReport::Categorical(1) - )); }); } diff --git a/zrml/prediction-markets/src/tests/request_edit.rs b/zrml/prediction-markets/src/tests/request_edit.rs index 31c4e022b..beadb4940 100644 --- a/zrml/prediction-markets/src/tests/request_edit.rs +++ b/zrml/prediction-markets/src/tests/request_edit.rs @@ -44,9 +44,9 @@ fn it_allows_request_edit_origin_to_request_edits_for_markets() { DispatchError::BadOrigin ); - // Now it should work from SUDO + // Now it should work for the designated origin. assert_ok!(PredictionMarkets::request_edit( - RuntimeOrigin::signed(SUDO), + RuntimeOrigin::signed(RequestEditOrigin::get()), 0, edit_reason.clone() )); @@ -104,7 +104,11 @@ fn edit_request_fails_if_edit_reason_is_too_long() { let edit_reason = vec![0_u8; ::MaxEditReasonLen::get() as usize + 1]; assert_noop!( - PredictionMarkets::request_edit(RuntimeOrigin::signed(SUDO), 0, edit_reason), + PredictionMarkets::request_edit( + RuntimeOrigin::signed(RequestEditOrigin::get()), + 0, + edit_reason + ), Error::::EditReasonLengthExceedsMaxEditReasonLen ); }); diff --git a/zrml/prediction-markets/src/tests/schedule_early_close.rs b/zrml/prediction-markets/src/tests/schedule_early_close.rs index d29ca7f8f..bbc2c740b 100644 --- a/zrml/prediction-markets/src/tests/schedule_early_close.rs +++ b/zrml/prediction-markets/src/tests/schedule_early_close.rs @@ -44,7 +44,10 @@ fn schedule_early_close_emits_event() { let market_id = 0; - assert_ok!(PredictionMarkets::schedule_early_close(RuntimeOrigin::signed(SUDO), market_id)); + assert_ok!(PredictionMarkets::schedule_early_close( + RuntimeOrigin::signed(CloseMarketEarlyOrigin::get()), + market_id + )); let now = >::block_number(); let new_end = now + ::CloseEarlyProtectionBlockPeriod::get(); @@ -89,9 +92,10 @@ fn sudo_schedule_early_close_at_block_works() { assert_eq!(market_ids_to_close.1.into_inner(), vec![market_id]); assert!(market.early_close.is_none()); - assert_ok!( - PredictionMarkets::schedule_early_close(RuntimeOrigin::signed(SUDO), market_id,) - ); + assert_ok!(PredictionMarkets::schedule_early_close( + RuntimeOrigin::signed(CloseMarketEarlyOrigin::get()), + market_id + )); let now = >::block_number(); let new_end = now + ::CloseEarlyProtectionBlockPeriod::get(); @@ -162,9 +166,10 @@ fn sudo_schedule_early_close_at_timeframe_works() { assert_eq!(first.1.clone().into_inner(), vec![market_id]); assert!(market.early_close.is_none()); - assert_ok!( - PredictionMarkets::schedule_early_close(RuntimeOrigin::signed(SUDO), market_id,) - ); + assert_ok!(PredictionMarkets::schedule_early_close( + RuntimeOrigin::signed(CloseMarketEarlyOrigin::get()), + market_id + )); let now = >::now(); let new_end = now + ::CloseEarlyProtectionTimeFramePeriod::get(); diff --git a/zrml/prediction-markets/src/weights.rs b/zrml/prediction-markets/src/weights.rs index 0281b617e..347037171 100644 --- a/zrml/prediction-markets/src/weights.rs +++ b/zrml/prediction-markets/src/weights.rs @@ -19,13 +19,13 @@ //! Autogenerated weights for zrml_prediction_markets //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: `2024-01-15`, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: `2024-04-03`, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `zafoi`, CPU: `AMD Ryzen 9 5900X 12-Core Processor` -//! EXECUTION: `Some(Native)`, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024` +//! HOSTNAME: `zeitgeist-benchmark`, CPU: `AMD EPYC 7601 32-Core Processor` +//! EXECUTION: `Some(Wasm)`, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024` // Executed Command: -// ./target/release/zeitgeist +// ./target/production/zeitgeist // benchmark // pallet // --chain=dev @@ -33,7 +33,7 @@ // --repeat=20 // --pallet=zrml_prediction_markets // --extrinsic=* -// --execution=native +// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --template=./misc/weight_template.hbs @@ -90,23 +90,25 @@ pub trait WeightInfoZeitgeist { pub struct WeightInfo(PhantomData); impl WeightInfoZeitgeist for WeightInfo { /// Storage: MarketCommons Markets (r:1 w:1) - /// Proof: MarketCommons Markets (max_values: None, max_size: Some(678), added: 3153, mode: MaxEncodedLen) + /// Proof: MarketCommons Markets (max_values: None, max_size: Some(676), added: 3151, mode: MaxEncodedLen) /// Storage: PredictionMarkets MarketIdsPerCloseTimeFrame (r:1 w:1) /// Proof: PredictionMarkets MarketIdsPerCloseTimeFrame (max_values: None, max_size: Some(1050), added: 3525, mode: MaxEncodedLen) /// Storage: Timestamp Now (r:1 w:0) /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) /// The range of component `c` is `[0, 63]`. - fn admin_move_market_to_closed(_c: u32) -> Weight { + fn admin_move_market_to_closed(c: u32) -> Weight { // Proof Size summary in bytes: // Measured: `710 + c * (16 ±0)` - // Estimated: `7181` - // Minimum execution time: 46_460 nanoseconds. - Weight::from_parts(64_183_834, 7181) + // Estimated: `7179` + // Minimum execution time: 47_250 nanoseconds. + Weight::from_parts(63_849_475, 7179) + // Standard Error: 9_012 + .saturating_add(Weight::from_parts(10_759, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } /// Storage: MarketCommons Markets (r:1 w:1) - /// Proof: MarketCommons Markets (max_values: None, max_size: Some(678), added: 3153, mode: MaxEncodedLen) + /// Proof: MarketCommons Markets (max_values: None, max_size: Some(676), added: 3151, mode: MaxEncodedLen) /// Storage: PredictionMarkets MarketIdsPerReportBlock (r:1 w:1) /// Proof: PredictionMarkets MarketIdsPerReportBlock (max_values: None, max_size: Some(1042), added: 3517, mode: MaxEncodedLen) /// Storage: Balances Reserves (r:1 w:1) @@ -115,32 +117,42 @@ impl WeightInfoZeitgeist for WeightInfo { fn admin_move_market_to_resolved_scalar_reported(r: u32) -> Weight { // Proof Size summary in bytes: // Measured: `756 + r * (16 ±0)` - // Estimated: `10394` - // Minimum execution time: 83_360 nanoseconds. - Weight::from_parts(101_009_762, 10394) - // Standard Error: 30_301 - .saturating_add(Weight::from_parts(208_870, 0).saturating_mul(r.into())) + // Estimated: `10392` + // Minimum execution time: 83_631 nanoseconds. + Weight::from_parts(111_750_174, 10392) + // Standard Error: 16_010 + .saturating_add(Weight::from_parts(7_363, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } /// Storage: MarketCommons Markets (r:1 w:1) - /// Proof: MarketCommons Markets (max_values: None, max_size: Some(678), added: 3153, mode: MaxEncodedLen) + /// Proof: MarketCommons Markets (max_values: None, max_size: Some(676), added: 3151, mode: MaxEncodedLen) /// Storage: PredictionMarkets MarketIdsPerReportBlock (r:1 w:1) /// Proof: PredictionMarkets MarketIdsPerReportBlock (max_values: None, max_size: Some(1042), added: 3517, mode: MaxEncodedLen) /// Storage: Balances Reserves (r:1 w:1) /// Proof: Balances Reserves (max_values: None, max_size: Some(1249), added: 3724, mode: MaxEncodedLen) + /// Storage: AssetRouter DestroyAssets (r:1 w:1) + /// Proof: AssetRouter DestroyAssets (max_values: Some(1), max_size: Some(40962), added: 41457, mode: MaxEncodedLen) + /// Storage: Tokens TotalIssuance (r:63 w:0) + /// Proof: Tokens TotalIssuance (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) + /// Storage: MarketAssets Asset (r:63 w:63) + /// Proof: MarketAssets Asset (max_values: None, max_size: Some(225), added: 2700, mode: MaxEncodedLen) + /// Storage: AssetRouter IndestructibleAssets (r:1 w:0) + /// Proof: AssetRouter IndestructibleAssets (max_values: Some(1), max_size: Some(38914), added: 39409, mode: MaxEncodedLen) /// The range of component `r` is `[0, 63]`. - fn admin_move_market_to_resolved_categorical_reported(_r: u32) -> Weight { + fn admin_move_market_to_resolved_categorical_reported(r: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `712 + r * (16 ±0)` - // Estimated: `10394` - // Minimum execution time: 82_630 nanoseconds. - Weight::from_parts(102_975_254, 10394) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(3)) + // Measured: `17727 + r * (16 ±0)` + // Estimated: `419992` + // Minimum execution time: 996_774 nanoseconds. + Weight::from_parts(1_253_764_093, 419992) + // Standard Error: 164_323 + .saturating_add(Weight::from_parts(604_611, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(131)) + .saturating_add(T::DbWeight::get().writes(67)) } /// Storage: MarketCommons Markets (r:1 w:1) - /// Proof: MarketCommons Markets (max_values: None, max_size: Some(678), added: 3153, mode: MaxEncodedLen) + /// Proof: MarketCommons Markets (max_values: None, max_size: Some(676), added: 3151, mode: MaxEncodedLen) /// Storage: Authorized AuthorizedOutcomeReports (r:1 w:1) /// Proof: Authorized AuthorizedOutcomeReports (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen) /// Storage: PredictionMarkets MarketIdsPerDisputeBlock (r:1 w:1) @@ -152,17 +164,19 @@ impl WeightInfoZeitgeist for WeightInfo { /// Storage: System Account (r:1 w:1) /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) /// The range of component `r` is `[0, 63]`. - fn admin_move_market_to_resolved_scalar_disputed(_r: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `1282 + r * (16 ±0)` - // Estimated: `22120` - // Minimum execution time: 139_521 nanoseconds. - Weight::from_parts(172_661_579, 22120) + fn admin_move_market_to_resolved_scalar_disputed(r: u32) -> Weight { + // Proof Size summary in bytes: + // Measured: `1315 + r * (16 ±0)` + // Estimated: `22118` + // Minimum execution time: 139_421 nanoseconds. + Weight::from_parts(190_036_224, 22118) + // Standard Error: 19_184 + .saturating_add(Weight::from_parts(41_486, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(6)) } /// Storage: MarketCommons Markets (r:1 w:1) - /// Proof: MarketCommons Markets (max_values: None, max_size: Some(678), added: 3153, mode: MaxEncodedLen) + /// Proof: MarketCommons Markets (max_values: None, max_size: Some(676), added: 3151, mode: MaxEncodedLen) /// Storage: Authorized AuthorizedOutcomeReports (r:1 w:1) /// Proof: Authorized AuthorizedOutcomeReports (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen) /// Storage: PredictionMarkets MarketIdsPerDisputeBlock (r:1 w:1) @@ -173,71 +187,81 @@ impl WeightInfoZeitgeist for WeightInfo { /// Proof: GlobalDisputes GlobalDisputesInfo (max_values: None, max_size: Some(396), added: 2871, mode: MaxEncodedLen) /// Storage: System Account (r:1 w:1) /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) + /// Storage: AssetRouter DestroyAssets (r:1 w:1) + /// Proof: AssetRouter DestroyAssets (max_values: Some(1), max_size: Some(40962), added: 41457, mode: MaxEncodedLen) + /// Storage: Tokens TotalIssuance (r:63 w:0) + /// Proof: Tokens TotalIssuance (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) + /// Storage: MarketAssets Asset (r:63 w:63) + /// Proof: MarketAssets Asset (max_values: None, max_size: Some(225), added: 2700, mode: MaxEncodedLen) + /// Storage: AssetRouter IndestructibleAssets (r:1 w:0) + /// Proof: AssetRouter IndestructibleAssets (max_values: Some(1), max_size: Some(38914), added: 39409, mode: MaxEncodedLen) /// The range of component `r` is `[0, 63]`. - fn admin_move_market_to_resolved_categorical_disputed(_r: u32) -> Weight { + fn admin_move_market_to_resolved_categorical_disputed(r: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `1223 + r * (16 ±0)` - // Estimated: `22120` - // Minimum execution time: 138_250 nanoseconds. - Weight::from_parts(195_683_366, 22120) - .saturating_add(T::DbWeight::get().reads(7)) - .saturating_add(T::DbWeight::get().writes(6)) + // Measured: `18271 + r * (16 ±0)` + // Estimated: `431718` + // Minimum execution time: 1_052_053 nanoseconds. + Weight::from_parts(1_313_394_041, 431718) + // Standard Error: 188_704 + .saturating_add(Weight::from_parts(948_538, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(135)) + .saturating_add(T::DbWeight::get().writes(70)) } /// Storage: MarketCommons Markets (r:1 w:1) - /// Proof: MarketCommons Markets (max_values: None, max_size: Some(678), added: 3153, mode: MaxEncodedLen) + /// Proof: MarketCommons Markets (max_values: None, max_size: Some(676), added: 3151, mode: MaxEncodedLen) /// Storage: PredictionMarkets MarketIdsForEdit (r:1 w:0) /// Proof: PredictionMarkets MarketIdsForEdit (max_values: None, max_size: Some(1050), added: 3525, mode: MaxEncodedLen) + /// Storage: MarketAssets Asset (r:64 w:64) + /// Proof: MarketAssets Asset (max_values: None, max_size: Some(225), added: 2700, mode: MaxEncodedLen) /// Storage: Balances Reserves (r:1 w:1) /// Proof: Balances Reserves (max_values: None, max_size: Some(1249), added: 3724, mode: MaxEncodedLen) fn approve_market() -> Weight { // Proof Size summary in bytes: - // Measured: `580` - // Estimated: `10402` - // Minimum execution time: 53_530 nanoseconds. - Weight::from_parts(64_901_000, 10402) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(2)) + // Measured: `656` + // Estimated: `183200` + // Minimum execution time: 679_353 nanoseconds. + Weight::from_parts(823_633_000, 183200) + .saturating_add(T::DbWeight::get().reads(67)) + .saturating_add(T::DbWeight::get().writes(66)) } /// Storage: MarketCommons Markets (r:1 w:0) - /// Proof: MarketCommons Markets (max_values: None, max_size: Some(678), added: 3153, mode: MaxEncodedLen) + /// Proof: MarketCommons Markets (max_values: None, max_size: Some(676), added: 3151, mode: MaxEncodedLen) /// Storage: PredictionMarkets MarketIdsForEdit (r:1 w:1) /// Proof: PredictionMarkets MarketIdsForEdit (max_values: None, max_size: Some(1050), added: 3525, mode: MaxEncodedLen) /// The range of component `r` is `[0, 1024]`. fn request_edit(r: u32) -> Weight { // Proof Size summary in bytes: // Measured: `519` - // Estimated: `6678` - // Minimum execution time: 26_100 nanoseconds. - Weight::from_parts(32_383_275, 6678) - // Standard Error: 190 - .saturating_add(Weight::from_parts(4_809, 0).saturating_mul(r.into())) + // Estimated: `6676` + // Minimum execution time: 27_010 nanoseconds. + Weight::from_parts(36_741_877, 6676) + // Standard Error: 165 + .saturating_add(Weight::from_parts(2_868, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: MarketCommons Markets (r:1 w:0) - /// Proof: MarketCommons Markets (max_values: None, max_size: Some(678), added: 3153, mode: MaxEncodedLen) + /// Proof: MarketCommons Markets (max_values: None, max_size: Some(676), added: 3151, mode: MaxEncodedLen) /// Storage: System Account (r:1 w:1) /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) - /// Storage: MarketAssets Asset (r:64 w:0) + /// Storage: MarketAssets Asset (r:64 w:64) /// Proof: MarketAssets Asset (max_values: None, max_size: Some(225), added: 2700, mode: MaxEncodedLen) - /// Storage: Tokens Accounts (r:64 w:64) - /// Proof: Tokens Accounts (max_values: None, max_size: Some(123), added: 2598, mode: MaxEncodedLen) - /// Storage: Tokens TotalIssuance (r:64 w:64) - /// Proof: Tokens TotalIssuance (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) + /// Storage: MarketAssets Account (r:64 w:64) + /// Proof: MarketAssets Account (max_values: None, max_size: Some(117), added: 2592, mode: MaxEncodedLen) /// The range of component `a` is `[2, 64]`. fn buy_complete_set(a: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `554` - // Estimated: `5760 + a * (5116 ±0)` - // Minimum execution time: 110_781 nanoseconds. - Weight::from_parts(95_160_144, 5760) - // Standard Error: 200_254 - .saturating_add(Weight::from_parts(22_776_250, 0).saturating_mul(a.into())) + // Measured: `579 + a * (265 ±0)` + // Estimated: `5758 + a * (5292 ±0)` + // Minimum execution time: 118_580 nanoseconds. + Weight::from_parts(100_857_699, 5758) + // Standard Error: 149_885 + .saturating_add(Weight::from_parts(26_242_412, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(a.into()))) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(a.into()))) - .saturating_add(Weight::from_parts(0, 5116).saturating_mul(a.into())) + .saturating_add(Weight::from_parts(0, 5292).saturating_mul(a.into())) } /// Storage: Timestamp Now (r:1 w:0) /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) @@ -245,48 +269,50 @@ impl WeightInfoZeitgeist for WeightInfo { /// Proof: Balances Reserves (max_values: None, max_size: Some(1249), added: 3724, mode: MaxEncodedLen) /// Storage: MarketCommons MarketCounter (r:1 w:1) /// Proof: MarketCommons MarketCounter (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) + /// Storage: MarketAssets Asset (r:64 w:64) + /// Proof: MarketAssets Asset (max_values: None, max_size: Some(225), added: 2700, mode: MaxEncodedLen) /// Storage: PredictionMarkets MarketIdsPerCloseTimeFrame (r:1 w:1) /// Proof: PredictionMarkets MarketIdsPerCloseTimeFrame (max_values: None, max_size: Some(1050), added: 3525, mode: MaxEncodedLen) /// Storage: MarketCommons Markets (r:0 w:1) - /// Proof: MarketCommons Markets (max_values: None, max_size: Some(678), added: 3153, mode: MaxEncodedLen) + /// Proof: MarketCommons Markets (max_values: None, max_size: Some(676), added: 3151, mode: MaxEncodedLen) /// The range of component `m` is `[0, 63]`. - fn create_market(m: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `155 + m * (17 ±0)` - // Estimated: `8263` - // Minimum execution time: 55_550 nanoseconds. - Weight::from_parts(74_259_340, 8263) - // Standard Error: 7_534 - .saturating_add(Weight::from_parts(63_015, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(4)) + fn create_market(_m: u32) -> Weight { + // Proof Size summary in bytes: + // Measured: `316 + m * (16 ±0)` + // Estimated: `181063` + // Minimum execution time: 576_702 nanoseconds. + Weight::from_parts(777_228_969, 181063) + .saturating_add(T::DbWeight::get().reads(68)) + .saturating_add(T::DbWeight::get().writes(68)) } /// Storage: PredictionMarkets MarketIdsForEdit (r:1 w:1) /// Proof: PredictionMarkets MarketIdsForEdit (max_values: None, max_size: Some(1050), added: 3525, mode: MaxEncodedLen) /// Storage: MarketCommons Markets (r:1 w:1) - /// Proof: MarketCommons Markets (max_values: None, max_size: Some(678), added: 3153, mode: MaxEncodedLen) + /// Proof: MarketCommons Markets (max_values: None, max_size: Some(676), added: 3151, mode: MaxEncodedLen) /// Storage: PredictionMarkets MarketIdsPerCloseTimeFrame (r:1 w:1) /// Proof: PredictionMarkets MarketIdsPerCloseTimeFrame (max_values: None, max_size: Some(1050), added: 3525, mode: MaxEncodedLen) /// Storage: Timestamp Now (r:1 w:0) /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) /// The range of component `m` is `[0, 63]`. - fn edit_market(_m: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `700 + m * (16 ±0)` - // Estimated: `10706` - // Minimum execution time: 53_490 nanoseconds. - Weight::from_parts(75_146_182, 10706) + fn edit_market(m: u32) -> Weight { + // Proof Size summary in bytes: + // Measured: `735 + m * (16 ±0)` + // Estimated: `10704` + // Minimum execution time: 52_190 nanoseconds. + Weight::from_parts(72_438_596, 10704) + // Standard Error: 6_888 + .saturating_add(Weight::from_parts(33_164, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } /// Storage: MarketCommons Markets (r:1 w:0) - /// Proof: MarketCommons Markets (max_values: None, max_size: Some(678), added: 3153, mode: MaxEncodedLen) + /// Proof: MarketCommons Markets (max_values: None, max_size: Some(676), added: 3151, mode: MaxEncodedLen) /// Storage: GlobalDisputes GlobalDisputesInfo (r:1 w:1) /// Proof: GlobalDisputes GlobalDisputesInfo (max_values: None, max_size: Some(396), added: 2871, mode: MaxEncodedLen) /// Storage: Court MarketIdToCourtId (r:1 w:0) /// Proof: Court MarketIdToCourtId (max_values: None, max_size: Some(40), added: 2515, mode: MaxEncodedLen) /// Storage: Court CourtPool (r:1 w:0) - /// Proof: Court CourtPool (max_values: Some(1), max_size: Some(72002), added: 72497, mode: MaxEncodedLen) + /// Proof: Court CourtPool (max_values: Some(1), max_size: Some(96002), added: 96497, mode: MaxEncodedLen) /// Storage: Court Courts (r:1 w:1) /// Proof: Court Courts (max_values: None, max_size: Some(349), added: 2824, mode: MaxEncodedLen) /// Storage: Court CourtIdToMarketId (r:1 w:0) @@ -303,32 +329,32 @@ impl WeightInfoZeitgeist for WeightInfo { /// The range of component `n` is `[1, 64]`. fn start_global_dispute(m: u32, n: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `9158 + m * (16 ±0)` - // Estimated: `329717` - // Minimum execution time: 325_801 nanoseconds. - Weight::from_parts(403_175_654, 329717) - // Standard Error: 66_094 - .saturating_add(Weight::from_parts(104_261, 0).saturating_mul(m.into())) - // Standard Error: 66_094 - .saturating_add(Weight::from_parts(153_430, 0).saturating_mul(n.into())) + // Measured: `9968 + m * (16 ±0)` + // Estimated: `353715` + // Minimum execution time: 327_541 nanoseconds. + Weight::from_parts(404_778_118, 353715) + // Standard Error: 47_222 + .saturating_add(Weight::from_parts(110_944, 0).saturating_mul(m.into())) + // Standard Error: 47_222 + .saturating_add(Weight::from_parts(219_329, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(40)) .saturating_add(T::DbWeight::get().writes(36)) } /// Storage: MarketCommons Markets (r:1 w:1) - /// Proof: MarketCommons Markets (max_values: None, max_size: Some(678), added: 3153, mode: MaxEncodedLen) + /// Proof: MarketCommons Markets (max_values: None, max_size: Some(676), added: 3151, mode: MaxEncodedLen) /// Storage: Balances Reserves (r:1 w:1) /// Proof: Balances Reserves (max_values: None, max_size: Some(1249), added: 3724, mode: MaxEncodedLen) fn dispute_authorized() -> Weight { // Proof Size summary in bytes: // Measured: `626` - // Estimated: `6877` - // Minimum execution time: 59_780 nanoseconds. - Weight::from_parts(60_860_000, 6877) + // Estimated: `6875` + // Minimum execution time: 59_450 nanoseconds. + Weight::from_parts(60_560_000, 6875) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } /// Storage: MarketCommons Markets (r:1 w:1) - /// Proof: MarketCommons Markets (max_values: None, max_size: Some(678), added: 3153, mode: MaxEncodedLen) + /// Proof: MarketCommons Markets (max_values: None, max_size: Some(676), added: 3151, mode: MaxEncodedLen) /// Storage: Balances Reserves (r:1 w:1) /// Proof: Balances Reserves (max_values: None, max_size: Some(1249), added: 3724, mode: MaxEncodedLen) /// Storage: PredictionMarkets MarketIdsForEdit (r:0 w:1) @@ -336,57 +362,73 @@ impl WeightInfoZeitgeist for WeightInfo { fn handle_expired_advised_market() -> Weight { // Proof Size summary in bytes: // Measured: `539` - // Estimated: `6877` - // Minimum execution time: 66_010 nanoseconds. - Weight::from_parts(80_071_000, 6877) + // Estimated: `6875` + // Minimum execution time: 77_200 nanoseconds. + Weight::from_parts(78_441_000, 6875) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(3)) } /// Storage: MarketCommons Markets (r:1 w:1) - /// Proof: MarketCommons Markets (max_values: None, max_size: Some(678), added: 3153, mode: MaxEncodedLen) + /// Proof: MarketCommons Markets (max_values: None, max_size: Some(676), added: 3151, mode: MaxEncodedLen) /// Storage: Balances Reserves (r:1 w:1) /// Proof: Balances Reserves (max_values: None, max_size: Some(1249), added: 3724, mode: MaxEncodedLen) + /// Storage: AssetRouter DestroyAssets (r:1 w:1) + /// Proof: AssetRouter DestroyAssets (max_values: Some(1), max_size: Some(40962), added: 41457, mode: MaxEncodedLen) + /// Storage: Tokens TotalIssuance (r:63 w:0) + /// Proof: Tokens TotalIssuance (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) + /// Storage: MarketAssets Asset (r:63 w:63) + /// Proof: MarketAssets Asset (max_values: None, max_size: Some(225), added: 2700, mode: MaxEncodedLen) + /// Storage: AssetRouter IndestructibleAssets (r:1 w:0) + /// Proof: AssetRouter IndestructibleAssets (max_values: Some(1), max_size: Some(38914), added: 39409, mode: MaxEncodedLen) fn internal_resolve_categorical_reported() -> Weight { // Proof Size summary in bytes: - // Measured: `582` - // Estimated: `6877` - // Minimum execution time: 64_000 nanoseconds. - Weight::from_parts(78_640_000, 6877) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) + // Measured: `17597` + // Estimated: `416475` + // Minimum execution time: 1_134_744 nanoseconds. + Weight::from_parts(1_181_404_000, 416475) + .saturating_add(T::DbWeight::get().reads(130)) + .saturating_add(T::DbWeight::get().writes(66)) } /// Storage: MarketCommons Markets (r:1 w:1) - /// Proof: MarketCommons Markets (max_values: None, max_size: Some(678), added: 3153, mode: MaxEncodedLen) + /// Proof: MarketCommons Markets (max_values: None, max_size: Some(676), added: 3151, mode: MaxEncodedLen) /// Storage: Balances Reserves (r:1 w:1) /// Proof: Balances Reserves (max_values: None, max_size: Some(1249), added: 3724, mode: MaxEncodedLen) /// Storage: GlobalDisputes GlobalDisputesInfo (r:1 w:0) /// Proof: GlobalDisputes GlobalDisputesInfo (max_values: None, max_size: Some(396), added: 2871, mode: MaxEncodedLen) /// Storage: Authorized AuthorizedOutcomeReports (r:1 w:1) /// Proof: Authorized AuthorizedOutcomeReports (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen) + /// Storage: AssetRouter DestroyAssets (r:1 w:1) + /// Proof: AssetRouter DestroyAssets (max_values: Some(1), max_size: Some(40962), added: 41457, mode: MaxEncodedLen) + /// Storage: Tokens TotalIssuance (r:63 w:0) + /// Proof: Tokens TotalIssuance (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) + /// Storage: MarketAssets Asset (r:63 w:63) + /// Proof: MarketAssets Asset (max_values: None, max_size: Some(225), added: 2700, mode: MaxEncodedLen) + /// Storage: AssetRouter IndestructibleAssets (r:1 w:0) + /// Proof: AssetRouter IndestructibleAssets (max_values: Some(1), max_size: Some(38914), added: 39409, mode: MaxEncodedLen) fn internal_resolve_categorical_disputed() -> Weight { // Proof Size summary in bytes: - // Measured: `837` - // Estimated: `12272` - // Minimum execution time: 123_140 nanoseconds. - Weight::from_parts(139_681_000, 12272) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(3)) + // Measured: `17885` + // Estimated: `421870` + // Minimum execution time: 1_201_865 nanoseconds. + Weight::from_parts(1_235_994_000, 421870) + .saturating_add(T::DbWeight::get().reads(132)) + .saturating_add(T::DbWeight::get().writes(67)) } /// Storage: MarketCommons Markets (r:1 w:1) - /// Proof: MarketCommons Markets (max_values: None, max_size: Some(678), added: 3153, mode: MaxEncodedLen) + /// Proof: MarketCommons Markets (max_values: None, max_size: Some(676), added: 3151, mode: MaxEncodedLen) /// Storage: Balances Reserves (r:1 w:1) /// Proof: Balances Reserves (max_values: None, max_size: Some(1249), added: 3724, mode: MaxEncodedLen) fn internal_resolve_scalar_reported() -> Weight { // Proof Size summary in bytes: // Measured: `626` - // Estimated: `6877` - // Minimum execution time: 58_300 nanoseconds. - Weight::from_parts(71_201_000, 6877) + // Estimated: `6875` + // Minimum execution time: 72_421 nanoseconds. + Weight::from_parts(82_500_000, 6875) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } /// Storage: MarketCommons Markets (r:1 w:1) - /// Proof: MarketCommons Markets (max_values: None, max_size: Some(678), added: 3153, mode: MaxEncodedLen) + /// Proof: MarketCommons Markets (max_values: None, max_size: Some(676), added: 3151, mode: MaxEncodedLen) /// Storage: Balances Reserves (r:1 w:1) /// Proof: Balances Reserves (max_values: None, max_size: Some(1249), added: 3724, mode: MaxEncodedLen) /// Storage: GlobalDisputes GlobalDisputesInfo (r:1 w:0) @@ -395,10 +437,10 @@ impl WeightInfoZeitgeist for WeightInfo { /// Proof: Authorized AuthorizedOutcomeReports (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen) fn internal_resolve_scalar_disputed() -> Weight { // Proof Size summary in bytes: - // Measured: `896` - // Estimated: `12272` - // Minimum execution time: 103_430 nanoseconds. - Weight::from_parts(125_710_000, 12272) + // Measured: `929` + // Estimated: `12270` + // Minimum execution time: 142_191 nanoseconds. + Weight::from_parts(144_871_000, 12270) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -418,51 +460,59 @@ impl WeightInfoZeitgeist for WeightInfo { // Proof Size summary in bytes: // Measured: `79` // Estimated: `15090` - // Minimum execution time: 24_590 nanoseconds. - Weight::from_parts(30_770_000, 15090) + // Minimum execution time: 33_970 nanoseconds. + Weight::from_parts(34_581_000, 15090) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(5)) } /// Storage: MarketCommons Markets (r:1 w:0) - /// Proof: MarketCommons Markets (max_values: None, max_size: Some(678), added: 3153, mode: MaxEncodedLen) - /// Storage: MarketAssets Asset (r:1 w:0) + /// Proof: MarketCommons Markets (max_values: None, max_size: Some(676), added: 3151, mode: MaxEncodedLen) + /// Storage: MarketAssets Asset (r:1 w:1) /// Proof: MarketAssets Asset (max_values: None, max_size: Some(225), added: 2700, mode: MaxEncodedLen) - /// Storage: Tokens Accounts (r:1 w:1) - /// Proof: Tokens Accounts (max_values: None, max_size: Some(123), added: 2598, mode: MaxEncodedLen) + /// Storage: MarketAssets Account (r:1 w:1) + /// Proof: MarketAssets Account (max_values: None, max_size: Some(117), added: 2592, mode: MaxEncodedLen) /// Storage: System Account (r:1 w:1) /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) - /// Storage: Tokens TotalIssuance (r:1 w:1) + /// Storage: AssetRouter DestroyAssets (r:1 w:1) + /// Proof: AssetRouter DestroyAssets (max_values: Some(1), max_size: Some(40962), added: 41457, mode: MaxEncodedLen) + /// Storage: Tokens TotalIssuance (r:1 w:0) /// Proof: Tokens TotalIssuance (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) + /// Storage: AssetRouter IndestructibleAssets (r:1 w:0) + /// Proof: AssetRouter IndestructibleAssets (max_values: Some(1), max_size: Some(38914), added: 39409, mode: MaxEncodedLen) fn redeem_shares_categorical() -> Weight { // Proof Size summary in bytes: - // Measured: `2062` - // Estimated: `10876` - // Minimum execution time: 123_791 nanoseconds. - Weight::from_parts(144_701_000, 10876) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(3)) + // Measured: `3894` + // Estimated: `94434` + // Minimum execution time: 185_791 nanoseconds. + Weight::from_parts(214_441_000, 94434) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(4)) } /// Storage: MarketCommons Markets (r:1 w:0) - /// Proof: MarketCommons Markets (max_values: None, max_size: Some(678), added: 3153, mode: MaxEncodedLen) - /// Storage: MarketAssets Asset (r:2 w:0) + /// Proof: MarketCommons Markets (max_values: None, max_size: Some(676), added: 3151, mode: MaxEncodedLen) + /// Storage: MarketAssets Asset (r:2 w:2) /// Proof: MarketAssets Asset (max_values: None, max_size: Some(225), added: 2700, mode: MaxEncodedLen) - /// Storage: Tokens Accounts (r:2 w:2) - /// Proof: Tokens Accounts (max_values: None, max_size: Some(123), added: 2598, mode: MaxEncodedLen) + /// Storage: MarketAssets Account (r:2 w:2) + /// Proof: MarketAssets Account (max_values: None, max_size: Some(117), added: 2592, mode: MaxEncodedLen) /// Storage: System Account (r:1 w:1) /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) - /// Storage: Tokens TotalIssuance (r:2 w:2) + /// Storage: AssetRouter DestroyAssets (r:1 w:1) + /// Proof: AssetRouter DestroyAssets (max_values: Some(1), max_size: Some(40962), added: 41457, mode: MaxEncodedLen) + /// Storage: Tokens TotalIssuance (r:2 w:0) /// Proof: Tokens TotalIssuance (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) + /// Storage: AssetRouter IndestructibleAssets (r:1 w:0) + /// Proof: AssetRouter IndestructibleAssets (max_values: Some(1), max_size: Some(38914), added: 39409, mode: MaxEncodedLen) fn redeem_shares_scalar() -> Weight { // Proof Size summary in bytes: - // Measured: `1209` - // Estimated: `15992` - // Minimum execution time: 120_670 nanoseconds. - Weight::from_parts(186_740_000, 15992) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(5)) + // Measured: `1734` + // Estimated: `102244` + // Minimum execution time: 245_571 nanoseconds. + Weight::from_parts(250_341_000, 102244) + .saturating_add(T::DbWeight::get().reads(10)) + .saturating_add(T::DbWeight::get().writes(6)) } /// Storage: MarketCommons Markets (r:1 w:1) - /// Proof: MarketCommons Markets (max_values: None, max_size: Some(678), added: 3153, mode: MaxEncodedLen) + /// Proof: MarketCommons Markets (max_values: None, max_size: Some(676), added: 3151, mode: MaxEncodedLen) /// Storage: PredictionMarkets MarketIdsPerCloseTimeFrame (r:1 w:1) /// Proof: PredictionMarkets MarketIdsPerCloseTimeFrame (max_values: None, max_size: Some(1050), added: 3525, mode: MaxEncodedLen) /// Storage: Balances Reserves (r:1 w:1) @@ -471,21 +521,19 @@ impl WeightInfoZeitgeist for WeightInfo { /// Proof: PredictionMarkets MarketIdsForEdit (max_values: None, max_size: Some(1050), added: 3525, mode: MaxEncodedLen) /// The range of component `c` is `[0, 63]`. /// The range of component `r` is `[0, 1024]`. - fn reject_market(c: u32, r: u32) -> Weight { + fn reject_market(_c: u32, r: u32) -> Weight { // Proof Size summary in bytes: // Measured: `643 + c * (16 ±0)` - // Estimated: `10402` - // Minimum execution time: 89_320 nanoseconds. - Weight::from_parts(101_732_045, 10402) - // Standard Error: 10_471 - .saturating_add(Weight::from_parts(137_908, 0).saturating_mul(c.into())) - // Standard Error: 648 - .saturating_add(Weight::from_parts(8_275, 0).saturating_mul(r.into())) + // Estimated: `10400` + // Minimum execution time: 88_151 nanoseconds. + Weight::from_parts(118_972_881, 10400) + // Standard Error: 602 + .saturating_add(Weight::from_parts(1_996, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(4)) } /// Storage: MarketCommons Markets (r:1 w:1) - /// Proof: MarketCommons Markets (max_values: None, max_size: Some(678), added: 3153, mode: MaxEncodedLen) + /// Proof: MarketCommons Markets (max_values: None, max_size: Some(676), added: 3151, mode: MaxEncodedLen) /// Storage: Timestamp Now (r:1 w:0) /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) /// Storage: PredictionMarkets MarketIdsPerReportBlock (r:1 w:1) @@ -494,54 +542,60 @@ impl WeightInfoZeitgeist for WeightInfo { fn report_market_with_dispute_mechanism(_m: u32) -> Weight { // Proof Size summary in bytes: // Measured: `716` - // Estimated: `7173` - // Minimum execution time: 43_530 nanoseconds. - Weight::from_parts(62_963_271, 7173) + // Estimated: `7171` + // Minimum execution time: 44_540 nanoseconds. + Weight::from_parts(60_937_854, 7171) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } /// Storage: MarketCommons Markets (r:1 w:1) - /// Proof: MarketCommons Markets (max_values: None, max_size: Some(678), added: 3153, mode: MaxEncodedLen) + /// Proof: MarketCommons Markets (max_values: None, max_size: Some(676), added: 3151, mode: MaxEncodedLen) /// Storage: Balances Reserves (r:1 w:1) /// Proof: Balances Reserves (max_values: None, max_size: Some(1249), added: 3724, mode: MaxEncodedLen) + /// Storage: AssetRouter DestroyAssets (r:1 w:1) + /// Proof: AssetRouter DestroyAssets (max_values: Some(1), max_size: Some(40962), added: 41457, mode: MaxEncodedLen) + /// Storage: Tokens TotalIssuance (r:2 w:0) + /// Proof: Tokens TotalIssuance (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) + /// Storage: MarketAssets Asset (r:2 w:2) + /// Proof: MarketAssets Asset (max_values: None, max_size: Some(225), added: 2700, mode: MaxEncodedLen) + /// Storage: AssetRouter IndestructibleAssets (r:1 w:0) + /// Proof: AssetRouter IndestructibleAssets (max_values: Some(1), max_size: Some(38914), added: 39409, mode: MaxEncodedLen) fn report_trusted_market() -> Weight { // Proof Size summary in bytes: - // Measured: `538` - // Estimated: `6877` - // Minimum execution time: 96_401 nanoseconds. - Weight::from_parts(97_750_000, 6877) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) + // Measured: `1353` + // Estimated: `98177` + // Minimum execution time: 146_371 nanoseconds. + Weight::from_parts(181_000_000, 98177) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes(5)) } /// Storage: MarketCommons Markets (r:1 w:0) - /// Proof: MarketCommons Markets (max_values: None, max_size: Some(678), added: 3153, mode: MaxEncodedLen) + /// Proof: MarketCommons Markets (max_values: None, max_size: Some(676), added: 3151, mode: MaxEncodedLen) /// Storage: System Account (r:1 w:1) /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) - /// Storage: MarketAssets Asset (r:64 w:0) + /// Storage: MarketAssets Asset (r:64 w:64) /// Proof: MarketAssets Asset (max_values: None, max_size: Some(225), added: 2700, mode: MaxEncodedLen) - /// Storage: Tokens Accounts (r:64 w:64) - /// Proof: Tokens Accounts (max_values: None, max_size: Some(123), added: 2598, mode: MaxEncodedLen) - /// Storage: Tokens TotalIssuance (r:64 w:64) - /// Proof: Tokens TotalIssuance (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) + /// Storage: MarketAssets Account (r:64 w:64) + /// Proof: MarketAssets Account (max_values: None, max_size: Some(117), added: 2592, mode: MaxEncodedLen) /// The range of component `a` is `[2, 64]`. fn sell_complete_set(a: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `793 + a * (161 ±0)` - // Estimated: `5760 + a * (5116 ±0)` - // Minimum execution time: 114_750 nanoseconds. - Weight::from_parts(73_429_594, 5760) - // Standard Error: 110_546 - .saturating_add(Weight::from_parts(32_544_002, 0).saturating_mul(a.into())) + // Measured: `740 + a * (373 ±0)` + // Estimated: `5758 + a * (5292 ±0)` + // Minimum execution time: 133_330 nanoseconds. + Weight::from_parts(100_646_347, 5758) + // Standard Error: 167_067 + .saturating_add(Weight::from_parts(43_468_521, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(a.into()))) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(a.into()))) - .saturating_add(Weight::from_parts(0, 5116).saturating_mul(a.into())) + .saturating_add(Weight::from_parts(0, 5292).saturating_mul(a.into())) } /// Storage: PredictionMarkets MarketIdsPerCloseBlock (r:1 w:1) /// Proof: PredictionMarkets MarketIdsPerCloseBlock (max_values: None, max_size: Some(1050), added: 3525, mode: MaxEncodedLen) /// Storage: MarketCommons Markets (r:62 w:0) - /// Proof: MarketCommons Markets (max_values: None, max_size: Some(678), added: 3153, mode: MaxEncodedLen) + /// Proof: MarketCommons Markets (max_values: None, max_size: Some(676), added: 3151, mode: MaxEncodedLen) /// Storage: PredictionMarkets MarketIdsPerCloseTimeFrame (r:1 w:1) /// Proof: PredictionMarkets MarketIdsPerCloseTimeFrame (max_values: None, max_size: Some(1050), added: 3525, mode: MaxEncodedLen) /// The range of component `b` is `[1, 31]`. @@ -549,24 +603,24 @@ impl WeightInfoZeitgeist for WeightInfo { fn market_status_manager(b: u32, f: u32) -> Weight { // Proof Size summary in bytes: // Measured: `2539 + b * (329 ±0) + f * (331 ±0)` - // Estimated: `7050 + b * (3153 ±0) + f * (3153 ±0)` - // Minimum execution time: 174_211 nanoseconds. - Weight::from_parts(67_095_551, 7050) - // Standard Error: 63_801 - .saturating_add(Weight::from_parts(4_617_980, 0).saturating_mul(b.into())) - // Standard Error: 63_801 - .saturating_add(Weight::from_parts(4_855_146, 0).saturating_mul(f.into())) + // Estimated: `7050 + b * (3151 ±0) + f * (3151 ±0)` + // Minimum execution time: 210_711 nanoseconds. + Weight::from_parts(102_221_855, 7050) + // Standard Error: 79_794 + .saturating_add(Weight::from_parts(5_103_531, 0).saturating_mul(b.into())) + // Standard Error: 79_794 + .saturating_add(Weight::from_parts(5_234_515, 0).saturating_mul(f.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(b.into()))) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(f.into()))) .saturating_add(T::DbWeight::get().writes(2)) - .saturating_add(Weight::from_parts(0, 3153).saturating_mul(b.into())) - .saturating_add(Weight::from_parts(0, 3153).saturating_mul(f.into())) + .saturating_add(Weight::from_parts(0, 3151).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(0, 3151).saturating_mul(f.into())) } /// Storage: PredictionMarkets MarketIdsPerReportBlock (r:1 w:1) /// Proof: PredictionMarkets MarketIdsPerReportBlock (max_values: None, max_size: Some(1042), added: 3517, mode: MaxEncodedLen) /// Storage: MarketCommons Markets (r:62 w:0) - /// Proof: MarketCommons Markets (max_values: None, max_size: Some(678), added: 3153, mode: MaxEncodedLen) + /// Proof: MarketCommons Markets (max_values: None, max_size: Some(676), added: 3151, mode: MaxEncodedLen) /// Storage: PredictionMarkets MarketIdsPerDisputeBlock (r:1 w:1) /// Proof: PredictionMarkets MarketIdsPerDisputeBlock (max_values: None, max_size: Some(1042), added: 3517, mode: MaxEncodedLen) /// The range of component `r` is `[1, 31]`. @@ -574,43 +628,39 @@ impl WeightInfoZeitgeist for WeightInfo { fn market_resolution_manager(r: u32, d: u32) -> Weight { // Proof Size summary in bytes: // Measured: `2483 + r * (329 ±0) + d * (331 ±0)` - // Estimated: `7034 + r * (3153 ±0) + d * (3153 ±0)` - // Minimum execution time: 169_091 nanoseconds. - Weight::from_parts(56_570_719, 7034) - // Standard Error: 89_416 - .saturating_add(Weight::from_parts(4_792_326, 0).saturating_mul(r.into())) - // Standard Error: 89_416 - .saturating_add(Weight::from_parts(4_925_168, 0).saturating_mul(d.into())) + // Estimated: `7034 + r * (3151 ±0) + d * (3151 ±0)` + // Minimum execution time: 209_690 nanoseconds. + Weight::from_parts(102_910_714, 7034) + // Standard Error: 72_408 + .saturating_add(Weight::from_parts(4_899_994, 0).saturating_mul(r.into())) + // Standard Error: 72_408 + .saturating_add(Weight::from_parts(5_244_218, 0).saturating_mul(d.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().reads((1_u64).saturating_mul(d.into()))) .saturating_add(T::DbWeight::get().writes(2)) - .saturating_add(Weight::from_parts(0, 3153).saturating_mul(r.into())) - .saturating_add(Weight::from_parts(0, 3153).saturating_mul(d.into())) + .saturating_add(Weight::from_parts(0, 3151).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(0, 3151).saturating_mul(d.into())) } /// Storage: MarketCommons Markets (r:1 w:1) - /// Proof: MarketCommons Markets (max_values: None, max_size: Some(678), added: 3153, mode: MaxEncodedLen) + /// Proof: MarketCommons Markets (max_values: None, max_size: Some(676), added: 3151, mode: MaxEncodedLen) /// Storage: Timestamp Now (r:1 w:0) /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) /// Storage: PredictionMarkets MarketIdsPerCloseTimeFrame (r:2 w:2) /// Proof: PredictionMarkets MarketIdsPerCloseTimeFrame (max_values: None, max_size: Some(1050), added: 3525, mode: MaxEncodedLen) /// The range of component `o` is `[0, 63]`. /// The range of component `n` is `[0, 63]`. - fn schedule_early_close_as_authority(o: u32, n: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `675 + o * (16 ±0)` - // Estimated: `10706` - // Minimum execution time: 51_230 nanoseconds. - Weight::from_parts(61_363_456, 10706) - // Standard Error: 13_970 - .saturating_add(Weight::from_parts(50_244, 0).saturating_mul(o.into())) - // Standard Error: 13_970 - .saturating_add(Weight::from_parts(62_184, 0).saturating_mul(n.into())) + fn schedule_early_close_as_authority(_o: u32, _n: u32) -> Weight { + // Proof Size summary in bytes: + // Measured: `747 + o * (16 ±0)` + // Estimated: `10704` + // Minimum execution time: 55_601 nanoseconds. + Weight::from_parts(76_590_619, 10704) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } /// Storage: MarketCommons Markets (r:1 w:1) - /// Proof: MarketCommons Markets (max_values: None, max_size: Some(678), added: 3153, mode: MaxEncodedLen) + /// Proof: MarketCommons Markets (max_values: None, max_size: Some(676), added: 3151, mode: MaxEncodedLen) /// Storage: Timestamp Now (r:1 w:0) /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) /// Storage: Balances Reserves (r:1 w:1) @@ -621,19 +671,19 @@ impl WeightInfoZeitgeist for WeightInfo { /// The range of component `n` is `[0, 63]`. fn schedule_early_close_after_dispute(o: u32, n: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `901 + o * (16 ±0)` - // Estimated: `14430` - // Minimum execution time: 96_271 nanoseconds. - Weight::from_parts(119_475_237, 14430) - // Standard Error: 22_292 - .saturating_add(Weight::from_parts(90_541, 0).saturating_mul(o.into())) - // Standard Error: 22_292 - .saturating_add(Weight::from_parts(12_780, 0).saturating_mul(n.into())) + // Measured: `970 + o * (16 ±0)` + // Estimated: `14428` + // Minimum execution time: 98_981 nanoseconds. + Weight::from_parts(126_721_146, 14428) + // Standard Error: 13_607 + .saturating_add(Weight::from_parts(30_521, 0).saturating_mul(o.into())) + // Standard Error: 13_607 + .saturating_add(Weight::from_parts(28_877, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) } /// Storage: MarketCommons Markets (r:1 w:1) - /// Proof: MarketCommons Markets (max_values: None, max_size: Some(678), added: 3153, mode: MaxEncodedLen) + /// Proof: MarketCommons Markets (max_values: None, max_size: Some(676), added: 3151, mode: MaxEncodedLen) /// Storage: Timestamp Now (r:1 w:0) /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) /// Storage: Balances Reserves (r:1 w:1) @@ -644,19 +694,19 @@ impl WeightInfoZeitgeist for WeightInfo { /// The range of component `n` is `[0, 63]`. fn schedule_early_close_as_market_creator(o: u32, n: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `736 + o * (16 ±0)` - // Estimated: `14430` - // Minimum execution time: 74_650 nanoseconds. - Weight::from_parts(92_510_070, 14430) - // Standard Error: 11_870 - .saturating_add(Weight::from_parts(29_343, 0).saturating_mul(o.into())) - // Standard Error: 11_870 - .saturating_add(Weight::from_parts(37_672, 0).saturating_mul(n.into())) + // Measured: `808 + o * (16 ±0)` + // Estimated: `14428` + // Minimum execution time: 77_570 nanoseconds. + Weight::from_parts(100_832_075, 14428) + // Standard Error: 12_194 + .saturating_add(Weight::from_parts(44_636, 0).saturating_mul(o.into())) + // Standard Error: 12_194 + .saturating_add(Weight::from_parts(33_153, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) } /// Storage: MarketCommons Markets (r:1 w:1) - /// Proof: MarketCommons Markets (max_values: None, max_size: Some(678), added: 3153, mode: MaxEncodedLen) + /// Proof: MarketCommons Markets (max_values: None, max_size: Some(676), added: 3151, mode: MaxEncodedLen) /// Storage: Timestamp Now (r:1 w:0) /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) /// Storage: Balances Reserves (r:1 w:1) @@ -665,21 +715,17 @@ impl WeightInfoZeitgeist for WeightInfo { /// Proof: PredictionMarkets MarketIdsPerCloseTimeFrame (max_values: None, max_size: Some(1050), added: 3525, mode: MaxEncodedLen) /// The range of component `o` is `[0, 63]`. /// The range of component `n` is `[0, 63]`. - fn dispute_early_close(o: u32, n: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `852 + o * (16 ±0) + n * (16 ±0)` - // Estimated: `14430` - // Minimum execution time: 71_610 nanoseconds. - Weight::from_parts(86_696_361, 14430) - // Standard Error: 13_050 - .saturating_add(Weight::from_parts(59_792, 0).saturating_mul(o.into())) - // Standard Error: 13_050 - .saturating_add(Weight::from_parts(64_792, 0).saturating_mul(n.into())) + fn dispute_early_close(_o: u32, _n: u32) -> Weight { + // Proof Size summary in bytes: + // Measured: `924 + o * (16 ±0) + n * (16 ±0)` + // Estimated: `14428` + // Minimum execution time: 73_970 nanoseconds. + Weight::from_parts(98_470_964, 14428) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) } /// Storage: MarketCommons Markets (r:1 w:1) - /// Proof: MarketCommons Markets (max_values: None, max_size: Some(678), added: 3153, mode: MaxEncodedLen) + /// Proof: MarketCommons Markets (max_values: None, max_size: Some(676), added: 3151, mode: MaxEncodedLen) /// Storage: Timestamp Now (r:1 w:0) /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) /// Storage: PredictionMarkets MarketIdsPerCloseTimeFrame (r:2 w:2) @@ -688,32 +734,32 @@ impl WeightInfoZeitgeist for WeightInfo { /// The range of component `n` is `[0, 63]`. fn reject_early_close_after_authority(o: u32, n: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `742 + o * (16 ±0) + n * (16 ±0)` - // Estimated: `10706` - // Minimum execution time: 55_950 nanoseconds. - Weight::from_parts(70_714_615, 10706) - // Standard Error: 14_905 - .saturating_add(Weight::from_parts(63_828, 0).saturating_mul(o.into())) - // Standard Error: 14_905 - .saturating_add(Weight::from_parts(40_198, 0).saturating_mul(n.into())) + // Measured: `814 + o * (16 ±0) + n * (16 ±0)` + // Estimated: `10704` + // Minimum execution time: 57_970 nanoseconds. + Weight::from_parts(74_720_000, 10704) + // Standard Error: 8_681 + .saturating_add(Weight::from_parts(14_141, 0).saturating_mul(o.into())) + // Standard Error: 8_681 + .saturating_add(Weight::from_parts(36_011, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } /// Storage: MarketCommons Markets (r:1 w:1) - /// Proof: MarketCommons Markets (max_values: None, max_size: Some(678), added: 3153, mode: MaxEncodedLen) + /// Proof: MarketCommons Markets (max_values: None, max_size: Some(676), added: 3151, mode: MaxEncodedLen) /// Storage: Balances Reserves (r:1 w:1) /// Proof: Balances Reserves (max_values: None, max_size: Some(1249), added: 3724, mode: MaxEncodedLen) fn reject_early_close_after_dispute() -> Weight { // Proof Size summary in bytes: // Measured: `672` - // Estimated: `6877` - // Minimum execution time: 80_670 nanoseconds. - Weight::from_parts(84_290_000, 6877) + // Estimated: `6875` + // Minimum execution time: 78_830 nanoseconds. + Weight::from_parts(98_340_000, 6875) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } /// Storage: MarketCommons Markets (r:1 w:1) - /// Proof: MarketCommons Markets (max_values: None, max_size: Some(678), added: 3153, mode: MaxEncodedLen) + /// Proof: MarketCommons Markets (max_values: None, max_size: Some(676), added: 3151, mode: MaxEncodedLen) /// Storage: PredictionMarkets MarketIdsPerCloseTimeFrame (r:1 w:1) /// Proof: PredictionMarkets MarketIdsPerCloseTimeFrame (max_values: None, max_size: Some(1050), added: 3525, mode: MaxEncodedLen) /// Storage: Timestamp Now (r:1 w:0) @@ -722,11 +768,11 @@ impl WeightInfoZeitgeist for WeightInfo { fn close_trusted_market(c: u32) -> Weight { // Proof Size summary in bytes: // Measured: `709 + c * (16 ±0)` - // Estimated: `7181` - // Minimum execution time: 46_550 nanoseconds. - Weight::from_parts(57_766_022, 7181) - // Standard Error: 7_003 - .saturating_add(Weight::from_parts(122_020, 0).saturating_mul(c.into())) + // Estimated: `7179` + // Minimum execution time: 47_820 nanoseconds. + Weight::from_parts(64_357_268, 7179) + // Standard Error: 9_534 + .saturating_add(Weight::from_parts(26_319, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -736,53 +782,51 @@ impl WeightInfoZeitgeist for WeightInfo { /// Proof: Balances Reserves (max_values: None, max_size: Some(1249), added: 3724, mode: MaxEncodedLen) /// Storage: MarketCommons MarketCounter (r:1 w:1) /// Proof: MarketCommons MarketCounter (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) + /// Storage: MarketAssets Asset (r:64 w:64) + /// Proof: MarketAssets Asset (max_values: None, max_size: Some(225), added: 2700, mode: MaxEncodedLen) /// Storage: PredictionMarkets MarketIdsPerCloseTimeFrame (r:1 w:1) /// Proof: PredictionMarkets MarketIdsPerCloseTimeFrame (max_values: None, max_size: Some(1050), added: 3525, mode: MaxEncodedLen) /// Storage: System Account (r:2 w:2) /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) - /// Storage: Tokens Accounts (r:128 w:128) - /// Proof: Tokens Accounts (max_values: None, max_size: Some(123), added: 2598, mode: MaxEncodedLen) - /// Storage: Tokens TotalIssuance (r:64 w:64) - /// Proof: Tokens TotalIssuance (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) + /// Storage: MarketAssets Account (r:128 w:128) + /// Proof: MarketAssets Account (max_values: None, max_size: Some(117), added: 2592, mode: MaxEncodedLen) /// Storage: NeoSwaps Pools (r:1 w:1) /// Proof: NeoSwaps Pools (max_values: None, max_size: Some(144745), added: 147220, mode: MaxEncodedLen) /// Storage: MarketCommons Markets (r:0 w:1) - /// Proof: MarketCommons Markets (max_values: None, max_size: Some(678), added: 3153, mode: MaxEncodedLen) + /// Proof: MarketCommons Markets (max_values: None, max_size: Some(676), added: 3151, mode: MaxEncodedLen) /// The range of component `m` is `[0, 63]`. /// The range of component `n` is `[2, 64]`. fn create_market_and_deploy_pool(m: u32, n: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `410 + m * (16 ±0)` - // Estimated: `160697 + n * (7714 ±0)` - // Minimum execution time: 308_311 nanoseconds. - Weight::from_parts(79_670_419, 160697) - // Standard Error: 618_510 - .saturating_add(Weight::from_parts(1_958_104, 0).saturating_mul(m.into())) - // Standard Error: 627_776 - .saturating_add(Weight::from_parts(61_182_580, 0).saturating_mul(n.into())) + // Measured: `371 + m * (16 ±0)` + // Estimated: `160697 + n * (7884 ±0)` + // Minimum execution time: 338_041 nanoseconds. + Weight::from_parts(197_998_117, 160697) + // Standard Error: 318_827 + .saturating_add(Weight::from_parts(276_212, 0).saturating_mul(m.into())) + // Standard Error: 323_603 + .saturating_add(Weight::from_parts(78_585_831, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(7)) .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(n.into()))) - .saturating_add(Weight::from_parts(0, 7714).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(0, 7884).saturating_mul(n.into())) } + /// Storage: MarketCommons Markets (r:1 w:1) + /// Proof: MarketCommons Markets (max_values: None, max_size: Some(676), added: 3151, mode: MaxEncodedLen) /// Storage: Timestamp Now (r:1 w:0) /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: Balances Reserves (r:1 w:1) - /// Proof: Balances Reserves (max_values: None, max_size: Some(1249), added: 3724, mode: MaxEncodedLen) - /// Storage: MarketCommons MarketCounter (r:1 w:1) - /// Proof: MarketCommons MarketCounter (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) /// Storage: PredictionMarkets MarketIdsPerCloseTimeFrame (r:1 w:1) /// Proof: PredictionMarkets MarketIdsPerCloseTimeFrame (max_values: None, max_size: Some(1050), added: 3525, mode: MaxEncodedLen) /// The range of component `o` is `[1, 63]`. fn manually_close_market(o: u32) -> Weight { // Proof Size summary in bytes: // Measured: `694 + o * (16 ±0)` - // Estimated: `7181` - // Minimum execution time: 53_830 nanoseconds. - Weight::from_parts(57_209_302, 7181) - // Standard Error: 9_825 - .saturating_add(Weight::from_parts(91_256, 0).saturating_mul(o.into())) + // Estimated: `7179` + // Minimum execution time: 45_920 nanoseconds. + Weight::from_parts(59_505_796, 7179) + // Standard Error: 8_380 + .saturating_add(Weight::from_parts(91_386, 0).saturating_mul(o.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } diff --git a/zrml/rikiddo/Cargo.toml b/zrml/rikiddo/Cargo.toml index 4732ba6ba..939d36555 100644 --- a/zrml/rikiddo/Cargo.toml +++ b/zrml/rikiddo/Cargo.toml @@ -44,4 +44,4 @@ try-runtime = [ authors = ["Zeitgeist PM "] edition = "2021" name = "zrml-rikiddo" -version = "0.5.0" +version = "0.5.1" diff --git a/zrml/simple-disputes/Cargo.toml b/zrml/simple-disputes/Cargo.toml index 8841cdfee..eae55f2b6 100644 --- a/zrml/simple-disputes/Cargo.toml +++ b/zrml/simple-disputes/Cargo.toml @@ -42,4 +42,4 @@ try-runtime = [ authors = ["Zeitgeist PM "] edition = "2021" name = "zrml-simple-disputes" -version = "0.5.0" +version = "0.5.1" diff --git a/zrml/styx/Cargo.toml b/zrml/styx/Cargo.toml index d24e381de..3ced7ab45 100644 --- a/zrml/styx/Cargo.toml +++ b/zrml/styx/Cargo.toml @@ -37,4 +37,4 @@ try-runtime = [ authors = ["Zeitgeist PM "] edition = "2021" name = "zrml-styx" -version = "0.5.0" +version = "0.5.1" diff --git a/zrml/styx/src/weights.rs b/zrml/styx/src/weights.rs index 4594eb18b..6c6b96cd3 100644 --- a/zrml/styx/src/weights.rs +++ b/zrml/styx/src/weights.rs @@ -19,13 +19,13 @@ //! Autogenerated weights for zrml_styx //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: `2024-01-15`, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: `2024-04-03`, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `zafoi`, CPU: `AMD Ryzen 9 5900X 12-Core Processor` -//! EXECUTION: `Some(Native)`, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024` +//! HOSTNAME: `zeitgeist-benchmark`, CPU: `AMD EPYC 7601 32-Core Processor` +//! EXECUTION: `Some(Wasm)`, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024` // Executed Command: -// ./target/release/zeitgeist +// ./target/production/zeitgeist // benchmark // pallet // --chain=dev @@ -33,7 +33,7 @@ // --repeat=20 // --pallet=zrml_styx // --extrinsic=* -// --execution=native +// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --template=./misc/weight_template.hbs @@ -64,8 +64,8 @@ impl WeightInfoZeitgeist for WeightInfo { // Proof Size summary in bytes: // Measured: `76` // Estimated: `3034` - // Minimum execution time: 33_900 nanoseconds. - Weight::from_parts(43_980_000, 3034) + // Minimum execution time: 36_730 nanoseconds. + Weight::from_parts(44_890_000, 3034) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -75,7 +75,7 @@ impl WeightInfoZeitgeist for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 14_260 nanoseconds. - Weight::from_parts(15_690_000, 0).saturating_add(T::DbWeight::get().writes(1)) + // Minimum execution time: 14_550 nanoseconds. + Weight::from_parts(15_310_000, 0).saturating_add(T::DbWeight::get().writes(1)) } } diff --git a/zrml/swaps/Cargo.toml b/zrml/swaps/Cargo.toml index 3cc8ac8be..731eff48c 100644 --- a/zrml/swaps/Cargo.toml +++ b/zrml/swaps/Cargo.toml @@ -65,4 +65,4 @@ try-runtime = [ authors = ["Zeitgeist PM "] edition = "2021" name = "zrml-swaps" -version = "0.5.0" +version = "0.5.1" diff --git a/zrml/swaps/rpc/Cargo.toml b/zrml/swaps/rpc/Cargo.toml index a5f97ab16..571d50239 100644 --- a/zrml/swaps/rpc/Cargo.toml +++ b/zrml/swaps/rpc/Cargo.toml @@ -11,4 +11,4 @@ zrml-swaps-runtime-api = { workspace = true, features = ["default"] } authors = ["Zeitgeist PM "] edition = "2021" name = "zrml-swaps-rpc" -version = "0.5.0" +version = "0.5.1" diff --git a/zrml/swaps/runtime-api/Cargo.toml b/zrml/swaps/runtime-api/Cargo.toml index a3a1c88b5..dc81c9673 100644 --- a/zrml/swaps/runtime-api/Cargo.toml +++ b/zrml/swaps/runtime-api/Cargo.toml @@ -18,4 +18,4 @@ std = [ authors = ["Zeitgeist PM "] edition = "2021" name = "zrml-swaps-runtime-api" -version = "0.5.0" +version = "0.5.1" diff --git a/zrml/swaps/src/weights.rs b/zrml/swaps/src/weights.rs index 24ff4837f..ba8ad9dd0 100644 --- a/zrml/swaps/src/weights.rs +++ b/zrml/swaps/src/weights.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for zrml_swaps //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: `2024-01-15`, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: `2024-04-03`, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `zeitgeist-benchmark`, CPU: `AMD EPYC 7601 32-Core Processor` //! EXECUTION: `Some(Wasm)`, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024` @@ -78,17 +78,17 @@ impl WeightInfoZeitgeist for WeightInfo { /// The range of component `a` is `[2, 65]`. fn pool_exit(a: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `848 + a * (176 ±0)` - // Estimated: `13777 + a * (5196 ±0)` - // Minimum execution time: 129_570 nanoseconds. - Weight::from_parts(128_926_395, 13777) - // Standard Error: 377_426 - .saturating_add(Weight::from_parts(36_975_518, 0).saturating_mul(a.into())) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(a.into()))) + // Measured: `957 + a * (176 ±0)` + // Estimated: `16477 + a * (7896 ±0)` + // Minimum execution time: 212_291 nanoseconds. + Weight::from_parts(108_353_402, 16477) + // Standard Error: 213_768 + .saturating_add(Weight::from_parts(50_584_386, 0).saturating_mul(a.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(a.into()))) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(a.into()))) - .saturating_add(Weight::from_parts(0, 5196).saturating_mul(a.into())) + .saturating_add(Weight::from_parts(0, 7896).saturating_mul(a.into())) } /// Storage: Swaps Pools (r:1 w:0) /// Proof: Swaps Pools (max_values: None, max_size: Some(3579), added: 6054, mode: MaxEncodedLen) @@ -102,11 +102,11 @@ impl WeightInfoZeitgeist for WeightInfo { /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) fn pool_exit_with_exact_asset_amount() -> Weight { // Proof Size summary in bytes: - // Measured: `5546` - // Estimated: `18973` - // Minimum execution time: 119_830 nanoseconds. - Weight::from_parts(147_671_000, 18973) - .saturating_add(T::DbWeight::get().reads(6)) + // Measured: `5655` + // Estimated: `24373` + // Minimum execution time: 157_101 nanoseconds. + Weight::from_parts(177_350_000, 24373) + .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(4)) } /// Storage: Swaps Pools (r:1 w:0) @@ -121,11 +121,11 @@ impl WeightInfoZeitgeist for WeightInfo { /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) fn pool_exit_with_exact_pool_amount() -> Weight { // Proof Size summary in bytes: - // Measured: `5546` - // Estimated: `18973` - // Minimum execution time: 141_210 nanoseconds. - Weight::from_parts(147_801_000, 18973) - .saturating_add(T::DbWeight::get().reads(6)) + // Measured: `5655` + // Estimated: `24373` + // Minimum execution time: 134_961 nanoseconds. + Weight::from_parts(182_710_000, 24373) + .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(4)) } /// Storage: Swaps Pools (r:1 w:0) @@ -139,17 +139,17 @@ impl WeightInfoZeitgeist for WeightInfo { /// The range of component `a` is `[2, 65]`. fn pool_join(a: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `726 + a * (289 ±0)` - // Estimated: `11170 + a * (5196 ±0)` - // Minimum execution time: 125_590 nanoseconds. - Weight::from_parts(63_107_045, 11170) - // Standard Error: 353_437 - .saturating_add(Weight::from_parts(30_963_348, 0).saturating_mul(a.into())) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(a.into()))) + // Measured: `835 + a * (289 ±0)` + // Estimated: `13870 + a * (7896 ±0)` + // Minimum execution time: 129_831 nanoseconds. + Weight::from_parts(83_781_491, 13870) + // Standard Error: 84_833 + .saturating_add(Weight::from_parts(33_723_406, 0).saturating_mul(a.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(a.into()))) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(a.into()))) - .saturating_add(Weight::from_parts(0, 5196).saturating_mul(a.into())) + .saturating_add(Weight::from_parts(0, 7896).saturating_mul(a.into())) } /// Storage: Swaps Pools (r:1 w:0) /// Proof: Swaps Pools (max_values: None, max_size: Some(3579), added: 6054, mode: MaxEncodedLen) @@ -161,11 +161,11 @@ impl WeightInfoZeitgeist for WeightInfo { /// Proof: Tokens Accounts (max_values: None, max_size: Some(123), added: 2598, mode: MaxEncodedLen) fn pool_join_with_exact_asset_amount() -> Weight { // Proof Size summary in bytes: - // Measured: `6229` - // Estimated: `16366` - // Minimum execution time: 120_300 nanoseconds. - Weight::from_parts(138_451_000, 16366) - .saturating_add(T::DbWeight::get().reads(5)) + // Measured: `6338` + // Estimated: `21766` + // Minimum execution time: 119_171 nanoseconds. + Weight::from_parts(145_031_000, 21766) + .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(4)) } /// Storage: Swaps Pools (r:1 w:0) @@ -178,11 +178,11 @@ impl WeightInfoZeitgeist for WeightInfo { /// Proof: Tokens Accounts (max_values: None, max_size: Some(123), added: 2598, mode: MaxEncodedLen) fn pool_join_with_exact_pool_amount() -> Weight { // Proof Size summary in bytes: - // Measured: `6229` - // Estimated: `16366` - // Minimum execution time: 101_230 nanoseconds. - Weight::from_parts(126_591_000, 16366) - .saturating_add(T::DbWeight::get().reads(5)) + // Measured: `6338` + // Estimated: `21766` + // Minimum execution time: 115_000 nanoseconds. + Weight::from_parts(140_411_000, 21766) + .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(4)) } /// Storage: Swaps Pools (r:1 w:0) @@ -195,11 +195,11 @@ impl WeightInfoZeitgeist for WeightInfo { /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) fn swap_exact_amount_in() -> Weight { // Proof Size summary in bytes: - // Measured: `5144` - // Estimated: `19053` - // Minimum execution time: 163_771 nanoseconds. - Weight::from_parts(201_801_000, 19053) - .saturating_add(T::DbWeight::get().reads(6)) + // Measured: `5253` + // Estimated: `24453` + // Minimum execution time: 198_321 nanoseconds. + Weight::from_parts(228_400_000, 24453) + .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(4)) } /// Storage: Swaps Pools (r:1 w:0) @@ -212,11 +212,11 @@ impl WeightInfoZeitgeist for WeightInfo { /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) fn swap_exact_amount_out() -> Weight { // Proof Size summary in bytes: - // Measured: `5144` - // Estimated: `19053` - // Minimum execution time: 166_981 nanoseconds. - Weight::from_parts(202_971_000, 19053) - .saturating_add(T::DbWeight::get().reads(6)) + // Measured: `5253` + // Estimated: `24453` + // Minimum execution time: 184_061 nanoseconds. + Weight::from_parts(224_081_000, 24453) + .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(4)) } /// Storage: Swaps Pools (r:1 w:1) @@ -224,12 +224,12 @@ impl WeightInfoZeitgeist for WeightInfo { /// The range of component `a` is `[2, 65]`. fn open_pool(a: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `167 + a * (54 ±0)` + // Measured: `168 + a * (54 ±0)` // Estimated: `6054` - // Minimum execution time: 18_030 nanoseconds. - Weight::from_parts(19_889_995, 6054) - // Standard Error: 12_386 - .saturating_add(Weight::from_parts(570_444, 0).saturating_mul(a.into())) + // Minimum execution time: 17_870 nanoseconds. + Weight::from_parts(24_566_312, 6054) + // Standard Error: 5_890 + .saturating_add(Weight::from_parts(395_707, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -238,12 +238,12 @@ impl WeightInfoZeitgeist for WeightInfo { /// The range of component `a` is `[2, 65]`. fn close_pool(a: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `167 + a * (54 ±0)` + // Measured: `168 + a * (54 ±0)` // Estimated: `6054` - // Minimum execution time: 17_140 nanoseconds. - Weight::from_parts(19_467_788, 6054) - // Standard Error: 3_011 - .saturating_add(Weight::from_parts(283_373, 0).saturating_mul(a.into())) + // Minimum execution time: 15_760 nanoseconds. + Weight::from_parts(21_399_592, 6054) + // Standard Error: 3_489 + .saturating_add(Weight::from_parts(236_945, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -253,23 +253,23 @@ impl WeightInfoZeitgeist for WeightInfo { /// Proof: MarketAssets Asset (max_values: None, max_size: Some(225), added: 2700, mode: MaxEncodedLen) /// Storage: Tokens Accounts (r:65 w:65) /// Proof: Tokens Accounts (max_values: None, max_size: Some(123), added: 2598, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) /// Storage: Tokens TotalIssuance (r:65 w:65) /// Proof: Tokens TotalIssuance (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) + /// Storage: System Account (r:1 w:1) + /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) /// The range of component `a` is `[2, 65]`. fn destroy_pool(a: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `569 + a * (214 ±0)` - // Estimated: `8661 + a * (5116 ±0)` - // Minimum execution time: 99_530 nanoseconds. - Weight::from_parts(13_849_323, 8661) - // Standard Error: 316_948 - .saturating_add(Weight::from_parts(31_161_021, 0).saturating_mul(a.into())) + // Measured: `678 + a * (214 ±0)` + // Estimated: `8661 + a * (7816 ±0)` + // Minimum execution time: 106_500 nanoseconds. + Weight::from_parts(81_841_801, 8661) + // Standard Error: 112_540 + .saturating_add(Weight::from_parts(29_966_214, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(a.into()))) + .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(a.into()))) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(a.into()))) - .saturating_add(Weight::from_parts(0, 5116).saturating_mul(a.into())) + .saturating_add(Weight::from_parts(0, 7816).saturating_mul(a.into())) } }