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 · 1 comment
Open

dry_run_xcm support for BridgeHubs #5708

bkontur opened this issue Sep 13, 2024 · 1 comment
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?
@acatangiu
Copy link
Contributor

Live chains integration issue: polkadot-fellows/runtimes#477

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: In Progress
Development

No branches or pull requests

3 participants