Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pallet-xcm: add new extrinsic for asset transfers using explicit XCM transfer types #3695

Merged
merged 37 commits into from
Apr 12, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
dda9308
pallet-xcm: deprecate unlimited_* weight extrinsics
acatangiu Mar 13, 2024
1db1cae
pallet-xcm: remove extrinsics guessed weight and rely on runtime benc…
acatangiu Mar 13, 2024
f5e1dfb
pallet-xcm: add new extrinsic for asset transfers using explicit reserve
acatangiu Mar 13, 2024
547eeee
add more trace logging to XCM transport
acatangiu Mar 13, 2024
c7ee1af
minor style fix
acatangiu Mar 13, 2024
ed77fde
integration-tests: add scenario for parachain sending asset over brid…
acatangiu Mar 13, 2024
a7a44c9
make penpal UniversalLocation configurable
acatangiu Mar 14, 2024
ffa6250
penpal: charge XCM delivery fees for accurate real-world testing
acatangiu Mar 22, 2024
4afba95
integration-tests: fix tests for penpal charging delivery fees
acatangiu Mar 22, 2024
210cdd2
Merge branch 'master' of github.com:paritytech/polkadot-sdk into tran…
acatangiu Mar 23, 2024
c918bea
fix test
acatangiu Mar 23, 2024
3db344b
add prdoc
acatangiu Mar 25, 2024
10d2c40
fix clippy
acatangiu Mar 25, 2024
5b48155
Merge branch 'master' of github.com:paritytech/polkadot-sdk into tran…
acatangiu Mar 27, 2024
dbe453d
add test for westend->rococo direction
acatangiu Mar 27, 2024
42e4041
nit
acatangiu Mar 27, 2024
e794df3
Merge branch 'master' of github.com:paritytech/polkadot-sdk into tran…
acatangiu Apr 1, 2024
81dc911
pallet-xcm: specify explicit transfer type
acatangiu Apr 3, 2024
e1dbf7a
add more tests
acatangiu Apr 3, 2024
ef83eab
fix prdoc
acatangiu Apr 4, 2024
a2b8708
Merge branch 'master' of github.com:paritytech/polkadot-sdk into tran…
acatangiu Apr 4, 2024
4250692
refactor tests
acatangiu Apr 4, 2024
888d403
even more tests
acatangiu Apr 4, 2024
1c86e6e
another test
acatangiu Apr 4, 2024
b82d0b9
add teleport test as well
acatangiu Apr 4, 2024
f4e88da
rename xt and update docs
acatangiu Apr 4, 2024
4f2381c
fix weights
acatangiu Apr 4, 2024
36af01f
add tests to westend
acatangiu Apr 4, 2024
bd9233a
Merge branch 'master' of github.com:paritytech/polkadot-sdk into tran…
acatangiu Apr 4, 2024
9c7bd39
remove leftover comment
acatangiu Apr 4, 2024
adf5128
Apply suggestions from code review
acatangiu Apr 11, 2024
1347f0b
fix logs
acatangiu Apr 11, 2024
e3acff2
fix api
acatangiu Apr 11, 2024
4a44194
Merge branch 'master' into transfer-using-explicit-reserve
acatangiu Apr 11, 2024
0d407eb
Update polkadot/xcm/pallet-xcm/src/lib.rs
acatangiu Apr 12, 2024
22093d0
".git/.scripts/commands/fmt/fmt.sh"
Apr 12, 2024
a673792
Merge branch 'master' into transfer-using-explicit-reserve
acatangiu Apr 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix weights
  • Loading branch information
acatangiu committed Apr 4, 2024
commit 4f2381cad72e8b64482f7c79a23a4f4064eeaf47
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ use core::marker::PhantomData;
/// Weight functions for `pallet_xcm`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
fn transfer_assets_using_type() -> Weight {
// TODO: benchmark
Weight::from_parts(0, 0)
}
/// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0)
/// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ use core::marker::PhantomData;
/// Weight functions for `pallet_xcm`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
fn transfer_assets_using_type() -> Weight {
// TODO: benchmark
Weight::from_parts(0, 0)
}
/// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0)
/// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ use core::marker::PhantomData;
/// Weight functions for `pallet_xcm`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
fn transfer_assets_using_type() -> Weight {
// TODO: benchmark
Weight::from_parts(0, 0)
}
/// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0)
/// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ use core::marker::PhantomData;
/// Weight functions for `pallet_xcm`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
fn transfer_assets_using_type() -> Weight {
// TODO: benchmark
Weight::from_parts(0, 0)
}
/// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0)
/// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ use core::marker::PhantomData;
/// Weight functions for `pallet_xcm`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
fn transfer_assets_using_type() -> Weight {
// TODO: benchmark
Weight::from_parts(0, 0)
}
/// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0)
/// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ use core::marker::PhantomData;
/// Weight functions for `pallet_xcm`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
fn transfer_assets_using_type() -> Weight {
// TODO: benchmark
Weight::from_parts(0, 0)
}
/// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0)
/// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ use core::marker::PhantomData;
/// Weight functions for `pallet_xcm`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
fn transfer_assets_using_type() -> Weight {
// TODO: benchmark
Weight::from_parts(0, 0)
}
/// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0)
/// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ use core::marker::PhantomData;
/// Weight functions for `pallet_xcm`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
fn transfer_assets_using_type() -> Weight {
// TODO: benchmark
Weight::from_parts(0, 0)
}
/// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0)
/// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ use core::marker::PhantomData;
/// Weight functions for `pallet_xcm`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
fn transfer_assets_using_type() -> Weight {
// TODO: benchmark
Weight::from_parts(0, 0)
}
/// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0)
/// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1)
Expand Down
4 changes: 0 additions & 4 deletions polkadot/runtime/rococo/src/weights/pallet_xcm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -372,8 +372,4 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
fn transfer_assets_using_type() -> Weight {
// TODO: benchmark
Weight::from_parts(0, 0)
}
}
4 changes: 0 additions & 4 deletions polkadot/runtime/westend/src/weights/pallet_xcm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ use core::marker::PhantomData;
/// Weight functions for `pallet_xcm`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
fn transfer_assets_using_type() -> Weight {
// TODO: benchmark
Weight::from_parts(0, 0)
}
/// Storage: `Dmp::DeliveryFeeFactor` (r:1 w:0)
/// Proof: `Dmp::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `XcmPallet::SupportedVersion` (r:1 w:0)
Expand Down
6 changes: 1 addition & 5 deletions polkadot/xcm/pallet-xcm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ pub trait WeightInfo {
fn claim_assets() -> Weight;
fn execute_blob() -> Weight;
fn send_blob() -> Weight;
fn transfer_assets_using_type() -> Weight;
}

/// fallback implementation
Expand Down Expand Up @@ -182,10 +181,6 @@ impl WeightInfo for TestWeightInfo {
fn send_blob() -> Weight {
Weight::from_parts(100_000_000, 0)
}

fn transfer_assets_using_type() -> Weight {
Weight::from_parts(100_000_000, 0)
}
}

#[frame_support::pallet]
Expand Down Expand Up @@ -1446,6 +1441,7 @@ pub mod pallet {
/// - `fees_transfer_type`: The XCM `TransferType` used to transfer the `fees` assets.
/// - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase.
#[pallet::call_index(15)]
#[pallet::weight(T::WeightInfo::transfer_assets())]
pub fn transfer_assets_using_type(
origin: OriginFor<T>,
dest: Box<VersionedLocation>,
Expand Down