Asset conversion get_pool_id fix (Ord does not count with is_native flag) (#14572)

* Asset conversion `get_pool_id` fix (`Ord` does not count with `is_native` flag)

* Removed unnecessery clones + added `pool_account` to `PoolCreated` event

* Fix bench compile

* Fix bench

* Improved `MultiAssetIdConverter::try_convert`

* Removed `into_multiasset_id` from converter and moved to `BenchmarkHelper`

* ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_asset_conversion

* Fixed doc

* Typo

* Removed `NativeOrAssetId` (test/mock) impl from types.rs to mock.rs...

* Typo + 0u32 -> 0

* Update frame/asset-conversion/src/benchmarking.rs

Co-authored-by: Jegor Sidorenko <5252494+jsidorenko@users.noreply.github.com>

* Typo

* ".git/.scripts/commands/fmt/fmt.sh"

* Fix from Jegor

* Try to fix the other failing benchmark

* ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_asset_conversion

* Update frame/asset-conversion/src/lib.rs

Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

* Update frame/asset-conversion/src/types.rs

Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

* Update frame/transaction-payment/asset-conversion-tx-payment/src/mock.rs

Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

* Update frame/asset-conversion/src/mock.rs

Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

* Update bin/node/runtime/src/impls.rs

Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

* Update frame/asset-conversion/src/lib.rs

Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

* Update bin/node/runtime/src/impls.rs

Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

* Reverted NativeOrAssetId

---------

Co-authored-by: command-bot <>
Co-authored-by: Jegor Sidorenko <5252494+jsidorenko@users.noreply.github.com>
Co-authored-by: Jegor Sidorenko <jegor@parity.io>
Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
This commit is contained in:
Branislav Kontur
2023-07-21 15:06:32 +02:00
committed by GitHub
parent e71cca3c0d
commit 649be3aaaa
8 changed files with 319 additions and 258 deletions
+21 -21
View File
@@ -18,7 +18,7 @@
//! Autogenerated weights for pallet_asset_conversion
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-07-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2023-07-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `runner-gghbxkbs-project-145-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024`
@@ -77,8 +77,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `729`
// Estimated: `6196`
// Minimum execution time: 131_549_000 picoseconds.
Weight::from_parts(134_287_000, 6196)
// Minimum execution time: 131_688_000 picoseconds.
Weight::from_parts(134_092_000, 6196)
.saturating_add(T::DbWeight::get().reads(8_u64))
.saturating_add(T::DbWeight::get().writes(8_u64))
}
@@ -98,8 +98,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `1382`
// Estimated: `6208`
// Minimum execution time: 156_395_000 picoseconds.
Weight::from_parts(157_952_000, 6208)
// Minimum execution time: 157_310_000 picoseconds.
Weight::from_parts(161_547_000, 6208)
.saturating_add(T::DbWeight::get().reads(8_u64))
.saturating_add(T::DbWeight::get().writes(7_u64))
}
@@ -119,8 +119,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `1371`
// Estimated: `6208`
// Minimum execution time: 140_295_000 picoseconds.
Weight::from_parts(143_452_000, 6208)
// Minimum execution time: 142_769_000 picoseconds.
Weight::from_parts(145_139_000, 6208)
.saturating_add(T::DbWeight::get().reads(7_u64))
.saturating_add(T::DbWeight::get().writes(6_u64))
}
@@ -134,8 +134,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `1738`
// Estimated: `16644`
// Minimum execution time: 214_657_000 picoseconds.
Weight::from_parts(217_657_000, 16644)
// Minimum execution time: 213_186_000 picoseconds.
Weight::from_parts(217_471_000, 16644)
.saturating_add(T::DbWeight::get().reads(10_u64))
.saturating_add(T::DbWeight::get().writes(10_u64))
}
@@ -149,8 +149,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `1738`
// Estimated: `16644`
// Minimum execution time: 215_319_000 picoseconds.
Weight::from_parts(218_299_000, 16644)
// Minimum execution time: 213_793_000 picoseconds.
Weight::from_parts(218_584_000, 16644)
.saturating_add(T::DbWeight::get().reads(10_u64))
.saturating_add(T::DbWeight::get().writes(10_u64))
}
@@ -176,8 +176,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `729`
// Estimated: `6196`
// Minimum execution time: 131_549_000 picoseconds.
Weight::from_parts(134_287_000, 6196)
// Minimum execution time: 131_688_000 picoseconds.
Weight::from_parts(134_092_000, 6196)
.saturating_add(RocksDbWeight::get().reads(8_u64))
.saturating_add(RocksDbWeight::get().writes(8_u64))
}
@@ -197,8 +197,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `1382`
// Estimated: `6208`
// Minimum execution time: 156_395_000 picoseconds.
Weight::from_parts(157_952_000, 6208)
// Minimum execution time: 157_310_000 picoseconds.
Weight::from_parts(161_547_000, 6208)
.saturating_add(RocksDbWeight::get().reads(8_u64))
.saturating_add(RocksDbWeight::get().writes(7_u64))
}
@@ -218,8 +218,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `1371`
// Estimated: `6208`
// Minimum execution time: 140_295_000 picoseconds.
Weight::from_parts(143_452_000, 6208)
// Minimum execution time: 142_769_000 picoseconds.
Weight::from_parts(145_139_000, 6208)
.saturating_add(RocksDbWeight::get().reads(7_u64))
.saturating_add(RocksDbWeight::get().writes(6_u64))
}
@@ -233,8 +233,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `1738`
// Estimated: `16644`
// Minimum execution time: 214_657_000 picoseconds.
Weight::from_parts(217_657_000, 16644)
// Minimum execution time: 213_186_000 picoseconds.
Weight::from_parts(217_471_000, 16644)
.saturating_add(RocksDbWeight::get().reads(10_u64))
.saturating_add(RocksDbWeight::get().writes(10_u64))
}
@@ -248,8 +248,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `1738`
// Estimated: `16644`
// Minimum execution time: 215_319_000 picoseconds.
Weight::from_parts(218_299_000, 16644)
// Minimum execution time: 213_793_000 picoseconds.
Weight::from_parts(218_584_000, 16644)
.saturating_add(RocksDbWeight::get().reads(10_u64))
.saturating_add(RocksDbWeight::get().writes(10_u64))
}