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

dry_run_xcm support for BridgeHubs #5708

Open
bkontur opened this issue Sep 13, 2024 · 0 comments
Open

dry_run_xcm support for BridgeHubs #5708

bkontur opened this issue Sep 13, 2024 · 0 comments
Assignees
Labels
T15-bridges This PR/Issue is related to bridges.

Comments

@bkontur
Copy link
Contributor

bkontur commented Sep 13, 2024

Basically, the source can dry run some scenario, which results as a xcm with ExportMessage instruction, so we should be able to dry run this XCM on BridgeHub.

Some hints:

  • implement InspectMessageQueues for pallet_xcm_bridge_hub or pallet-bridge-messages to get messages from OutboundLanes where the OutboundPayload is encoded BridgeMessage
  • then add the instance to the tuple with xcm_config::Router on the bridge hub:
    fn dry_run_xcm(origin_location: VersionedLocation, xcm: VersionedXcm<RuntimeCall>) -> Result<XcmDryRunEffects<RuntimeEvent>, XcmDryRunApiError> {
        PolkadotXcm::dry_run_xcm::<Runtime, (xcm_config::XcmRouter, XcmOverBridgeHubWestend), RuntimeCall,    xcm_config::XcmConfig>(origin_location, xcm)
    }
    or
    
    fn dry_run_xcm(origin_location: VersionedLocation, xcm: VersionedXcm<RuntimeCall>) -> Result<XcmDryRunEffects<RuntimeEvent>, XcmDryRunApiError> {
        PolkadotXcm::dry_run_xcm::<Runtime, (xcm_config::XcmRouter, BridgeWestendMessages), RuntimeCall,    xcm_config::XcmConfig>(origin_location, xcm)
    }
    
  • dry_xcm_run on the bridged BridgeHub is quesionable how to do, because there could possibly be DescendOrigin added here when dispatching
    • I think with Chopsticks we have the same problem
  • what about Ethereum bridge?
@bkontur bkontur added the T15-bridges This PR/Issue is related to bridges. label Sep 13, 2024
@bkontur bkontur assigned bkontur and franciscoaguirre and unassigned bkontur Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T15-bridges This PR/Issue is related to bridges.
Projects
Status: Todo
Development

No branches or pull requests

2 participants