[xcm] Fix `SovereignPaidRemoteExporter` and `DepositAsset` handling (#3157)
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](https://github.com/paritytech/polkadot-sdk/blob/master/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/xcm/mod.rs#L38-L46). - 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`.
Showing
- cumulus/parachains/runtimes/assets/test-utils/src/test_cases_over_bridge.rs 5 additions, 0 deletions.../runtimes/assets/test-utils/src/test_cases_over_bridge.rs
- cumulus/parachains/runtimes/bridge-hubs/test-utils/src/test_cases/mod.rs 4 additions, 1 deletion...ins/runtimes/bridge-hubs/test-utils/src/test_cases/mod.rs
- polkadot/xcm/xcm-builder/src/tests/bridging/mod.rs 1 addition, 0 deletionspolkadot/xcm/xcm-builder/src/tests/bridging/mod.rs
- polkadot/xcm/xcm-builder/src/tests/bridging/paid_remote_relay_relay.rs 12 additions, 6 deletions...xcm-builder/src/tests/bridging/paid_remote_relay_relay.rs
- polkadot/xcm/xcm-builder/src/tests/bridging/universal_exports.rs 108 additions, 0 deletions...t/xcm/xcm-builder/src/tests/bridging/universal_exports.rs
- polkadot/xcm/xcm-builder/src/universal_exports.rs 7 additions, 1 deletionpolkadot/xcm/xcm-builder/src/universal_exports.rs
Please register or sign in to comment