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

bridge-hub-router should not throw xcm DestinationUnsupported error #4133

Closed
2 tasks done
yrong opened this issue Apr 15, 2024 · 3 comments · Fixed by #4162
Closed
2 tasks done

bridge-hub-router should not throw xcm DestinationUnsupported error #4133

yrong opened this issue Apr 15, 2024 · 3 comments · Fixed by #4162
Assignees
Labels
I2-bug The node fails to follow expected behavior. I10-unconfirmed Issue might be valid, but it's not yet known.

Comments

@yrong
Copy link
Contributor

yrong commented Apr 15, 2024

Is there an existing issue?

  • I have searched the existing issues

Experiencing problems? Have you tried our Stack Exchange first?

  • This is not a support question.

Description of bug

bridge-hub-router pallet should not throw DestinationUnsupported error when it can't process the message to Ethereum, context and more details in Snowfork#140

Steps to reproduce

No response

@yrong yrong added I10-unconfirmed Issue might be valid, but it's not yet known. I2-bug The node fails to follow expected behavior. labels Apr 15, 2024
@yrong
Copy link
Contributor Author

yrong commented Apr 15, 2024

Context

Snowfork#140 (comment)

@yrong yrong changed the title bridge-hub-router should not throws DestinationUnsupported error bridge-hub-router should not throws xcm DestinationUnsupported error Apr 15, 2024
@yrong yrong changed the title bridge-hub-router should not throws xcm DestinationUnsupported error bridge-hub-router should not throw xcm DestinationUnsupported error Apr 15, 2024
@bkontur bkontur self-assigned this Apr 16, 2024
@bkontur
Copy link
Contributor

bkontur commented Apr 16, 2024

Thank you for finding this. DestinationUnsupported is ok for this case, but the validation is on the wrong place :), I prepared fix here: #4162 but I want to add more tests tomorrow before merging.

Everywhere the checking version or wrap_version for destination is performed, we use DestinationUnsupported, which means:

        /// The given message cannot be translated into a format that the destination can be expected
	/// to interpret.
	DestinationUnsupported,

which is exactly the case here. E.g:
XcmpQueue - https://github.com/paritytech/polkadot-sdk/blob/master/cumulus/pallets/xcmp-queue/src/lib.rs#L917-L918
ParentAsUmp - https://github.com/paritytech/polkadot-sdk/blob/master/cumulus/primitives/utility/src/lib.rs#L71
ChildParachainRouter - https://github.com/paritytech/polkadot-sdk/blob/master/polkadot/runtime/common/src/xcm_sender.rs#L122

And if you check all those implementations, everywhere there is a check for reachable location, if router cannot reach the particular destination or location pattern, then it returns NotApplicable and gives opportunity to the other routers in tuple.

        /// The message and destination combination was not recognized as being reachable.
	///
	/// This is not considered fatal: if there are alternative transport routes available, then
	/// they may be attempted.
	NotApplicable,

So the bridge-hub-router is designed exactly to be aligned with the other routers.

@yrong
Copy link
Contributor Author

yrong commented Apr 17, 2024

Cool! Thanks for confirming that.

github-merge-queue bot pushed a commit that referenced this issue Apr 17, 2024
…tApplicable` (#4162)

This PR adjusts `xcm-bridge-hub-router` to be usable in the chain of
routers when a `NotApplicable` error occurs.

Closes: #4133

## TODO

- [ ] backport to polkadot-sdk 1.10.0 crates.io release
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I2-bug The node fails to follow expected behavior. I10-unconfirmed Issue might be valid, but it's not yet known.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants