Implement AliasOrigin processing in XCVM (#7245)

* Implement AliasOrigin processing in XCVM

* add builder types and first test

* switch to more general builder types

* clone target for RemovePrefixAccountId32

* change builder types

* change AliasForeignAccountId32 and add test for AliasCase

* add Aliasers type to xcm configs

* add benchmark

* benchmark fix

* add benchmark function for runtimes

* fix alias_origin result types

* fix benchmark test

* add runtime-benchmarks feature in pallet-xcm-benchmarks

* fmt

* remove AliasCase, add test and fmt

* address feedback

* ".git/.scripts/commands/bench/bench.sh" xcm kusama pallet_xcm_benchmarks::generic

* ".git/.scripts/commands/bench/bench.sh" xcm westend pallet_xcm_benchmarks::generic

* ".git/.scripts/commands/bench/bench.sh" xcm rococo pallet_xcm_benchmarks::generic

* address feedback

* lock

* ".git/.scripts/commands/bench/bench.sh" xcm kusama pallet_xcm_benchmarks::generic

* ".git/.scripts/commands/bench/bench.sh" xcm westend pallet_xcm_benchmarks::generic

* ".git/.scripts/commands/bench/bench.sh" xcm rococo pallet_xcm_benchmarks::generic

* change doc

* fmt

---------

Co-authored-by: Just van Stam <just.van.stam@gmail.com>
Co-authored-by: Just van Stam <vstam1@users.noreply.github.com>
Co-authored-by: command-bot <>
This commit is contained in:
Keith Yeung
2023-06-05 22:39:01 +08:00
committed by GitHub
parent c8f9b1b7a0
commit f2fe05a757
29 changed files with 397 additions and 184 deletions
@@ -80,6 +80,11 @@ pub mod pallet {
/// If set to `Err`, benchmarks which rely on `export_message` will be skipped.
fn export_message_origin_and_destination(
) -> Result<(MultiLocation, NetworkId, InteriorMultiLocation), BenchmarkError>;
/// A `(MultiLocation, MultiLocation)` that is one of the `Aliasers` configured by the XCM executor.
///
/// If set to `Err`, benchmarks which rely on a universal alias will be skipped.
fn alias_origin() -> Result<(MultiLocation, MultiLocation), BenchmarkError>;
}
#[pallet::pallet]