From 3d6dbc929985a8954b24cee59bbe00c5cee70cca Mon Sep 17 00:00:00 2001 From: Roy Yang Date: Wed, 1 Dec 2021 15:01:56 +1300 Subject: [PATCH 1/2] re-benchmarked the homa-lite module (#1638) * re-benchmarked the homa-lite module * cargo run --release --color=never --bin=acala --features=runtime-benchmarks --features=with-karura-runtime -- benchmark --chain=karura-dev --steps=50 --repeat=20 --pallet=module-homa-lite --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --template=./templates/runtime-weight-template.hbs --output=./runtime/karura/src/weights/ * cargo run --release --color=never --bin=acala --features=runtime-benchmarks --features=with-mandala-runtime -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=module-homa-lite --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --template=./templates/runtime-weight-template.hbs --output=./runtime/mandala/src/weights/ * cargo run --release --color=never --bin=acala --features=runtime-benchmarks --features=with-mandala-runtime -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=module-homa-lite --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --template=./templates/runtime-weight-template.hbs --output=./runtime/mandala/src/weights/ * cargo run --release --color=never --bin=acala --features=runtime-benchmarks --features=with-mandala-runtime -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=module-homa-lite --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --template=./templates/runtime-weight-template.hbs --output=./runtime/mandala/src/weights/ * cargo run --release --color=never --bin=acala --features=runtime-benchmarks --features=with-mandala-runtime -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=module-homa-lite --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --template=./templates/runtime-weight-template.hbs --output=./runtime/mandala/src/weights/ * cargo run --release --color=never --bin=acala --features=runtime-benchmarks --features=with-mandala-runtime -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=module-homa-lite --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --template=./templates/runtime-weight-template.hbs --output=./runtime/mandala/src/weights/ * cargo run --release --color=never --bin=acala --features=runtime-benchmarks --features=with-karura-runtime -- benchmark --chain=karura-dev --steps=50 --repeat=20 --pallet=module-homa-lite --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --template=./templates/runtime-weight-template.hbs --output=./runtime/karura/src/weights/ * cargo run --release --color=never --bin=acala --features=runtime-benchmarks --features=with-karura-runtime -- benchmark --chain=karura-dev --steps=50 --repeat=20 --pallet=module-dex --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --template=./templates/runtime-weight-template.hbs --output=./runtime/karura/src/weights/ * cargo run --release --color=never --bin=acala --features=runtime-benchmarks --features=with-karura-runtime -- benchmark --chain=karura-dev --steps=50 --repeat=20 --pallet=module-dex --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --template=./templates/runtime-weight-template.hbs --output=./runtime/karura/src/weights/ * cargo run --release --color=never --bin=acala --features=runtime-benchmarks --features=with-karura-runtime -- benchmark --chain=karura-dev --steps=50 --repeat=20 --pallet=module-dex --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --template=./templates/runtime-weight-template.hbs --output=./runtime/karura/src/weights/ * cargo run --release --color=never --bin=acala --features=runtime-benchmarks --features=with-mandala-runtime -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=module-homa-lite --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --template=./templates/runtime-weight-template.hbs --output=./runtime/mandala/src/weights/ * cargo run --release --color=never --bin=acala --features=runtime-benchmarks --features=with-karura-runtime -- benchmark --chain=karura-dev --steps=50 --repeat=20 --pallet=module-homa-lite --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --template=./templates/runtime-weight-template.hbs --output=./runtime/karura/src/weights/ Co-authored-by: Roy Yang Co-authored-by: Acala Benchmarking Bot --- modules/homa-lite/src/weights.rs | 74 +++++++++---------- runtime/acala/src/weights/module_homa_lite.rs | 38 +++++----- runtime/karura/src/weights/module_dex.rs | 38 +++++----- .../karura/src/weights/module_homa_lite.rs | 50 ++++++------- .../mandala/src/weights/module_homa_lite.rs | 50 ++++++------- 5 files changed, 125 insertions(+), 125 deletions(-) diff --git a/modules/homa-lite/src/weights.rs b/modules/homa-lite/src/weights.rs index 0f2bacaa12..83e79a9e56 100644 --- a/modules/homa-lite/src/weights.rs +++ b/modules/homa-lite/src/weights.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for module_homa_lite //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2021-11-03, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-11-24, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("karura-dev"), DB CACHE: 128 // Executed Command: @@ -77,29 +77,29 @@ impl WeightInfo for AcalaWeight { .saturating_add(T::DbWeight::get().reads(1 as Weight)) } fn mint() -> Weight { - (139_000_000 as Weight) - .saturating_add(T::DbWeight::get().reads(17 as Weight)) - .saturating_add(T::DbWeight::get().writes(8 as Weight)) + (130_000_000 as Weight) + .saturating_add(T::DbWeight::get().reads(19 as Weight)) + .saturating_add(T::DbWeight::get().writes(9 as Weight)) } fn mint_for_requests() -> Weight { - (145_000_000 as Weight) - .saturating_add(T::DbWeight::get().reads(19 as Weight)) - .saturating_add(T::DbWeight::get().writes(8 as Weight)) + (139_000_000 as Weight) + .saturating_add(T::DbWeight::get().reads(21 as Weight)) + .saturating_add(T::DbWeight::get().writes(9 as Weight)) } fn set_total_staking_currency() -> Weight { - (12_000_000 as Weight) + (11_000_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn adjust_total_staking_currency() -> Weight { - (12_000_000 as Weight) + (11_000_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn adjust_available_staking_balance_with_no_matches() -> Weight { - (11_000_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + (18_000_000 as Weight) + .saturating_add(T::DbWeight::get().reads(4 as Weight)) + .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn set_minting_cap() -> Weight { (10_000_000 as Weight) @@ -110,9 +110,9 @@ impl WeightInfo for AcalaWeight { .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn request_redeem() -> Weight { - (73_000_000 as Weight) - .saturating_add(T::DbWeight::get().reads(7 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + (32_000_000 as Weight) + .saturating_add(T::DbWeight::get().reads(4 as Weight)) + .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn schedule_unbond() -> Weight { (12_000_000 as Weight) @@ -124,16 +124,16 @@ impl WeightInfo for AcalaWeight { .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn set_staking_interest_rate_per_update() -> Weight { - (10_000_000 as Weight) + (9_000_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn redeem_with_available_staking_balance() -> Weight { - (8_000_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) + (5_000_000 as Weight) + .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn xcm_unbond() -> Weight { - (32_000_000 as Weight) + (30_000_000 as Weight) .saturating_add(T::DbWeight::get().reads(8 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } @@ -151,29 +151,29 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().reads(1 as Weight)) } fn mint() -> Weight { - (139_000_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(17 as Weight)) - .saturating_add(RocksDbWeight::get().writes(8 as Weight)) + (130_000_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(19 as Weight)) + .saturating_add(RocksDbWeight::get().writes(9 as Weight)) } fn mint_for_requests() -> Weight { - (145_000_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(19 as Weight)) - .saturating_add(RocksDbWeight::get().writes(8 as Weight)) + (139_000_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(21 as Weight)) + .saturating_add(RocksDbWeight::get().writes(9 as Weight)) } fn set_total_staking_currency() -> Weight { - (12_000_000 as Weight) + (11_000_000 as Weight) .saturating_add(RocksDbWeight::get().reads(1 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } fn adjust_total_staking_currency() -> Weight { - (12_000_000 as Weight) + (11_000_000 as Weight) .saturating_add(RocksDbWeight::get().reads(1 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } fn adjust_available_staking_balance_with_no_matches() -> Weight { - (11_000_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) + (18_000_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(4 as Weight)) + .saturating_add(RocksDbWeight::get().writes(2 as Weight)) } fn set_minting_cap() -> Weight { (10_000_000 as Weight) @@ -184,9 +184,9 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } fn request_redeem() -> Weight { - (73_000_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(7 as Weight)) - .saturating_add(RocksDbWeight::get().writes(4 as Weight)) + (32_000_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(4 as Weight)) + .saturating_add(RocksDbWeight::get().writes(3 as Weight)) } fn schedule_unbond() -> Weight { (12_000_000 as Weight) @@ -198,16 +198,16 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } fn set_staking_interest_rate_per_update() -> Weight { - (10_000_000 as Weight) + (9_000_000 as Weight) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } fn redeem_with_available_staking_balance() -> Weight { - (8_000_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) + (5_000_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(2 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } fn xcm_unbond() -> Weight { - (32_000_000 as Weight) + (30_000_000 as Weight) .saturating_add(RocksDbWeight::get().reads(8 as Weight)) .saturating_add(RocksDbWeight::get().writes(3 as Weight)) } diff --git a/runtime/acala/src/weights/module_homa_lite.rs b/runtime/acala/src/weights/module_homa_lite.rs index 552697ce49..4f13c3f7c5 100644 --- a/runtime/acala/src/weights/module_homa_lite.rs +++ b/runtime/acala/src/weights/module_homa_lite.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for module_homa_lite //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2021-11-03, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-11-24, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("acala-dev"), DB CACHE: 128 // Executed Command: @@ -48,7 +48,7 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl module_homa_lite::WeightInfo for WeightInfo { fn on_initialize() -> Weight { - (12_000_000 as Weight) + (13_000_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -57,14 +57,14 @@ impl module_homa_lite::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().reads(1 as Weight)) } fn mint() -> Weight { - (136_000_000 as Weight) - .saturating_add(T::DbWeight::get().reads(17 as Weight)) - .saturating_add(T::DbWeight::get().writes(8 as Weight)) + (129_000_000 as Weight) + .saturating_add(T::DbWeight::get().reads(19 as Weight)) + .saturating_add(T::DbWeight::get().writes(9 as Weight)) } fn mint_for_requests() -> Weight { - (325_000_000 as Weight) - .saturating_add(T::DbWeight::get().reads(33 as Weight)) - .saturating_add(T::DbWeight::get().writes(22 as Weight)) + (330_000_000 as Weight) + .saturating_add(T::DbWeight::get().reads(35 as Weight)) + .saturating_add(T::DbWeight::get().writes(23 as Weight)) } fn set_total_staking_currency() -> Weight { (11_000_000 as Weight) @@ -77,25 +77,25 @@ impl module_homa_lite::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn adjust_available_staking_balance_with_no_matches() -> Weight { - (11_000_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + (18_000_000 as Weight) + .saturating_add(T::DbWeight::get().reads(4 as Weight)) + .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn set_minting_cap() -> Weight { (10_000_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn set_xcm_dest_weight() -> Weight { - (10_000_000 as Weight) + (9_000_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn request_redeem() -> Weight { - (73_000_000 as Weight) - .saturating_add(T::DbWeight::get().reads(7 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + (32_000_000 as Weight) + .saturating_add(T::DbWeight::get().reads(4 as Weight)) + .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn schedule_unbond() -> Weight { - (12_000_000 as Weight) + (11_000_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -108,12 +108,12 @@ impl module_homa_lite::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn redeem_with_available_staking_balance() -> Weight { - (7_000_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) + (5_000_000 as Weight) + .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn xcm_unbond() -> Weight { - (32_000_000 as Weight) + (30_000_000 as Weight) .saturating_add(T::DbWeight::get().reads(8 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } diff --git a/runtime/karura/src/weights/module_dex.rs b/runtime/karura/src/weights/module_dex.rs index 03d4e65109..ce4d8cadc5 100644 --- a/runtime/karura/src/weights/module_dex.rs +++ b/runtime/karura/src/weights/module_dex.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for module_dex //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2021-11-05, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-11-30, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("karura-dev"), DB CACHE: 128 // Executed Command: @@ -28,7 +28,7 @@ // --chain=karura-dev // --steps=50 // --repeat=20 -// --pallet=module_dex +// --pallet=module-dex // --extrinsic=* // --execution=wasm // --wasm-execution=compiled @@ -48,73 +48,73 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl module_dex::WeightInfo for WeightInfo { fn enable_trading_pair() -> Weight { - (26_202_000 as Weight) + (24_987_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn disable_trading_pair() -> Weight { - (26_691_000 as Weight) + (25_783_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn list_provisioning() -> Weight { - (36_301_000 as Weight) + (35_935_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn update_provisioning_parameters() -> Weight { - (12_660_000 as Weight) + (12_414_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn end_provisioning() -> Weight { - (78_179_000 as Weight) + (81_572_000 as Weight) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(6 as Weight)) } fn add_provision() -> Weight { - (147_431_000 as Weight) + (154_579_000 as Weight) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(5 as Weight)) } fn claim_dex_share() -> Weight { - (105_966_000 as Weight) + (110_982_000 as Weight) .saturating_add(T::DbWeight::get().reads(7 as Weight)) .saturating_add(T::DbWeight::get().writes(5 as Weight)) } fn add_liquidity() -> Weight { - (186_551_000 as Weight) + (196_902_000 as Weight) .saturating_add(T::DbWeight::get().reads(9 as Weight)) .saturating_add(T::DbWeight::get().writes(7 as Weight)) } fn add_liquidity_and_stake() -> Weight { - (263_045_000 as Weight) + (276_794_000 as Weight) .saturating_add(T::DbWeight::get().reads(12 as Weight)) .saturating_add(T::DbWeight::get().writes(10 as Weight)) } fn remove_liquidity() -> Weight { - (162_302_000 as Weight) + (169_853_000 as Weight) .saturating_add(T::DbWeight::get().reads(6 as Weight)) .saturating_add(T::DbWeight::get().writes(6 as Weight)) } fn remove_liquidity_by_unstake() -> Weight { - (280_899_000 as Weight) + (296_751_000 as Weight) .saturating_add(T::DbWeight::get().reads(12 as Weight)) .saturating_add(T::DbWeight::get().writes(10 as Weight)) } fn swap_with_exact_supply(u: u32, ) -> Weight { - (92_601_000 as Weight) - // Standard Error: 118_000 - .saturating_add((17_771_000 as Weight).saturating_mul(u as Weight)) + (96_576_000 as Weight) + // Standard Error: 169_000 + .saturating_add((17_979_000 as Weight).saturating_mul(u as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(u as Weight))) .saturating_add(T::DbWeight::get().writes(2 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(u as Weight))) } fn swap_with_exact_target(u: u32, ) -> Weight { - (95_445_000 as Weight) - // Standard Error: 3_617_000 - .saturating_add((18_237_000 as Weight).saturating_mul(u as Weight)) + (97_539_000 as Weight) + // Standard Error: 145_000 + .saturating_add((17_633_000 as Weight).saturating_mul(u as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(u as Weight))) .saturating_add(T::DbWeight::get().writes(2 as Weight)) diff --git a/runtime/karura/src/weights/module_homa_lite.rs b/runtime/karura/src/weights/module_homa_lite.rs index e780091f28..063c3f0314 100644 --- a/runtime/karura/src/weights/module_homa_lite.rs +++ b/runtime/karura/src/weights/module_homa_lite.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for module_homa_lite //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2021-11-03, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-12-01, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("karura-dev"), DB CACHE: 128 // Executed Command: @@ -48,72 +48,72 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl module_homa_lite::WeightInfo for WeightInfo { fn on_initialize() -> Weight { - (12_000_000 as Weight) + (23_693_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn on_initialize_without_work() -> Weight { - (2_000_000 as Weight) + (3_316_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) } fn mint() -> Weight { - (137_000_000 as Weight) - .saturating_add(T::DbWeight::get().reads(17 as Weight)) - .saturating_add(T::DbWeight::get().writes(8 as Weight)) + (274_097_000 as Weight) + .saturating_add(T::DbWeight::get().reads(19 as Weight)) + .saturating_add(T::DbWeight::get().writes(9 as Weight)) } fn mint_for_requests() -> Weight { - (145_000_000 as Weight) - .saturating_add(T::DbWeight::get().reads(19 as Weight)) - .saturating_add(T::DbWeight::get().writes(8 as Weight)) + (287_530_000 as Weight) + .saturating_add(T::DbWeight::get().reads(21 as Weight)) + .saturating_add(T::DbWeight::get().writes(9 as Weight)) } fn set_total_staking_currency() -> Weight { - (12_000_000 as Weight) + (21_938_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn adjust_total_staking_currency() -> Weight { - (11_000_000 as Weight) + (21_729_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn adjust_available_staking_balance_with_no_matches() -> Weight { - (11_000_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + (35_462_000 as Weight) + .saturating_add(T::DbWeight::get().reads(4 as Weight)) + .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn set_minting_cap() -> Weight { - (10_000_000 as Weight) + (19_728_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn set_xcm_dest_weight() -> Weight { - (10_000_000 as Weight) + (19_019_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn request_redeem() -> Weight { - (73_000_000 as Weight) - .saturating_add(T::DbWeight::get().reads(7 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + (65_757_000 as Weight) + .saturating_add(T::DbWeight::get().reads(4 as Weight)) + .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn schedule_unbond() -> Weight { - (12_000_000 as Weight) + (23_258_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn replace_schedule_unbond() -> Weight { - (10_000_000 as Weight) + (20_333_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn set_staking_interest_rate_per_update() -> Weight { - (10_000_000 as Weight) + (18_762_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn redeem_with_available_staking_balance() -> Weight { - (7_000_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) + (10_751_000 as Weight) + .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn xcm_unbond() -> Weight { - (32_000_000 as Weight) + (60_300_000 as Weight) .saturating_add(T::DbWeight::get().reads(8 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } diff --git a/runtime/mandala/src/weights/module_homa_lite.rs b/runtime/mandala/src/weights/module_homa_lite.rs index 8a8a548871..6ba936dcfa 100644 --- a/runtime/mandala/src/weights/module_homa_lite.rs +++ b/runtime/mandala/src/weights/module_homa_lite.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for module_homa_lite //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2021-11-03, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-12-01, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 128 // Executed Command: @@ -48,72 +48,72 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl module_homa_lite::WeightInfo for WeightInfo { fn on_initialize() -> Weight { - (13_000_000 as Weight) + (23_411_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn on_initialize_without_work() -> Weight { - (2_000_000 as Weight) + (3_245_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) } fn mint() -> Weight { - (131_000_000 as Weight) - .saturating_add(T::DbWeight::get().reads(14 as Weight)) - .saturating_add(T::DbWeight::get().writes(7 as Weight)) + (260_301_000 as Weight) + .saturating_add(T::DbWeight::get().reads(16 as Weight)) + .saturating_add(T::DbWeight::get().writes(8 as Weight)) } fn mint_for_requests() -> Weight { - (320_000_000 as Weight) - .saturating_add(T::DbWeight::get().reads(30 as Weight)) - .saturating_add(T::DbWeight::get().writes(21 as Weight)) + (667_491_000 as Weight) + .saturating_add(T::DbWeight::get().reads(32 as Weight)) + .saturating_add(T::DbWeight::get().writes(22 as Weight)) } fn set_total_staking_currency() -> Weight { - (12_000_000 as Weight) + (21_648_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn adjust_total_staking_currency() -> Weight { - (11_000_000 as Weight) + (21_529_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn adjust_available_staking_balance_with_no_matches() -> Weight { - (11_000_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + (34_667_000 as Weight) + .saturating_add(T::DbWeight::get().reads(4 as Weight)) + .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn set_minting_cap() -> Weight { - (10_000_000 as Weight) + (19_290_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn set_xcm_dest_weight() -> Weight { - (10_000_000 as Weight) + (18_720_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn request_redeem() -> Weight { - (74_000_000 as Weight) - .saturating_add(T::DbWeight::get().reads(7 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + (66_866_000 as Weight) + .saturating_add(T::DbWeight::get().reads(4 as Weight)) + .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn schedule_unbond() -> Weight { - (12_000_000 as Weight) + (22_654_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn replace_schedule_unbond() -> Weight { - (10_000_000 as Weight) + (20_146_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn set_staking_interest_rate_per_update() -> Weight { - (10_000_000 as Weight) + (18_881_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn redeem_with_available_staking_balance() -> Weight { - (8_000_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) + (10_572_000 as Weight) + .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn xcm_unbond() -> Weight { - (22_000_000 as Weight) + (42_612_000 as Weight) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } From 9a27cfda85a07d7e238cc6a48b946cda0cd24614 Mon Sep 17 00:00:00 2001 From: zqhxuyuan Date: Wed, 1 Dec 2021 14:26:45 +0800 Subject: [PATCH 2/2] Xcm trap assets ed (#1654) * DropAssets trait impl * drop assets implements * clean * other runtime * refactor ExistentialDepositsForDropAssets * clippy and first time refactor * add sibling trap tests * move AcalaDropAssets to common * add docs --- Cargo.lock | 3 + runtime/acala/src/lib.rs | 10 +- runtime/common/Cargo.toml | 8 + runtime/common/src/lib.rs | 73 ++++++++ .../relaychain/kusama_cross_chain_transfer.rs | 177 +++++++++++++++++- runtime/integration-tests/src/setup.rs | 1 + runtime/karura/src/lib.rs | 10 +- runtime/mandala/src/lib.rs | 10 +- 8 files changed, 288 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ee465188e4..dbeee5fc20 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9805,6 +9805,9 @@ dependencies = [ "sp-runtime", "sp-std", "static_assertions", + "xcm", + "xcm-builder", + "xcm-executor", ] [[package]] diff --git a/runtime/acala/src/lib.rs b/runtime/acala/src/lib.rs index b60f4005e0..b21fadee77 100644 --- a/runtime/acala/src/lib.rs +++ b/runtime/acala/src/lib.rs @@ -103,6 +103,7 @@ pub use primitives::{ AuctionId, AuthoritysOriginId, Balance, BlockNumber, CurrencyId, DataProviderId, EraIndex, Hash, Moment, Nonce, ReserveIdentifier, Share, Signature, TokenSymbol, TradingPair, }; +use runtime_common::AcalaDropAssets; pub use runtime_common::{ cent, dollar, microcent, millicent, EnsureRootOrAllGeneralCouncil, EnsureRootOrAllTechnicalCommittee, EnsureRootOrHalfFinancialCouncil, EnsureRootOrHalfGeneralCouncil, EnsureRootOrHalfHomaCouncil, @@ -1452,7 +1453,14 @@ impl xcm_executor::Config for XcmConfig { type Weigher = FixedWeightBounds; type Trader = Trader; type ResponseHandler = PolkadotXcm; - type AssetTrap = PolkadotXcm; + type AssetTrap = AcalaDropAssets< + PolkadotXcm, + ToTreasury, + CurrencyIdConvert, + GetNativeCurrencyId, + NativeTokenExistentialDeposit, + ExistentialDeposits, + >; type AssetClaims = PolkadotXcm; type SubscriptionService = PolkadotXcm; } diff --git a/runtime/common/Cargo.toml b/runtime/common/Cargo.toml index fbf9bf7f69..b460c5c52d 100644 --- a/runtime/common/Cargo.toml +++ b/runtime/common/Cargo.toml @@ -38,6 +38,10 @@ module-transaction-payment = { path = "../../modules/transaction-payment", defau module-nft = { path = "../../modules/nft", default-features = false } module-dex = { path = "../../modules/dex", default-features = false } +xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.12", default-features = false } +xcm-executor = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.12", default-features = false } +xcm-builder = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.12", default-features = false } + [dev-dependencies] serde_json = "1.0.64" hex-literal = "0.3.1" @@ -87,6 +91,10 @@ std = [ "module-transaction-payment/std", "module-nft/std", "module-dex/std", + + "xcm/std", + "xcm-executor/std", + "xcm-builder/std", ] with-ethereum-compatibility = [ "module-evm/with-ethereum-compatibility", diff --git a/runtime/common/src/lib.rs b/runtime/common/src/lib.rs index 5c9552df42..39d4efd6e8 100644 --- a/runtime/common/src/lib.rs +++ b/runtime/common/src/lib.rs @@ -21,6 +21,7 @@ #![cfg_attr(not(feature = "std"), no_std)] use codec::{Decode, Encode, MaxEncodedLen}; +use frame_support::traits::Get; use frame_support::{ parameter_types, traits::Contains, @@ -49,6 +50,7 @@ mod homa; pub use homa::*; pub mod precompile; +use orml_traits::GetByKey; pub use precompile::{ AllPrecompiles, DexPrecompile, MultiCurrencyPrecompile, NFTPrecompile, OraclePrecompile, ScheduleCallPrecompile, StateRentPrecompile, @@ -57,6 +59,10 @@ pub use primitives::{ currency::{TokenInfo, ACA, AUSD, BNC, DOT, KAR, KSM, KUSD, LDOT, LKSM, PHA, RENBTC, VSKSM}, AccountId, }; +use sp_std::{marker::PhantomData, prelude::*}; +pub use xcm::latest::prelude::*; +pub use xcm_builder::TakeRevenue; +pub use xcm_executor::{traits::DropAssets, Assets}; pub type TimeStampedPrice = orml_oracle::TimestampedValue; @@ -331,6 +337,73 @@ pub enum RelayChainSubAccountId { HomaLite = 0, } +/// `DropAssets` implementation support asset amount lower thant ED handled by `TakeRevenue`. +/// +/// parameters type: +/// - `NC`: native currency_id type. +/// - `NB`: the ExistentialDeposit amount of native currency_id. +/// - `GK`: the ExistentialDeposit amount of tokens. +pub struct AcalaDropAssets(PhantomData<(X, T, C, NC, NB, GK)>); +impl DropAssets for AcalaDropAssets +where + X: DropAssets, + T: TakeRevenue, + C: Convert>, + NC: Get, + NB: Get, + GK: GetByKey, +{ + fn drop_assets(origin: &MultiLocation, assets: Assets) -> Weight { + let multi_assets: Vec = assets.into(); + let mut asset_traps: Vec = vec![]; + for asset in multi_assets { + if let MultiAsset { + id: Concrete(location), + fun: Fungible(amount), + } = asset.clone() + { + let currency_id = C::convert(location); + // burn asset(do nothing here) if convert result is None + if let Some(currency_id) = currency_id { + let ed = ExistentialDepositsForDropAssets::::get(¤cy_id); + if amount < ed { + T::take_revenue(asset); + } else { + asset_traps.push(asset); + } + } + } + } + if !asset_traps.is_empty() { + X::drop_assets(origin, asset_traps.into()); + } + 0 + } +} + +/// `ExistentialDeposit` for tokens, give priority to match native token, then handled by +/// `ExistentialDeposits`. +/// +/// parameters type: +/// - `NC`: native currency_id type. +/// - `NB`: the ExistentialDeposit amount of native currency_id. +/// - `GK`: the ExistentialDeposit amount of tokens. +pub struct ExistentialDepositsForDropAssets(PhantomData<(NC, NB, GK)>); +impl ExistentialDepositsForDropAssets +where + NC: Get, + NB: Get, + GK: GetByKey, +{ + fn get(currency_id: &CurrencyId) -> Balance { + if currency_id == &NC::get() { + NB::get() + } else { + GK::get(currency_id) + } + } +} + #[cfg(test)] mod tests { use super::*; diff --git a/runtime/integration-tests/src/relaychain/kusama_cross_chain_transfer.rs b/runtime/integration-tests/src/relaychain/kusama_cross_chain_transfer.rs index ec2f0770db..e63915eb3b 100644 --- a/runtime/integration-tests/src/relaychain/kusama_cross_chain_transfer.rs +++ b/runtime/integration-tests/src/relaychain/kusama_cross_chain_transfer.rs @@ -23,7 +23,7 @@ use crate::setup::*; use frame_support::assert_ok; -use karura_runtime::AssetRegistry; +use karura_runtime::{AssetRegistry, KaruraTreasuryAccount}; use module_asset_registry::AssetMetadata; use orml_traits::MultiCurrency; use xcm_emulator::TestExt; @@ -475,3 +475,178 @@ fn test_asset_registry_module() { ); }); } + +#[test] +fn trap_assets_larger_than_ed_works() { + TestNet::reset(); + + let mut kar_treasury_amount = 0; + let (ksm_asset_amount, kar_asset_amount) = (dollar(KSM), dollar(KAR)); + let trader_weight_to_treasury: u128 = 96_000_000; + + Karura::execute_with(|| { + assert_ok!(Tokens::deposit(KSM, &AccountId::from(DEFAULT), 100 * dollar(KSM))); + let _ = pallet_balances::Pallet::::deposit_creating(&AccountId::from(DEFAULT), 100 * dollar(KAR)); + + kar_treasury_amount = Currencies::free_balance(KAR, &KaruraTreasuryAccount::get()); + }); + + let assets: MultiAsset = (Parent, ksm_asset_amount).into(); + KusamaNet::execute_with(|| { + let xcm = vec![ + WithdrawAsset(assets.clone().into()), + BuyExecution { + fees: assets, + weight_limit: Limited(dollar(KSM) as u64), + }, + WithdrawAsset( + ( + (Parent, X2(Parachain(2000), GeneralKey(KAR.encode()))), + kar_asset_amount, + ) + .into(), + ), + ]; + assert_ok!(pallet_xcm::Pallet::::send_xcm( + Here, + Parachain(2000).into(), + Xcm(xcm), + )); + }); + Karura::execute_with(|| { + assert!(System::events() + .iter() + .any(|r| matches!(r.event, Event::PolkadotXcm(pallet_xcm::Event::AssetsTrapped(_, _, _))))); + + assert_eq!( + trader_weight_to_treasury, + Currencies::free_balance(KSM, &KaruraTreasuryAccount::get()) + ); + assert_eq!( + kar_treasury_amount, + Currencies::free_balance(KAR, &KaruraTreasuryAccount::get()) + ); + }); +} + +#[test] +fn trap_assets_lower_than_ed_works() { + TestNet::reset(); + + let mut kar_treasury_amount = 0; + let (ksm_asset_amount, kar_asset_amount) = (cent(KSM) / 100, cent(KAR)); + + Karura::execute_with(|| { + assert_ok!(Tokens::deposit(KSM, &AccountId::from(DEFAULT), dollar(KSM))); + let _ = pallet_balances::Pallet::::deposit_creating(&AccountId::from(DEFAULT), dollar(KAR)); + kar_treasury_amount = Currencies::free_balance(KAR, &KaruraTreasuryAccount::get()); + }); + + let assets: MultiAsset = (Parent, ksm_asset_amount).into(); + KusamaNet::execute_with(|| { + let xcm = vec![ + WithdrawAsset(assets.clone().into()), + BuyExecution { + fees: assets, + weight_limit: Limited(dollar(KSM) as u64), + }, + WithdrawAsset( + ( + (Parent, X2(Parachain(2000), GeneralKey(KAR.encode()))), + kar_asset_amount, + ) + .into(), + ), + // two asset left in holding register, they both lower than ED, so goes to treasury. + ]; + assert_ok!(pallet_xcm::Pallet::::send_xcm( + Here, + Parachain(2000).into(), + Xcm(xcm), + )); + }); + + Karura::execute_with(|| { + assert_eq!( + System::events() + .iter() + .find(|r| matches!(r.event, Event::PolkadotXcm(pallet_xcm::Event::AssetsTrapped(_, _, _)))), + None + ); + + assert_eq!( + ksm_asset_amount, + Currencies::free_balance(KSM, &KaruraTreasuryAccount::get()) + ); + assert_eq!( + kar_asset_amount, + Currencies::free_balance(KAR, &KaruraTreasuryAccount::get()) - kar_treasury_amount + ); + }); +} + +#[test] +fn sibling_trap_assets_works() { + TestNet::reset(); + + let mut kar_treasury_amount = 0; + let (bnc_asset_amount, kar_asset_amount) = (cent(BNC) / 10, cent(KAR)); + + fn sibling_account() -> AccountId { + use sp_runtime::traits::AccountIdConversion; + polkadot_parachain::primitives::Sibling::from(2001).into_account() + } + + Karura::execute_with(|| { + assert_ok!(Tokens::deposit(BNC, &sibling_account(), dollar(BNC))); + let _ = pallet_balances::Pallet::::deposit_creating(&sibling_account(), dollar(KAR)); + kar_treasury_amount = Currencies::free_balance(KAR, &KaruraTreasuryAccount::get()); + }); + + Sibling::execute_with(|| { + let assets: MultiAsset = ( + (Parent, X2(Parachain(2000), GeneralKey(KAR.encode()))), + kar_asset_amount, + ) + .into(); + let xcm = vec![ + WithdrawAsset(assets.clone().into()), + BuyExecution { + fees: assets, + weight_limit: Unlimited, + }, + WithdrawAsset( + ( + ( + Parent, + X2(Parachain(2001), GeneralKey(parachains::bifrost::BNC_KEY.to_vec())), + ), + bnc_asset_amount, + ) + .into(), + ), + ]; + assert_ok!(pallet_xcm::Pallet::::send_xcm( + Here, + (Parent, Parachain(2000)), + Xcm(xcm), + )); + }); + + Karura::execute_with(|| { + assert_eq!( + System::events() + .iter() + .find(|r| matches!(r.event, Event::PolkadotXcm(pallet_xcm::Event::AssetsTrapped(_, _, _)))), + None + ); + assert_eq!( + Currencies::free_balance(KAR, &KaruraTreasuryAccount::get()) - kar_treasury_amount, + kar_asset_amount + ); + assert_eq!( + Currencies::free_balance(BNC, &KaruraTreasuryAccount::get()), + bnc_asset_amount + ); + }); +} diff --git a/runtime/integration-tests/src/setup.rs b/runtime/integration-tests/src/setup.rs index e1dcc077e6..85b2ab32ba 100644 --- a/runtime/integration-tests/src/setup.rs +++ b/runtime/integration-tests/src/setup.rs @@ -151,6 +151,7 @@ const ORACLE3: [u8; 32] = [2u8; 32]; const ORACLE4: [u8; 32] = [3u8; 32]; const ORACLE5: [u8; 32] = [4u8; 32]; +pub const DEFAULT: [u8; 32] = [0u8; 32]; pub const ALICE: [u8; 32] = [4u8; 32]; pub const BOB: [u8; 32] = [5u8; 32]; pub const CHARLIE: [u8; 32] = [6u8; 32]; diff --git a/runtime/karura/src/lib.rs b/runtime/karura/src/lib.rs index 3009e2d0f5..24b902151d 100644 --- a/runtime/karura/src/lib.rs +++ b/runtime/karura/src/lib.rs @@ -104,6 +104,7 @@ pub use primitives::{ AuctionId, AuthoritysOriginId, Balance, BlockNumber, CurrencyId, DataProviderId, EraIndex, Hash, Moment, Nonce, ReserveIdentifier, Share, Signature, TokenSymbol, TradingPair, }; +use runtime_common::AcalaDropAssets; pub use runtime_common::{ cent, dollar, microcent, millicent, EnsureRootOrAllGeneralCouncil, EnsureRootOrAllTechnicalCommittee, EnsureRootOrHalfFinancialCouncil, EnsureRootOrHalfGeneralCouncil, EnsureRootOrHalfHomaCouncil, @@ -1515,7 +1516,14 @@ impl xcm_executor::Config for XcmConfig { type Weigher = FixedWeightBounds; type Trader = Trader; type ResponseHandler = PolkadotXcm; - type AssetTrap = PolkadotXcm; + type AssetTrap = AcalaDropAssets< + PolkadotXcm, + ToTreasury, + CurrencyIdConvert, + GetNativeCurrencyId, + NativeTokenExistentialDeposit, + ExistentialDeposits, + >; type AssetClaims = PolkadotXcm; type SubscriptionService = PolkadotXcm; } diff --git a/runtime/mandala/src/lib.rs b/runtime/mandala/src/lib.rs index 87e8f47382..8fa3614775 100644 --- a/runtime/mandala/src/lib.rs +++ b/runtime/mandala/src/lib.rs @@ -127,6 +127,7 @@ pub use runtime_common::{ /// Import the stable_asset pallet. pub use nutsfinance_stable_asset; +use runtime_common::AcalaDropAssets; mod authority; mod benchmarking; @@ -1680,7 +1681,14 @@ impl xcm_executor::Config for XcmConfig { // Only receiving DOT is handled, and all fees must be paid in DOT. type Trader = Trader; type ResponseHandler = (); // Don't handle responses for now. - type AssetTrap = (); + type AssetTrap = AcalaDropAssets< + PolkadotXcm, + ToTreasury, + CurrencyIdConvert, + GetNativeCurrencyId, + NativeTokenExistentialDeposit, + ExistentialDeposits, + >; type AssetClaims = (); type SubscriptionService = PolkadotXcm; }