- Oct 10, 2023
-
-
Branislav Kontur authored
[xcm] Use `Weight::MAX` for `reserve_asset_deposited`, `receive_teleported_asset` benchmarks (#1726) # Description ## Summary Previously, the `pallet_xcm::do_reserve_transfer_assets` and `pallet_xcm::do_teleport_assets` functions relied on weight estimation for remote chain execution, which was based on guesswork derived from the local chain. This approach led to complications for runtimes that did not provide or support specific [XCM configurations](https://github.com/paritytech/polkadot-sdk/blob/7cbe0c76ef8fd2aabf9f07de0156941ce3ed44b0/polkadot/xcm/xcm-executor/src/config.rs#L43-L47) for `IsReserve` or `IsTeleporter`. Consequently, such runtimes had to resort to implementing hard-coded weights for XCM instructions like `reserve_asset_deposited` or `receive_teleported_asset` to support extrinsics such as `pallet_xcm::reserve_transfer_assets` and `pallet_xcm::teleport_assets`, which depended on remote weight estimation. The issue of remote weight estimation was addressed and resolved by [Pull Request #1645](https://github.com/paritytech/polkadot-sdk/pull/1645), which removed the need for remote weight estimation. ## Solution As a continuation of this improvement, the current PR proposes further cleanup by removing unnecessary hard-coded values and rectifying benchmark results with `Weight::MAX` that previously used `T::BlockWeights::get().max_block` as an override for unsupported XCM instructions like `ReserveAssetDeposited` and `ReceiveTeleportedAsset`. ## Questions - [x] Can we remove now also `Hardcoded till the XCM pallet is fixed` for `deposit_asset`? E.g. for AssetHubKusama [here](https://github.com/paritytech/polkadot-sdk/blob/7cbe0c76ef8fd2aabf9f07de0156941ce3ed44b0/cumulus/parachains/runtimes/assets/asset-hub-kusama/src/weights/xcm/mod.rs#L129-L134) - [x] Are comments like [this](https://github.com/paritytech/polkadot-sdk/blob/7cbe0c76ef8fd2aabf9f07de0156941ce3ed44b0/polkadot/runtime/kusama/src/weights/xcm/mod.rs#L94) `// Kusama doesn't support ReserveAssetDeposited, so this benchmark has a default weight` still relevant? Shouldnt be removed/changed? ## TODO - [x] `bench bot` regenerate xcm weights for all runtimes - [x] remove hard-coded stuff from system parachain weight files - [ ] when merged, open `polkadot-fellow/runtimes` PR ## References Fixes #1132 Closes #1132 Old polkadot repo [PR](https://github.com/paritytech/polkadot/pull/7546) --------- Co-authored-by: command-bot <>
-
- Sep 29, 2023
-
-
Sebastian Kunert authored
-
- Sep 05, 2023
-
-
joe petrowski authored
* add common libs * asset hubs * add westend * bridge hubs * collectives * contracts * emulated tests * parachain bin * delete collectives constants and update docs * integration tests should have apache license (some missing, some needed changing) * propagate features * fmt
-
- Sep 01, 2023
-
-
Ignacio Palacios authored
* improve hygiene & clean up * improve hygiene & clean up - xcm-emulator * improve hygiene & clean up - common * improve hygiene & clean up - tests * improve hygiene & clean up - tests 2 * last hygiene bits * ".git/.scripts/commands/fmt/fmt.sh" --------- Co-authored-by: command-bot <>
-
- Aug 30, 2023
-
-
Przemek Rzad authored
* Add missing Cumulus licenses * Typo * Add missing Substrate licenses * Single job checking the sub-repos in steps * Remove dates * Remove dates * Add missing (C) * Update FRAME UI tests Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Update more UI tests Signed-off-by: Oliver Tale-Yazdi <[email protected]> --------- Signed-off-by: Oliver Tale-Yazdi <[email protected]> Co-authored-by: Oliver Tale-Yazdi <[email protected]>
-
- Aug 10, 2023
-
-
Ignacio Palacios authored
* Allow functions to work over both parachains and relay chains * additional references * import * backup * refactoring para and relay traits * use runtime crates to build types * decouple ProcessMessage * decouple ProcessMessage 2 * dmp and xcmp handlers decouple * backup * refactor done * common int values working * added global ext with mutex * works for two mutex * single mutex and remove condvar * global test ext done * failing moving test_ext because relay block num * relay_block_number issue fixed * backup * Test working with assertions * assertions get Test as arg * DispatchArgs as generic * clean up * backup * teleports for asset-hub-kusama done * improve assert_expected_events macro * rename Test generics * check assertions for tuples * test assertions redone * reserve_transfer_assets done * send transact done * hrmp test for paras * hrmp channels test done * hrmp channels test done 2 * before modifying test dispatch * reserve tests done & Test dispatch fixed * reserve transfer local asset * force_create_and_mint_asset * force create and mint done * tests done * fix imports in common * common events refactored * add option to events attributes * asset-hub-polkadot tests done * asset-hub-westend half done * relay chain events move to common * remove failing send tests for asset-hub-westend * added events to bridge-hub-rococo * added events to collectives-polkadot * cargo clean up * fix asset-hub-westend tests * ".git/.scripts/commands/fmt/fmt.sh" * fix clippy * ".git/.scripts/commands/fmt/fmt.sh" * Removed unnecessary deps * Extracted some commonality for Kusama/Polkadot (which will be reused also for BridgeHubs) (#2971) * Extracted some commonality for Kusama/Polkadot (which will be reused also for BridgeHubs) * AssetHubRococo should better use AssetHubKusama runtime * add fund_account --------- Co-authored-by: NachoPal <[email protected]> * address comments * rename event assertion helpers * clean comments * address comments 2 * ".git/.scripts/commands/fmt/fmt.sh" --------- Co-authored-by: Giles Cope <[email protected]> Co-authored-by: command-bot <> Co-authored-by: Branislav Kontur <[email protected]>
-
- Jul 05, 2023
-
-
Ignacio Palacios authored
* rename bridge hub + BridgeMessages type * bridge base * bridge string approach * add decl_test_bridges macro * outbound lanes on the way * get & dispatch mock bridge done * fix bridge errors + log::debug for messages * clean up * update source OutboundLaneData * rococo & wococo added * sender_receiver_accounts_parameter_types macro * sender_receiver_accounts_parameter_types macro 2 * fixed multi parachain + example on the way * working but router error * bridge working * refactor NetworkComponent * make it generic * working as generic * clean up * last bit * ".git/.scripts/commands/fmt/fmt.sh" * fix bridge hub handler name * ".git/.scripts/commands/fmt/fmt.sh" * add AssetConversion back for AssetHubWestend * Update xcm/xcm-emulator/src/lib.rs Co-authored-by: Squirrel <[email protected]> * add LaneId wrapper * update substrate * fix wrapper conversion * remove duplicate in workspace * Revert "update substrate" This reverts commit 92e8f201ae433aed3f70b998ebd4c23d9168d0ee. * ".git/.scripts/commands/fmt/fmt.sh" --------- Co-authored-by: command-bot <> Co-authored-by: Squirrel <[email protected]>
-