Skip to content

WIP: Allow dynamic fees setup for xcm-bridge#9260

Merged
bkontur merged 3 commits intobko-bridges-congestionfrom
bko-bridges-congestion-dynfee
Jul 18, 2025
Merged

WIP: Allow dynamic fees setup for xcm-bridge#9260
bkontur merged 3 commits intobko-bridges-congestionfrom
bko-bridges-congestion-dynfee

Conversation

@bkontur
Copy link
Copy Markdown
Contributor

@bkontur bkontur commented Jul 18, 2025

The relevant change, which allows us to do dynamic pricing in pallet-xcm-bridge based on the router configuration and bridge status:

-		/// Price of single message export to the bridged consensus (`Self::BridgedNetwork`).
-		type MessageExportPrice: Get<Assets>;
+		/// Price of a single message export to the bridged consensus (`Self::BridgedNetwork`).
+		type MessageExportPrice: PriceForMessageDelivery<Id = BridgeId>;

Basically, with message bridging on AssetHub, the same dynamic price (based on the bridge congestion status) is calculated for exporting either via:

  • local routing using ToRococoOverAssetHubRococoXcmRouter / ToWestendOverAssetHubWestendXcmRouter (AH<>AH transfer)
  • executing ExportMessage from a sibling chain.

It is just backport of xcm-bridge/xcm-bridge-router stuff from this commit: 8ada805 (where you can see also the real usage and setup)

cc: @serban300

@bkontur bkontur requested a review from serban300 July 18, 2025 10:18
Copy link
Copy Markdown
Contributor

@serban300 serban300 left a comment

Choose a reason for hiding this comment

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

Looks good as far as I understand. But I will look more in detail while reviewing #6231

@bkontur bkontur marked this pull request as ready for review July 18, 2025 12:21
@bkontur bkontur merged commit b804c5d into bko-bridges-congestion Jul 18, 2025
214 of 218 checks passed
@bkontur bkontur deleted the bko-bridges-congestion-dynfee branch July 18, 2025 12:21
@paritytech-workflow-stopper
Copy link
Copy Markdown

All GitHub workflows were cancelled due to failure one of the required jobs.
Failed workflow url: https://github.com/paritytech/polkadot-sdk/actions/runs/16370415904
Failed job name: fmt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants