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

[stable2409] Backport #6579 #6635

Merged
merged 4 commits into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ mod imports {
pub use asset_test_utils::xcm_helpers;
pub use emulated_integration_tests_common::{
accounts::DUMMY_EMPTY,
get_account_id_from_seed,
test_parachain_is_trusted_teleporter, test_parachain_is_trusted_teleporter_for_relay,
test_relay_is_trusted_teleporter, test_xcm_fee_querying_apis_work_for_asset_hub,
get_account_id_from_seed, test_parachain_is_trusted_teleporter,
test_parachain_is_trusted_teleporter_for_relay, test_relay_is_trusted_teleporter,
test_xcm_fee_querying_apis_work_for_asset_hub,
xcm_emulator::{
assert_expected_events, bx, Chain, Parachain as Para, RelayChain as Relay, Test,
TestArgs, TestContext, TestExt,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ mod imports {
pub use asset_test_utils::xcm_helpers;
pub use emulated_integration_tests_common::{
accounts::DUMMY_EMPTY,
get_account_id_from_seed,
test_parachain_is_trusted_teleporter, test_parachain_is_trusted_teleporter_for_relay,
test_relay_is_trusted_teleporter, test_xcm_fee_querying_apis_work_for_asset_hub,
get_account_id_from_seed, test_parachain_is_trusted_teleporter,
test_parachain_is_trusted_teleporter_for_relay, test_relay_is_trusted_teleporter,
test_xcm_fee_querying_apis_work_for_asset_hub,
xcm_emulator::{
assert_expected_events, bx, Chain, Parachain as Para, RelayChain as Relay, Test,
TestArgs, TestContext, TestExt,
Expand Down
16 changes: 13 additions & 3 deletions polkadot/xcm/pallet-xcm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,10 @@ pub mod pallet {
let message: Xcm<()> = (*message).try_into().map_err(|()| Error::<T>::BadVersion)?;

let message_id = Self::send_xcm(interior, dest.clone(), message.clone())
.map_err(Error::<T>::from)?;
.map_err(|error| {
tracing::error!(target: "xcm::pallet_xcm::send", ?error, ?dest, ?message, "XCM send failed with error");
Error::<T>::from(error)
})?;
let e = Event::Sent { origin: origin_location, destination: dest, message, message_id };
Self::deposit_event(e);
Ok(message_id)
Expand Down Expand Up @@ -1805,7 +1808,10 @@ impl<T: Config> Pallet<T> {

if let Some(remote_xcm) = remote_xcm {
let (ticket, price) = validate_send::<T::XcmRouter>(dest.clone(), remote_xcm.clone())
.map_err(Error::<T>::from)?;
.map_err(|error| {
tracing::error!(target: "xcm::pallet_xcm::execute_xcm_transfer", ?error, ?dest, ?remote_xcm, "XCM validate_send failed with error");
Error::<T>::from(error)
})?;
if origin != Here.into_location() {
Self::charge_fees(origin.clone(), price).map_err(|error| {
log::error!(
Expand All @@ -1815,7 +1821,11 @@ impl<T: Config> Pallet<T> {
Error::<T>::FeesNotMet
})?;
}
let message_id = T::XcmRouter::deliver(ticket).map_err(Error::<T>::from)?;
let message_id = T::XcmRouter::deliver(ticket)
.map_err(|error| {
tracing::error!(target: "xcm::pallet_xcm::execute_xcm_transfer", ?error, ?dest, ?remote_xcm, "XCM deliver failed with error");
Error::<T>::from(error)
})?;

let e = Event::Sent { origin, destination: dest, message: remote_xcm, message_id };
Self::deposit_event(e);
Expand Down
2 changes: 1 addition & 1 deletion polkadot/xcm/xcm-builder/src/process_xcm_message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ impl<
let message = Xcm::<Call>::try_from(versioned_message).map_err(|_| {
log::trace!(
target: LOG_TARGET,
"Failed to convert `VersionedXcm` into `XcmV3`.",
"Failed to convert `VersionedXcm` into `xcm::prelude::Xcm`!",
);

ProcessMessageError::Unsupported
Expand Down
Loading