open-web3-stack / open-runtime-module-library

Substrate Open Runtime Module Library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Transfer XCM successful, but still zero balance on target chain

Chralt98 opened this issue · comments

commented

Hey,

I looked into the code and found that you put in the fee, which is equal to the transfer amount here.

https://github.com/open-web3-stack/open-runtime-module-library/blame/7ecebeab7e3dbc2226ed58d32ee159271a8176ae/xtokens/src/lib.rs#L449

third parameter

I end up with the situation that the XCM transfer throws no error, but because the fee is equal to the transfer amount, I have no amount left on a sibling chain.

Could you please explain / reference how fees are paid for XCM transfers?

EDIT: Use env_logger, then initialise the env_logger in the test via let _ = env_logger::builder().is_test(true).try_init(); and "RUST=xcm=trace cargo test ..." and so you will get the XCM errors, if there are any on the sending chain or receiving chain. I got "Barrier blocked execution! Error: ProcessMessageError::Unsupported.", so I knew it had something to do with an invalid XCM format (maybe old xcm version?).

commented
#[test]
fn transfer_bli_to_sibling() {
	TestNet::reset();

	let alice_initial_balance = bli(10);
	let transfer_amount = bli(10);
	let bli_in_sibling = BAsset::Other(12);

	MyChain::execute_with(|| {
		assert_eq!(Balances::free_balance(alice()), alice_initial_balance);
		assert_eq!(AssetManager::free_balance(BAsset::Native, &alice()), alice_initial_balance);
		assert_eq!(Balances::free_balance(sibling_account()), 0);
	});

	Sibling::execute_with(|| {
		assert_eq!(Tokens::free_balance(bli_in_sibling, &bob()), 0);

		let custom_metadata = CustomMetadata {
			reference_price: 1_000_000_000,
			xcm: XcmMetadata {
				fee_factor: Some(123_999),
			}
		};
		// Register BLI as foreign asset in the sibling parachain
		let meta: AssetMetadata<Balance, CustomMetadata> = AssetMetadata {
			decimals: 12,
			name: "MyChainBLI".into(),
			symbol: "BLI".into(),
			existential_deposit: 1_000_000_000,
			location: Some(VersionedMultiLocation::V3(MultiLocation::new(
				1,
				X2(Parachain(MY_CHAIN_ID), general_key(MY_CHAIN_KEY)),
			))),
			additional: custom_metadata,
		};
		assert_ok!(AssetRegistry::register_asset(
			RuntimeOrigin::root(),
			meta,
			Some(bli_in_sibling)
		));
	});

	MyChain::execute_with(|| {
		assert_ok!(XTokens::transfer(
			RuntimeOrigin::signed(alice()),
			BAsset::Native,
			transfer_amount,
			Box::new(
				MultiLocation::new(
					1,
					X2(
						Parachain(PARA_ID_SIBLING),
						Junction::AccountId32 { network: None, id: bob().into() }
					)
				)
				.into()
			),
			WeightLimit::Limited(XcmWeight::from_parts(4_000_000_000, 0)),
		));

		// Confirm that Alice's balance is initial balance - amount transferred
		assert_eq!(Balances::free_balance(alice()), alice_initial_balance - transfer_amount);

		// Verify that the amount transferred is now part of the sibling account here
		assert_eq!(Balances::free_balance(sibling_account()), transfer_amount);
	});

	Sibling::execute_with(|| {
		let current_balance = Tokens::free_balance(bli_in_sibling, &bob());

		// Verify that BOB now has (amount transferred - fee)
		assert_eq!(current_balance, transfer_amount - fee(12));

		// Sanity check for the actual amount BOB ends up with
		assert_eq!(current_balance, 4991917600000);
	});
}

This is the test I run. At the end the current_balance is zero.

Take an example of transfer 5 DOT from chain A to chain B for use Alice.

There will be a standard tx fee on chain A on top of the 5 DOT.
5 DOT will be deducted from Alice on chain A.

Say fee is 1 DOT in here.
chain A will charge 1 DOT as fee, and transfer 4 DOT to chain B.
chain B will charge chain A some XCM fee, say 0.5 DOT. chain A charge 1 DOT from Alice. chain A will net + 0.5 DOT from fee.
Alice will receive 4 DOT on chain B.

Make the fee to 5 DOT instead.
chain A will charge 5 DOT as fee, and transfer 0 DOT to chain B.
chain B will charge chain A some XCM fee, say 0.5 DOT. chain A charge 5 DOT from Alice. chain A will net + 4.5 DOT from fee.
Alice will receive 0 DOT on chain B.

commented

Where I can set the fee? Seems like I accidentally set the XCM fee to high.. I assumed get_fee_per_second would be the place to look at, but with the debugger and a break point I won't get there...

pub struct FixedConversionRateProvider<AssetRegistry>(PhantomData<AssetRegistry>);

impl<
		AssetRegistry: orml_traits::asset_registry::Inspect<
			AssetId = BAsset,
			Balance = Balance,
			CustomMetadata = CustomMetadata,
		>,
	> orml_traits::FixedConversionRateProvider for FixedConversionRateProvider<AssetRegistry>
{
	fn get_fee_per_second(location: &MultiLocation) -> Option<u128> {
		let metadata = AssetRegistry::metadata_by_location(location)?;
		let default_per_second = default_per_second(metadata.decimals);

		if let Some(fee_factor) = metadata.additional.xcm.fee_factor {
			let base = 10u128.checked_pow(metadata.decimals)?;
			bmul(default_per_second, fee_factor, base)
		} else {
			Some(default_per_second)
		}
	}
}

you should dump the outgoing XCM on source chain and incoming XCM on dest chain and make sure they are expected first

commented
Bildschirm­foto 2023-07-08 um 07 42 47 Bildschirm­foto 2023-07-08 um 07 51 05

Is this helpful? I always see that the fees are as high as the transfer amount (5000000000000)

commented

This is a simpler example. Bob doesn't receive KSM on MyChain either..

#[test]
fn transfer_ksm_from_relay_chain() {
	let transfer_amount: Balance = ksm(1);

	KusamaNet::execute_with(|| {
		let alice_free_before = kusama_runtime::Balances::free_balance(alice());

		assert_ok!(kusama_runtime::XcmPallet::reserve_transfer_assets(
			kusama_runtime::RuntimeOrigin::signed(alice()),
			Box::new(Parachain(MY_CHAIN_ID).into_versioned()),
			Box::new(Junction::AccountId32 { network: None, id: bob().into() }.into_versioned()),
			Box::new((Here, transfer_amount).into()),
			0
		));

		assert_eq!(kusama_runtime::Balances::free_balance(alice()), alice_free_before - transfer_amount);
	});

	MyChain::execute_with(|| {
		assert_eq!(Tokens::free_balance(BAsset::KSM, &bob()), transfer_amount - relay_fee());
	});
}

polkadot-v0.9.42

can you have the xcm printed?

commented

How can I print the XCM ? I just use reserve_transfer_assets of pallet-xcm polkadot v0.9.42

commented

Bildschirm­foto 2023-07-08 um 12 16 52

Bildschirm­foto 2023-07-08 um 12 28 06

just modify the code to add some print and clean and build
but the easier way is use chopsticks and ump/dmp will be logged in console

commented

Those are all my XCM messages from RUST_LOG=xcm=trace:

[2023-07-08T10:53:12Z TRACE xcm::weight] FixedWeightBounds message: Xcm([ReserveAssetDeposited(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: Here }), fun: Fungible(1000000000000) }])), ClearOrigin, BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000) }, weight_limit: Limited(Weight { ref_time: 0, proof_size: 0 }) }, DepositAsset { assets: Wild(AllCounted(1)), beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: None, id: [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5] }) } }])
[2023-07-08T10:53:12Z TRACE xcm::weight] FixedWeightBounds message: Xcm([SetFeesMode { jit_withdraw: true }, TransferReserveAsset { assets: MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: Here }), fun: Fungible(1000000000000) }]), dest: MultiLocation { parents: 0, interior: X1(Parachain(2094)) }, xcm: Xcm([BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000) }, weight_limit: Limited(Weight { ref_time: 4000000000, proof_size: 262144 }) }, DepositAsset { assets: Wild(AllCounted(1)), beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: None, id: [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5] }) } }]) }])
[2023-07-08T10:53:12Z TRACE xcm::weight] WeightInfoBounds message: Xcm([SetFeesMode { jit_withdraw: true }, TransferReserveAsset { assets: MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: Here }), fun: Fungible(1000000000000) }]), dest: MultiLocation { parents: 0, interior: X1(Parachain(2094)) }, xcm: Xcm([BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000) }, weight_limit: Limited(Weight { ref_time: 4000000000, proof_size: 262144 }) }, DepositAsset { assets: Wild(AllCounted(1)), beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: None, id: [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5] }) } }]) }])
[2023-07-08T10:53:12Z TRACE xcm::execute_xcm_in_credit] origin: MultiLocation { parents: 0, interior: X1(AccountId32 { network: Some(Kusama), id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }) }, message: Xcm([SetFeesMode { jit_withdraw: true }, TransferReserveAsset { assets: MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: Here }), fun: Fungible(1000000000000) }]), dest: MultiLocation { parents: 0, interior: X1(Parachain(2094)) }, xcm: Xcm([BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000) }, weight_limit: Limited(Weight { ref_time: 4000000000, proof_size: 262144 }) }, DepositAsset { assets: Wild(AllCounted(1)), beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: None, id: [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5] }) } }]) }]), weight_credit: Weight { ref_time: 2000000000, proof_size: 131072 }
[2023-07-08T10:53:12Z TRACE xcm::barriers] TakeWeightCredit origin: MultiLocation { parents: 0, interior: X1(AccountId32 { network: Some(Kusama), id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }) }, instructions: [SetFeesMode { jit_withdraw: true }, TransferReserveAsset { assets: MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: Here }), fun: Fungible(1000000000000) }]), dest: MultiLocation { parents: 0, interior: X1(Parachain(2094)) }, xcm: Xcm([BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000) }, weight_limit: Limited(Weight { ref_time: 4000000000, proof_size: 262144 }) }, DepositAsset { assets: Wild(AllCounted(1)), beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: None, id: [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5] }) } }]) }], max_weight: Weight { ref_time: 754244000, proof_size: 0 }, weight_credit: Weight { ref_time: 2000000000, proof_size: 131072 }
[2023-07-08T10:53:12Z TRACE xcm::process] origin: Some(MultiLocation { parents: 0, interior: X1(AccountId32 { network: Some(Kusama), id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }) }), total_surplus/refunded: Weight { ref_time: 0, proof_size: 0 }/Weight { ref_time: 0, proof_size: 0 }, error_handler_weight: Weight { ref_time: 0, proof_size: 0 }
[2023-07-08T10:53:12Z TRACE xcm::process_instruction] === SetFeesMode { jit_withdraw: true }
[2023-07-08T10:53:12Z TRACE xcm::process_instruction] === TransferReserveAsset { assets: MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: Here }), fun: Fungible(1000000000000) }]), dest: MultiLocation { parents: 0, interior: X1(Parachain(2094)) }, xcm: Xcm([BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000) }, weight_limit: Limited(Weight { ref_time: 4000000000, proof_size: 262144 }) }, DepositAsset { assets: Wild(AllCounted(1)), beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: None, id: [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5] }) } }]) }
[2023-07-08T10:53:12Z TRACE xcm::currency_adapter] internal_transfer_asset asset: MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: Here }), fun: Fungible(1000000000000) }, from: MultiLocation { parents: 0, interior: X1(AccountId32 { network: Some(Kusama), id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }) }, to: MultiLocation { parents: 0, interior: X1(Parachain(2094)) }
[2023-07-08T10:53:12Z TRACE xcm::pallet_xcm::note_unknown_version] XCM version is unknown for destination: MultiLocation { parents: 0, interior: X1(Parachain(2094)) }
[2023-07-08T10:53:12Z TRACE xcm::execute_xcm_in_credit] result: Ok(())
[2023-07-08T10:53:13Z DEBUG xcm::execute_xcm] origin: MultiLocation { parents: 1, interior: Here }, message: Xcm([ReserveAssetDeposited(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000) }])), ClearOrigin, BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000) }, weight_limit: Limited(Weight { ref_time: 4000000000, proof_size: 65536 }) }, DepositAsset { assets: Wild(AllCounted(1)), beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: None, id: [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5] }) } }]), weight_limit: Weight { ref_time: 18446744073709551615, proof_size: 18446744073709551615 }
[2023-07-08T10:53:13Z TRACE xcm::weight] FixedWeightBounds message: Xcm([ReserveAssetDeposited(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000) }])), ClearOrigin, BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000) }, weight_limit: Limited(Weight { ref_time: 4000000000, proof_size: 65536 }) }, DepositAsset { assets: Wild(AllCounted(1)), beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: None, id: [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5] }) } }])
[2023-07-08T10:53:13Z TRACE xcm::execute_xcm_in_credit] origin: MultiLocation { parents: 1, interior: Here }, message: Xcm([ReserveAssetDeposited(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000) }])), ClearOrigin, BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000) }, weight_limit: Limited(Weight { ref_time: 4000000000, proof_size: 65536 }) }, DepositAsset { assets: Wild(AllCounted(1)), beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: None, id: [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5] }) } }]), weight_credit: Weight { ref_time: 0, proof_size: 0 }
[2023-07-08T10:53:13Z TRACE xcm::barriers] TakeWeightCredit origin: MultiLocation { parents: 1, interior: Here }, instructions: [ReserveAssetDeposited(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000) }])), ClearOrigin, BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000) }, weight_limit: Limited(Weight { ref_time: 4000000000, proof_size: 65536 }) }, DepositAsset { assets: Wild(AllCounted(1)), beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: None, id: [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5] }) } }], max_weight: Weight { ref_time: 4000000000, proof_size: 262144 }, weight_credit: Weight { ref_time: 0, proof_size: 0 }
[2023-07-08T10:53:13Z TRACE xcm::barriers] AllowTopLevelPaidExecutionFrom origin: MultiLocation { parents: 1, interior: Here }, instructions: [ReserveAssetDeposited(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000) }])), ClearOrigin, BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000) }, weight_limit: Limited(Weight { ref_time: 4000000000, proof_size: 65536 }) }, DepositAsset { assets: Wild(AllCounted(1)), beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: None, id: [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5] }) } }], max_weight: Weight { ref_time: 4000000000, proof_size: 262144 }, weight_credit: Weight { ref_time: 0, proof_size: 0 }
[2023-07-08T10:53:13Z TRACE xcm::barriers] AllowKnownQueryResponses origin: MultiLocation { parents: 1, interior: Here }, instructions: [ReserveAssetDeposited(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000) }])), ClearOrigin, BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000) }, weight_limit: Limited(Weight { ref_time: 4000000000, proof_size: 65536 }) }, DepositAsset { assets: Wild(AllCounted(1)), beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: None, id: [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5] }) } }], max_weight: Weight { ref_time: 4000000000, proof_size: 262144 }, weight_credit: Weight { ref_time: 0, proof_size: 0 }
[2023-07-08T10:53:13Z TRACE xcm::barriers] AllowSubscriptionsFrom origin: MultiLocation { parents: 1, interior: Here }, instructions: [ReserveAssetDeposited(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000) }])), ClearOrigin, BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000) }, weight_limit: Limited(Weight { ref_time: 4000000000, proof_size: 65536 }) }, DepositAsset { assets: Wild(AllCounted(1)), beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: None, id: [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5] }) } }], max_weight: Weight { ref_time: 4000000000, proof_size: 262144 }, weight_credit: Weight { ref_time: 0, proof_size: 0 }
[2023-07-08T10:53:13Z TRACE xcm::should_execute] did not pass barrier: origin: MultiLocation { parents: 1, interior: Here }, instructions: [ReserveAssetDeposited(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000) }])), ClearOrigin, BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000) }, weight_limit: Limited(Weight { ref_time: 4000000000, proof_size: 65536 }) }, DepositAsset { assets: Wild(AllCounted(1)), beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: None, id: [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5] }) } }], max_weight: Weight { ref_time: 4000000000, proof_size: 262144 }, weight_credit: Weight { ref_time: 0, proof_size: 0 }
[2023-07-08T10:53:13Z TRACE xcm::execute_xcm_in_credit] Barrier blocked execution! Error: ProcessMessageError::Unsupported. (origin: MultiLocation { parents: 1, interior: Here }, message: Xcm([ReserveAssetDeposited(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000) }])), ClearOrigin, BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000) }, weight_limit: Limited(Weight { ref_time: 4000000000, proof_size: 65536 }) }, DepositAsset { assets: Wild(AllCounted(1)), beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: None, id: [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5] }) } }]), weight_credit: Weight { ref_time: 0, proof_size: 0 })

Seems like the XCM version of the destination chain is too old? or too new for the KusamaNet chain?

Where is this specified?

commented

Found it at two places (relay chain and parachain test configuration)

	<pallet_xcm::GenesisConfig as GenesisBuild<Runtime>>::assimilate_storage(
		&pallet_xcm::GenesisConfig { safe_xcm_version: Some(3) },
		&mut t,
	)
	.unwrap();

Nice thanks! I bumped it from 2 to 3!

commented

@xlc

So, relay transfers (to and from) work now. But this returns this XCM output:

[2023-07-08T11:57:27Z TRACE xcm::weight] FixedWeightBounds message: Xcm([TransferReserveAsset { assets: MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: X2(Parachain(2094), GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(5000000000000) }]), dest: MultiLocation { parents: 1, interior: X1(Parachain(3000)) }, xcm: Xcm([BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: X2(Parachain(2094), GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(5000000000000) }, weight_limit: Limited(Weight { ref_time: 8000000000, proof_size: 0 }) }, DepositAsset { assets: Wild(AllCounted(1)), beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: None, id: [142, 175, 4, 21, 22, 135, 115, 99, 38, 201, 254, 161, 126, 37, 252, 82, 135, 97, 54, 147, 201, 18, 144, 156, 178, 38, 170, 71, 148, 242, 106, 72] }) } }]) }])
[2023-07-08T11:57:27Z TRACE xcm::weight] FixedWeightBounds message: Xcm([TransferReserveAsset { assets: MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: X2(Parachain(2094), GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(5000000000000) }]), dest: MultiLocation { parents: 1, interior: X1(Parachain(3000)) }, xcm: Xcm([BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: X2(Parachain(2094), GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(5000000000000) }, weight_limit: Limited(Weight { ref_time: 8000000000, proof_size: 0 }) }, DepositAsset { assets: Wild(AllCounted(1)), beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: None, id: [142, 175, 4, 21, 22, 135, 115, 99, 38, 201, 254, 161, 126, 37, 252, 82, 135, 97, 54, 147, 201, 18, 144, 156, 178, 38, 170, 71, 148, 242, 106, 72] }) } }]) }])
[2023-07-08T11:57:27Z TRACE xcm::execute_xcm_in_credit] origin: MultiLocation { parents: 0, interior: X1(AccountId32 { network: None, id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }) }, message: Xcm([TransferReserveAsset { assets: MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: X2(Parachain(2094), GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(5000000000000) }]), dest: MultiLocation { parents: 1, interior: X1(Parachain(3000)) }, xcm: Xcm([BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: X2(Parachain(2094), GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(5000000000000) }, weight_limit: Limited(Weight { ref_time: 8000000000, proof_size: 0 }) }, DepositAsset { assets: Wild(AllCounted(1)), beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: None, id: [142, 175, 4, 21, 22, 135, 115, 99, 38, 201, 254, 161, 126, 37, 252, 82, 135, 97, 54, 147, 201, 18, 144, 156, 178, 38, 170, 71, 148, 242, 106, 72] }) } }]) }]), weight_credit: Weight { ref_time: 1000000000, proof_size: 65536 }
[2023-07-08T11:57:27Z TRACE xcm::barriers] TakeWeightCredit origin: MultiLocation { parents: 0, interior: X1(AccountId32 { network: None, id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }) }, instructions: [TransferReserveAsset { assets: MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: X2(Parachain(2094), GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(5000000000000) }]), dest: MultiLocation { parents: 1, interior: X1(Parachain(3000)) }, xcm: Xcm([BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: X2(Parachain(2094), GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(5000000000000) }, weight_limit: Limited(Weight { ref_time: 8000000000, proof_size: 0 }) }, DepositAsset { assets: Wild(AllCounted(1)), beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: None, id: [142, 175, 4, 21, 22, 135, 115, 99, 38, 201, 254, 161, 126, 37, 252, 82, 135, 97, 54, 147, 201, 18, 144, 156, 178, 38, 170, 71, 148, 242, 106, 72] }) } }]) }], max_weight: Weight { ref_time: 1000000000, proof_size: 65536 }, weight_credit: Weight { ref_time: 1000000000, proof_size: 65536 }
[2023-07-08T11:57:27Z TRACE xcm::process] origin: Some(MultiLocation { parents: 0, interior: X1(AccountId32 { network: None, id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }) }), total_surplus/refunded: Weight { ref_time: 0, proof_size: 0 }/Weight { ref_time: 0, proof_size: 0 }, error_handler_weight: Weight { ref_time: 0, proof_size: 0 }
[2023-07-08T11:57:27Z TRACE xcm::process_instruction] === TransferReserveAsset { assets: MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: X2(Parachain(2094), GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(5000000000000) }]), dest: MultiLocation { parents: 1, interior: X1(Parachain(3000)) }, xcm: Xcm([BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: X2(Parachain(2094), GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(5000000000000) }, weight_limit: Limited(Weight { ref_time: 8000000000, proof_size: 0 }) }, DepositAsset { assets: Wild(AllCounted(1)), beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: None, id: [142, 175, 4, 21, 22, 135, 115, 99, 38, 201, 254, 161, 126, 37, 252, 82, 135, 97, 54, 147, 201, 18, 144, 156, 178, 38, 170, 71, 148, 242, 106, 72] }) } }]) }
[2023-07-08T11:57:27Z TRACE xcm::execute_xcm_in_credit] result: Ok(())
[2023-07-08T11:57:27Z TRACE xcm::origin_conversion] SovereignSignedViaLocation origin: MultiLocation { parents: 1, interior: X1(Parachain(2094)) }, kind: Superuser
[2023-07-08T11:57:27Z TRACE xcm::origin_conversion] RelayChainAsNative origin: MultiLocation { parents: 1, interior: X1(Parachain(2094)) }, kind: Superuser
[2023-07-08T11:57:27Z TRACE xcm::origin_conversion] SiblingParachainAsNative origin: MultiLocation { parents: 1, interior: X1(Parachain(2094)) }, kind: Superuser
[2023-07-08T11:57:27Z TRACE xcm::origin_conversion] SignedAccountId32AsNative origin: MultiLocation { parents: 1, interior: X1(Parachain(2094)) }, kind: Superuser
[2023-07-08T11:57:27Z TRACE xcm::convert_origin] could not convert: origin: MultiLocation { parents: 1, interior: X1(Parachain(2094)) }, kind: Superuser
[2023-07-08T11:57:27Z DEBUG xcm::execute_xcm] origin: MultiLocation { parents: 1, interior: X1(Parachain(2094)) }, message: Xcm([ReserveAssetDeposited(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: X2(Parachain(2094), GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(5000000000000) }])), ClearOrigin, BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: X2(Parachain(2094), GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(5000000000000) }, weight_limit: Limited(Weight { ref_time: 8000000000, proof_size: 0 }) }, DepositAsset { assets: Wild(AllCounted(1)), beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: None, id: [142, 175, 4, 21, 22, 135, 115, 99, 38, 201, 254, 161, 126, 37, 252, 82, 135, 97, 54, 147, 201, 18, 144, 156, 178, 38, 170, 71, 148, 242, 106, 72] }) } }]), weight_limit: Weight { ref_time: 6148914691236517205, proof_size: 6148914691236517205 }
[2023-07-08T11:57:27Z TRACE xcm::weight] FixedWeightBounds message: Xcm([ReserveAssetDeposited(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: X2(Parachain(2094), GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(5000000000000) }])), ClearOrigin, BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: X2(Parachain(2094), GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(5000000000000) }, weight_limit: Limited(Weight { ref_time: 8000000000, proof_size: 0 }) }, DepositAsset { assets: Wild(AllCounted(1)), beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: None, id: [142, 175, 4, 21, 22, 135, 115, 99, 38, 201, 254, 161, 126, 37, 252, 82, 135, 97, 54, 147, 201, 18, 144, 156, 178, 38, 170, 71, 148, 242, 106, 72] }) } }])
[2023-07-08T11:57:27Z TRACE xcm::execute_xcm_in_credit] origin: MultiLocation { parents: 1, interior: X1(Parachain(2094)) }, message: Xcm([ReserveAssetDeposited(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: X2(Parachain(2094), GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(5000000000000) }])), ClearOrigin, BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: X2(Parachain(2094), GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(5000000000000) }, weight_limit: Limited(Weight { ref_time: 8000000000, proof_size: 0 }) }, DepositAsset { assets: Wild(AllCounted(1)), beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: None, id: [142, 175, 4, 21, 22, 135, 115, 99, 38, 201, 254, 161, 126, 37, 252, 82, 135, 97, 54, 147, 201, 18, 144, 156, 178, 38, 170, 71, 148, 242, 106, 72] }) } }]), weight_credit: Weight { ref_time: 0, proof_size: 0 }
[2023-07-08T11:57:27Z TRACE xcm::barriers] TakeWeightCredit origin: MultiLocation { parents: 1, interior: X1(Parachain(2094)) }, instructions: [ReserveAssetDeposited(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: X2(Parachain(2094), GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(5000000000000) }])), ClearOrigin, BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: X2(Parachain(2094), GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(5000000000000) }, weight_limit: Limited(Weight { ref_time: 8000000000, proof_size: 0 }) }, DepositAsset { assets: Wild(AllCounted(1)), beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: None, id: [142, 175, 4, 21, 22, 135, 115, 99, 38, 201, 254, 161, 126, 37, 252, 82, 135, 97, 54, 147, 201, 18, 144, 156, 178, 38, 170, 71, 148, 242, 106, 72] }) } }], max_weight: Weight { ref_time: 4000000000, proof_size: 262144 }, weight_credit: Weight { ref_time: 0, proof_size: 0 }
[2023-07-08T11:57:27Z TRACE xcm::barriers] AllowTopLevelPaidExecutionFrom origin: MultiLocation { parents: 1, interior: X1(Parachain(2094)) }, instructions: [ReserveAssetDeposited(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: X2(Parachain(2094), GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(5000000000000) }])), ClearOrigin, BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: X2(Parachain(2094), GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(5000000000000) }, weight_limit: Limited(Weight { ref_time: 8000000000, proof_size: 0 }) }, DepositAsset { assets: Wild(AllCounted(1)), beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: None, id: [142, 175, 4, 21, 22, 135, 115, 99, 38, 201, 254, 161, 126, 37, 252, 82, 135, 97, 54, 147, 201, 18, 144, 156, 178, 38, 170, 71, 148, 242, 106, 72] }) } }], max_weight: Weight { ref_time: 4000000000, proof_size: 262144 }, weight_credit: Weight { ref_time: 0, proof_size: 0 }
[2023-07-08T11:57:27Z TRACE xcm::barriers] AllowKnownQueryResponses origin: MultiLocation { parents: 1, interior: X1(Parachain(2094)) }, instructions: [ReserveAssetDeposited(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: X2(Parachain(2094), GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(5000000000000) }])), ClearOrigin, BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: X2(Parachain(2094), GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(5000000000000) }, weight_limit: Limited(Weight { ref_time: 8000000000, proof_size: 0 }) }, DepositAsset { assets: Wild(AllCounted(1)), beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: None, id: [142, 175, 4, 21, 22, 135, 115, 99, 38, 201, 254, 161, 126, 37, 252, 82, 135, 97, 54, 147, 201, 18, 144, 156, 178, 38, 170, 71, 148, 242, 106, 72] }) } }], max_weight: Weight { ref_time: 4000000000, proof_size: 262144 }, weight_credit: Weight { ref_time: 0, proof_size: 0 }
[2023-07-08T11:57:27Z TRACE xcm::barriers] AllowSubscriptionsFrom origin: MultiLocation { parents: 1, interior: X1(Parachain(2094)) }, instructions: [ReserveAssetDeposited(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: X2(Parachain(2094), GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(5000000000000) }])), ClearOrigin, BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: X2(Parachain(2094), GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(5000000000000) }, weight_limit: Limited(Weight { ref_time: 8000000000, proof_size: 0 }) }, DepositAsset { assets: Wild(AllCounted(1)), beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: None, id: [142, 175, 4, 21, 22, 135, 115, 99, 38, 201, 254, 161, 126, 37, 252, 82, 135, 97, 54, 147, 201, 18, 144, 156, 178, 38, 170, 71, 148, 242, 106, 72] }) } }], max_weight: Weight { ref_time: 4000000000, proof_size: 262144 }, weight_credit: Weight { ref_time: 0, proof_size: 0 }
[2023-07-08T11:57:27Z TRACE xcm::should_execute] did not pass barrier: origin: MultiLocation { parents: 1, interior: X1(Parachain(2094)) }, instructions: [ReserveAssetDeposited(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: X2(Parachain(2094), GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(5000000000000) }])), ClearOrigin, BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: X2(Parachain(2094), GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(5000000000000) }, weight_limit: Limited(Weight { ref_time: 8000000000, proof_size: 0 }) }, DepositAsset { assets: Wild(AllCounted(1)), beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: None, id: [142, 175, 4, 21, 22, 135, 115, 99, 38, 201, 254, 161, 126, 37, 252, 82, 135, 97, 54, 147, 201, 18, 144, 156, 178, 38, 170, 71, 148, 242, 106, 72] }) } }], max_weight: Weight { ref_time: 4000000000, proof_size: 262144 }, weight_credit: Weight { ref_time: 0, proof_size: 0 }
[2023-07-08T11:57:27Z TRACE xcm::execute_xcm_in_credit] Barrier blocked execution! Error: ProcessMessageError::Unsupported. (origin: MultiLocation { parents: 1, interior: X1(Parachain(2094)) }, message: Xcm([ReserveAssetDeposited(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: X2(Parachain(2094), GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(5000000000000) }])), ClearOrigin, BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: X2(Parachain(2094), GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(5000000000000) }, weight_limit: Limited(Weight { ref_time: 8000000000, proof_size: 0 }) }, DepositAsset { assets: Wild(AllCounted(1)), beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: None, id: [142, 175, 4, 21, 22, 135, 115, 99, 38, 201, 254, 161, 126, 37, 252, 82, 135, 97, 54, 147, 201, 18, 144, 156, 178, 38, 170, 71, 148, 242, 106, 72] }) } }]), weight_credit: Weight { ref_time: 0, proof_size: 0 })

This line is pretty noticeable:

[2023-07-08T11:57:27Z TRACE xcm::convert_origin] could not convert: origin: MultiLocation { parents: 1, interior: X1(Parachain(2094)) }, kind: Superuser

Those are my conversions:

pub struct AssetConvert;

/// Convert our `Asset` type into its `MultiLocation` representation.
/// Other chains need to know how this conversion takes place in order to
/// handle it on their side.
impl sp_runtime::traits::Convert<BAsset, Option<MultiLocation>> for AssetConvert {
	fn convert(asset: BAsset) -> Option<MultiLocation> {
		match asset {
			BAsset::Native => Some(MultiLocation::new(
				1,
				X2(Parachain(ParachainInfo::parachain_id().into()), general_key(MY_CHAIN_KEY)),
			)),
			BAsset::KSM => Some(MultiLocation::parent()),
			BAsset::Other(_) => AssetRegistry::multilocation(&asset).ok()?,
		}
	}
}

/// Convert an incoming `MultiLocation` into a `Asset` if possible.
/// Here we need to know the canonical representation of all the tokens we handle in order to
/// correctly convert their `MultiLocation` representation into our internal `Asset` type.
impl xcm_executor::traits::Convert<MultiLocation, BAsset> for AssetConvert {
	fn convert(location: MultiLocation) -> Result<BAsset, MultiLocation> {
		if location == MultiLocation::parent() {
			return Ok(BAsset::KSM)
		}

		match location {
			MultiLocation { parents: 0, interior: X1(GeneralKey { data, length }) } => {
				let key = &data[..data.len().min(length as usize)];
				if key == MY_CHAIN_KEY {
					return Ok(BAsset::Native)
				}

				Err(location)
			},
			MultiLocation {
				parents: 1,
				interior: X2(Parachain(para_id), GeneralKey { data, length }),
			} => {
				let key = &data[..data.len().min(length as usize)];
				if para_id == u32::from(ParachainInfo::parachain_id()) && key == MY_CHAIN_KEY {
					return Ok(BAsset::Native)
				}

				AssetRegistry::location_to_asset_id(location).ok_or(location)
			},
			_ => AssetRegistry::location_to_asset_id(location).ok_or(location),
		}
	}
}

Do you have any idea on that one?

commented

The fix is the following:

Change From:

// One XCM operation is 1_000_000_000 weight - almost certainly a conservative estimate.
pub UnitWeightCost: Weight = Weight::from_parts(1_000_000_000, 64 * 1024);

Change To:

// One XCM operation is 200_000_000 weight, cross-chain transfer ~= 2x of transfer.
pub UnitWeightCost: XcmWeight = XcmWeight::from_parts(200_000_000, 0);

This might be helpful: https://substrate.stackexchange.com/questions/7969/default-proof-size-for-xcm-v2v3-compatibility