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

[xcm] Fix SovereignPaidRemoteExporter and DepositAsset handling #3157

Merged
merged 4 commits into from
Jan 31, 2024

Conversation

bkontur
Copy link
Contributor

@bkontur bkontur commented Jan 31, 2024

This PR addresses two issues:

  • It modifies DepositAsset's asset filter from All to AllCounted(1) to prevent potentially charging excessive weight/fees. This adjustment avoids situations where fees could be calculated based on the count of assets, as illustrated here.
  • It encapsulates DepositAsset with SetAppendix to ensure that fees are not trapped in any case. For instance, this prevents issues when ExportXcm::validate encounters an error during the processing of ExportMessage.

@bkontur bkontur added R0-silent Changes should not be mentioned in any release notes T6-XCM This PR/Issue is related to XCM. T15-bridges This PR/Issue is related to bridges. labels Jan 31, 2024
@bkontur bkontur requested a review from a team as a code owner January 31, 2024 12:55
@bkontur bkontur added this pull request to the merge queue Jan 31, 2024
Merged via the queue into master with commit 6ea472a Jan 31, 2024
126 checks passed
@bkontur bkontur deleted the bko-xcm-paid-exporter-fix branch January 31, 2024 16:24
github-merge-queue bot pushed a commit that referenced this pull request Feb 2, 2024
## TODO
- [x] change constants when CI fails (should fail :) )

## Result

On the AssetHubRococo: 1701175800126 -> 1700929825257 = 0.15 %
decreased.
```
# Before ( [xcm] Fix `SovereignPaidRemoteExporter` and `DepositAsset` handling (#3157))
Feb 02 12:59:05.520 ERROR bridges::estimate: `bridging::XcmBridgeHubRouterBaseFee` actual value: 1701175800126 for runtime: statemine-1006000 (statemine-0.tx14.au1)    

# After
Feb 02 13:02:40.647 ERROR bridges::estimate: `bridging::XcmBridgeHubRouterBaseFee` actual value: 1700929825257 for runtime: statemine-1006000 (statemine-0.tx14.au1)    

```

On the AssetHubWestend: 2116038876326 -> 1641718372993 = 22.4 %
decreased.
```
# Before ( [xcm] Fix `SovereignPaidRemoteExporter` and `DepositAsset` handling (#3157))
Feb 02 12:56:00.880 ERROR bridges::estimate: `bridging::XcmBridgeHubRouterBaseFee` actual value: 2116038876326 for runtime: westmint-1006000 (westmint-0.tx14.au1)    


# After
Feb 02 13:04:42.515 ERROR bridges::estimate: `bridging::XcmBridgeHubRouterBaseFee` actual value: 1641718372993 for runtime: westmint-1006000 (westmint-0.tx14.au1)    
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
R0-silent Changes should not be mentioned in any release notes T6-XCM This PR/Issue is related to XCM. T15-bridges This PR/Issue is related to bridges.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants