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: added useful error logs (#2408) #4982

Open
wants to merge 21 commits into
base: master
Choose a base branch
from

Conversation

ayevbeosa
Copy link

@ayevbeosa ayevbeosa commented Jul 9, 2024

Added error logs in pallet-xcm to help in debugging, fixes #2408

TODO

  • change log::error to tracing::error format for xcm-executor
  • check existing logs, e.g. this one can be extended with more info tracing::error!(target: "xcm::reanchor", ?error, "Failed reanchoring with error");

@ayevbeosa ayevbeosa requested a review from a team as a code owner July 9, 2024 08:34
@acatangiu
Copy link
Contributor

@ayevbeosa this is good, but does not yet fix #2408 - this PR only covers pallet-xcm right now - #2408 is referring to XCM errors across the whole stack.
A good starting point is to do the same for everything under https://github.com/paritytech/polkadot-sdk/tree/master/polkadot/xcm.

@ayevbeosa
Copy link
Author

A good starting point is to do the same for everything under https://github.com/paritytech/polkadot-sdk/tree/master/polkadot/xcm.

Thanks @acatangiu, is it okay to do everything in this PR or I should break it in parts?

@acatangiu
Copy link
Contributor

I think you can do it in same PR since they're not that many changes

@github-actions github-actions bot requested a review from acatangiu July 11, 2024 06:36
Copy link

Review required! Latest push from author must always be reviewed

polkadot/xcm/xcm-executor/src/lib.rs Outdated Show resolved Hide resolved
polkadot/xcm/xcm-executor/src/lib.rs Outdated Show resolved Hide resolved
polkadot/xcm/xcm-executor/src/lib.rs Outdated Show resolved Hide resolved
polkadot/xcm/xcm-executor/src/lib.rs Outdated Show resolved Hide resolved
Co-authored-by: Francisco Aguirre <[email protected]>
polkadot/xcm/xcm-executor/src/lib.rs Outdated Show resolved Hide resolved
polkadot/xcm/xcm-executor/src/lib.rs Outdated Show resolved Hide resolved
@acatangiu
Copy link
Contributor

@ayevbeosa do you still plan on getting this over the finish line?

@ayevbeosa
Copy link
Author

@ayevbeosa do you still plan on getting this over the finish line?

Sure! Asides resolving the merge conflict, is there anything else left?

@acatangiu
Copy link
Contributor

Sure! Asides resolving the merge conflict, is there anything else left?

Nope, merge master and have CI passing and we'll merge it.

@bkontur bkontur added the R0-silent Changes should not be mentioned in any release notes label Oct 3, 2024
@bkontur bkontur added the T6-XCM This PR/Issue is related to XCM. label Oct 3, 2024
@github-actions github-actions bot requested a review from bkontur October 4, 2024 07:05
@@ -1087,7 +1095,10 @@ impl<Config: config::Config> XcmExecutor<Config> {
tracing::trace!(target: "xcm::executor::BuyExecution", asset_used_for_fees = ?self.asset_used_for_fees);
// pay for `weight` using up to `fees` of the holding register.
let max_fee =
self.holding.try_take(fees.into()).map_err(|_| XcmError::NotHoldingFees)?;
self.holding.try_take(fees.clone().into()).map_err(|e| {
log::error!(target: "xcm::process_instruction::buy_execution", "Failed to take fees {fees:?} from holding with error: {e:?}");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ayevbeosa can you please:

  • change all log::error to tracing::error format for xcm-executor
  • check existing logs, e.g. this one can be extended with more info tracing::error!(target: "xcm::reanchor", ?error, "Failed reanchoring with error");

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will get on it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
R0-silent Changes should not be mentioned in any release notes T6-XCM This PR/Issue is related to XCM.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[XCM] don't ignore errors
4 participants