Skip to content

Commit

Permalink
Merge branch 'stable2407' into backport-6506-to-stable2407
Browse files Browse the repository at this point in the history
  • Loading branch information
EgorPopelyaev authored Dec 3, 2024
2 parents f164b9d + f5245c8 commit c683dc9
Show file tree
Hide file tree
Showing 10 changed files with 260 additions and 57 deletions.
2 changes: 1 addition & 1 deletion polkadot/grafana/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,4 @@ and issue statement or initiate dispute.
- **Assignment delay tranches**. Approval voting is designed such that validators assigned to check a specific
candidate are split up into equal delay tranches (0.5 seconds each). All validators checks are ordered by the delay
tranche index. Early tranches of validators have the opportunity to check the candidate first before later tranches
that act as as backups in case of no shows.
that act as backups in case of no shows.
2 changes: 1 addition & 1 deletion polkadot/grafana/parachains/status.json
Original file line number Diff line number Diff line change
Expand Up @@ -1405,7 +1405,7 @@
"type": "prometheus",
"uid": "$data_source"
},
"description": "Approval voting requires that validators which are assigned to check a specific \ncandidate are split up into delay tranches (0.5s each). Then, all validators checks are ordered by the delay \ntranche index. Early tranches of validators will check the candidate first and later tranches act as as backups in case of no shows.",
"description": "Approval voting requires that validators which are assigned to check a specific \ncandidate are split up into delay tranches (0.5s each). Then, all validators checks are ordered by the delay \ntranche index. Early tranches of validators will check the candidate first and later tranches act as backups in case of no shows.",
"gridPos": {
"h": 9,
"w": 18,
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
4 changes: 2 additions & 2 deletions polkadot/xcm/src/v3/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -535,13 +535,13 @@ impl SendXcm for Tuple {
}

/// Convenience function for using a `SendXcm` implementation. Just interprets the `dest` and wraps
/// both in `Some` before passing them as as mutable references into `T::send_xcm`.
/// both in `Some` before passing them as mutable references into `T::send_xcm`.
pub fn validate_send<T: SendXcm>(dest: MultiLocation, msg: Xcm<()>) -> SendResult<T::Ticket> {
T::validate(&mut Some(dest), &mut Some(msg))
}

/// Convenience function for using a `SendXcm` implementation. Just interprets the `dest` and wraps
/// both in `Some` before passing them as as mutable references into `T::send_xcm`.
/// both in `Some` before passing them as mutable references into `T::send_xcm`.
///
/// Returns either `Ok` with the price of the delivery, or `Err` with the reason why the message
/// could not be sent.
Expand Down
4 changes: 2 additions & 2 deletions polkadot/xcm/src/v4/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -289,13 +289,13 @@ impl SendXcm for Tuple {
}

/// Convenience function for using a `SendXcm` implementation. Just interprets the `dest` and wraps
/// both in `Some` before passing them as as mutable references into `T::send_xcm`.
/// both in `Some` before passing them as mutable references into `T::send_xcm`.
pub fn validate_send<T: SendXcm>(dest: Location, msg: Xcm<()>) -> SendResult<T::Ticket> {
T::validate(&mut Some(dest), &mut Some(msg))
}

/// Convenience function for using a `SendXcm` implementation. Just interprets the `dest` and wraps
/// both in `Some` before passing them as as mutable references into `T::send_xcm`.
/// both in `Some` before passing them as mutable references into `T::send_xcm`.
///
/// Returns either `Ok` with the price of the delivery, or `Err` with the reason why the message
/// could not be sent.
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

0 comments on commit c683dc9

Please sign in to comment.