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

Backport latest relevant dynamic fees changes from v1 to v2 #2372

Conversation

svyatonik
Copy link
Contributor

follow up for #2371

This PR backports all relevant dynamic fees changes from polkadot-staging. Relevant means that we are still not sending XCM messages to the source chain to pause the bridge and will be relying on paritytech/polkadot-sdk#5062 in the future.

One change to polkadot-staging is that I've reverted removal of SiblingBridgeHubLocation from pallet-xcm-bridge-hub-router config, because it is required now to check whether the channel is congested or no. This must also be revisited in a context of #2380 - maybe we'll need to remove this BridgeTable at all in v2.

@svyatonik svyatonik added the A-chores Something that has to be done, as part of regular maintenance label Aug 23, 2023
modules/xcm-bridge-hub-router/src/lib.rs Outdated Show resolved Hide resolved
);
// if bridge has reported congestion, we don't change anything
let mut delivery_fee_factor = Self::delivery_fee_factor();
if delivery_fee_factor == MINIMAL_DELIVERY_FEE_FACTOR {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: Maybe <= would be a bit safer here. Even though < should never happen.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's a valid concern. OTOH, if delivery_fee_factor is less than MINIMAL_DELIVERY_FEE_FACTOR then maybe we should change it to minimal (this what will happen with current implementation and won't happen if we apply your suggestion)? That could be if we'll change a constant after deployment for example. WDYT?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Actually you're right. Better to have it changed to minimal in this case.

@svyatonik
Copy link
Contributor Author

@bot merge

@svyatonik svyatonik merged commit d091824 into xcm-dynamic-fees-using-backoff-mechanism Aug 23, 2023
@svyatonik svyatonik deleted the backport-v1-dynamic-fees-changes-to-v2 branch August 23, 2023 14:20
svyatonik added a commit that referenced this pull request Aug 25, 2023
… pallet-xcm-bridge-hub (#2261)

* added backoff mechanism to inbound bridge queue

* impl backpressure in the XcmBlobHaulerAdapter

* leave TODOs

* BridgeMessageProcessor prototype

* another TODO

* Revert "also temporary (?) remove BridgesByLocalOrigin because the storage format will likely change to be able to resume bridges from the on_iniitalize/on_idle"

This reverts commit bdd7ae1.

* prototype for QueuePausedQuery

* implement ExportXcm and MessageDispatch for pallet-xcm-bridge-hub

* spelling

* flush

* small comments to myself

* more backports from dynamic-fees-v1

* use new pallet as exporter and dispatcher in Millau

* use new pallet as exporter and dispatcher in Rialto

* use new pallet as exporter and dispatcher in RialtoParachain

* flush

* fix remaining compilation issues

* warnings + fmt

* fix tests

* LocalXcmChannelManager

* change lane ids

* it works!

* remove bp-xcm-bridge-hub-router and use LocalXcmChannelManager everywhere

* removed commented code

* cleaning up

* cleaning up

* cleaning up

* - separated BridgeId and LaneId
- BridgeId now uses versioned universal locations
- added missing stuff to exporter.rs

* OnMessagesDelivered is back

* start using bp-xcm-bridge-hub as OnMessagesDelivered

* cleaning up

* spelling

* fix stupid issues

* Backport latest relevant dynamic fees changes from v1 to v2 (#2372)

* backport latest relevant dynamic fees changes from v1 to v2

* fix comment
bkontur pushed a commit that referenced this pull request May 7, 2024
… pallet-xcm-bridge-hub (#2261)

* added backoff mechanism to inbound bridge queue

* impl backpressure in the XcmBlobHaulerAdapter

* leave TODOs

* BridgeMessageProcessor prototype

* another TODO

* Revert "also temporary (?) remove BridgesByLocalOrigin because the storage format will likely change to be able to resume bridges from the on_iniitalize/on_idle"

This reverts commit bdd7ae1.

* prototype for QueuePausedQuery

* implement ExportXcm and MessageDispatch for pallet-xcm-bridge-hub

* spelling

* flush

* small comments to myself

* more backports from dynamic-fees-v1

* use new pallet as exporter and dispatcher in Millau

* use new pallet as exporter and dispatcher in Rialto

* use new pallet as exporter and dispatcher in RialtoParachain

* flush

* fix remaining compilation issues

* warnings + fmt

* fix tests

* LocalXcmChannelManager

* change lane ids

* it works!

* remove bp-xcm-bridge-hub-router and use LocalXcmChannelManager everywhere

* removed commented code

* cleaning up

* cleaning up

* cleaning up

* - separated BridgeId and LaneId
- BridgeId now uses versioned universal locations
- added missing stuff to exporter.rs

* OnMessagesDelivered is back

* start using bp-xcm-bridge-hub as OnMessagesDelivered

* cleaning up

* spelling

* fix stupid issues

* Backport latest relevant dynamic fees changes from v1 to v2 (#2372)

* backport latest relevant dynamic fees changes from v1 to v2

* fix comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-chores Something that has to be done, as part of regular maintenance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants