- Oct 18, 2023
-
-
Keith Yeung authored
Combination of paritytech/polkadot#7005, its addon PR paritytech/polkadot#7585 and its companion paritytech/cumulus#2433. This PR introduces a new XcmFeesToAccount struct which implements the `FeeManager` trait, and assigns this struct as the `FeeManager` in the XCM config for all runtimes. The struct simply deposits all fees handled by the XCM executor to a specified account. In all runtimes, the specified account is configured as the treasury account. XCM __delivery__ fees are now being introduced (unless the root origin is sending a message to a system parachain on behalf of the originating chain). # Note for reviewers Most file changes are tests that had to be modified to account for the new fees. Main changes are in: - cumulus/pallets/xcmp-queue/src/lib.rs <- To make it track the delivery fees exponential factor - polkadot/xcm/xcm-builder/src/fee_handling.rs <- Added. Has the FeeManager implementation - All runtime xcm_config files <- To add the FeeManager to the XCM configuration # Important note After this change, instructions that create and send a new XCM (Query*, Report*, ExportMessage, InitiateReserveWithdraw, InitiateTeleport, DepositReserveAsset, TransferReserveAsset, LockAsset and RequestUnlock) will require the corresponding origin account in the origin register to pay for transport delivery fees, and the onward message will fail to be sent if the origin account does not have the required amount. This delivery fee is on top of what we already collect as tx fees in pallet-xcm and XCM BuyExecution fees! Wallet UIs that want to expose the new delivery fee can do so using the formula: ``` delivery_fee_factor * (base_fee + encoded_msg_len * per_byte_fee) ``` where the delivery fee factor can be obtained from the corresponding pallet based on which transport you are using (UMP, HRMP or bridges), the base fee is a constant, the encoded message length from the message itself and the per byte fee is the same as the configured per byte fee for txs (i.e. `TransactionByteFee`). --------- Co-authored-by: Branislav Kontur <[email protected]> Co-authored-by: joe petrowski <[email protected]> Co-authored-by: Giles Cope <[email protected]> Co-authored-by: command-bot <> Co-authored-by: Francisco Aguirre <[email protected]> Co-authored-by: Liam Aharon <[email protected]> Co-authored-by: Kian Paimani <[email protected]>
-
- Aug 31, 2023
-
-
juangirini authored
* restructure dispatch macro related exports * moved Dispatchable to lib.rs * fix .gitignore final newline * ".git/.scripts/commands/fmt/fmt.sh" * fix rustdocs * wip --------- Co-authored-by: Liam Aharon <[email protected]> Co-authored-by: command-bot <> Co-authored-by: ordian <[email protected]>
-
- 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 14, 2023
-
-
Oliver Tale-Yazdi authored
* Copy rustfmt.toml from Polkadot master Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Format with new config Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Add Polkadot clippy config Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Update Cargo.lock Looks like https://github.com/paritytech/polkadot/pull/7611 did not correctly update the lockfile. Maybe a different Rust Version?! Signed-off-by: Oliver Tale-Yazdi <[email protected]> --------- Signed-off-by: Oliver Tale-Yazdi <[email protected]>
-
- Aug 01, 2023
-
-
Branislav Kontur authored
* `XcmContext` to `buy_weight / refund_weight` * Fix tests * Fix more tests * update lockfile for {"substrate", "polkadot"} --------- Co-authored-by: parity-processbot <>
-
- May 25, 2023
-
-
Gavin Wood authored
* Fixes for new API * Formatting * Fixes * Fixes * Further fixes * XCMP dispatch events mention message ID * XCMP event includes ID * Add DMP message ID functionality * Integrate into test parachains * Remove WithUniqueTopic usage * Use new primitive * Formatting * undiener * Revert lock * Fixes * Fixes * Fixes * Fixes * Formatting * message_hash becomes message_id * Rename * Another Rename * Fixes * Fix * Bump * Fixes * Grumble.
-
- May 23, 2023
-
-
Koute authored
* Do not assume `AssetId`s are `Copy` * update lockfile for {"substrate", "polkadot"} --------- Co-authored-by: parity-processbot <>
-
- May 06, 2023
-
-
Oliver Tale-Yazdi authored
* Import Clippy config from Polkadot Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Auto clippy fix Signed-off-by: Oliver Tale-Yazdi <[email protected]> * No tabs in comments Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Prefer matches Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Dont drop references Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Trivial Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Refactor Signed-off-by: Oliver Tale-Yazdi <[email protected]> * fmt Signed-off-by: Oliver Tale-Yazdi <[email protected]> * add clippy to ci * Clippy reborrow Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Update client/pov-recovery/src/lib.rs Co-authored-by: Bastian Köcher <[email protected]> * Update client/pov-recovery/src/lib.rs Co-authored-by: Bastian Köcher <[email protected]> * Partially revert 'Prefer matches' Using matches! instead of match does give less compiler checks as per review from @chevdor . Partially reverts 8c0609677f3ea040f77fffd5be6facf7c3fec95c Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Update .cargo/config.toml Co-authored-by: Chevdor <[email protected]> * Revert revert
💩 Should be fine to use matches! macro since it is an explicit whitelist, not wildcard matching. --------- Signed-off-by: Oliver Tale-Yazdi <[email protected]> Co-authored-by: alvicsam <[email protected]> Co-authored-by: Bastian Köcher <[email protected]> Co-authored-by: Chevdor <[email protected]> Co-authored-by: parity-processbot <>
-
- Mar 20, 2023
-
-
Gavin Wood authored
* Fix APIs * Reflect API changes * Everything builds * Fixes * Fixes * Update Cargo.toml * Fixes * Fixes * No networks use freezes/holds * update lockfile for {"polkadot", "substrate"} * Fix test ED cannot be zero anymore. Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Fix test --------- Signed-off-by: Oliver Tale-Yazdi <[email protected]> Co-authored-by: parity-processbot <> Co-authored-by: Oliver Tale-Yazdi <[email protected]>
-
- Mar 03, 2023
-
-
Branislav Kontur authored
Update polkadot with one more commit: from 54bcee1d5615f53781d5172fcce6700dbf35dad2 -> 3dd8331414c92f5d01d6a470eae43049099d7aa9 (#2266) * Update polkadot with one commit: from 54bcee1d5615f53781d5172fcce6700dbf35dad2 -> 3dd8331414c92f5d01d6a470eae43049099d7aa9 * Fix test * Fix test better * typo
-
- Jan 17, 2023
-
-
Gavin Wood authored
* Fixes * Undiener * Undiener * Undiener * Lockfile * Changes for send returning hash * Include message ID as params to execute_xcm * Fixes * Fixes * Fixes * Fixes * Fixes * Fixes * Companion fixes * Formatting * Fixes * Formatting * Bump * Bump * Fixes * Formatting * Make the price of UMP/XCMP message sending configurable * cargo fmt * Remove InvertLocation * Formatting * Use ConstantPrice from polkadot-runtime-common * Fix naming * cargo fmt * Fixes * Fixes * Fixes * Add CallDispatcher * Fixes * Fixes * Fixes * Fixes * Fixes * Fixes * Fixes * Fixes * Fixes * Fixes * Fixes * Fixes * Fixes * Fixes * Fixes * Fixes * Fixes * Fixes * Fixes * Remove unused import * Remove unused import * XCMv3 fixes (#1710) * Fixes XCMv3 related Fixes XCMv3 (removed query_holding) Fixes XCMv3 - should use _depositable_count? Fixes XCMv3 - removed TrustedReserve Fixes - missing weights for statemine/statemint/westmint [DO-NOT-CHERRY-PICK] tmp return query_holding to aviod conficts to master Fixes - missing functions for pallet_xcm_benchmarks::generic::Config Fixes for XCMv3 benchmarking Fix xcm - removed query_holding * ".git/.scripts/bench-bot.sh" xcm statemine assets pallet_xcm_benchmarks::generic * ".git/.scripts/bench-bot.sh" xcm statemint assets pallet_xcm_benchmarks::generic * ".git/.scripts/bench-bot.sh" xcm westmint assets pallet_xcm_benchmarks::generic * Fix imports * Avoid consuming XCM message for NotApplicable scenario (#1787) * Avoid consuming message for NotApplicable scenario * Avoid consuming message for NotApplicable scenario tests * Add 10 message processing limit to DMP queue * Add 10 message limit to XCMP queue * Always increment the message_processed count whenever a message is processed * Fix formatting * Set an upper limit to the overweight message DMP queue * Add upper limit to XCMP overweight message queue * Fix for missing weight for `fn unpaid_execution()` * Fix - usage of `messages_processed` * Fixes * Fixes * Fixes * cargo fmt * Fixes * Fixes * Fixes * Fixes * Remove unused import * Fixes for gav-xcm-v3 (#1835) * Fix for FungiblesAdapter - trait changes: Contains -> AssetChecking * Fix for missing weight for `fn unpaid_execution()` * Used NonLocalMint for all NonZeroIssuance * Fix * Fixes * Fixes * Fixes * Fixes * Fixes * Fix tests * Fixes * Add SafeCallFilter * Add missing config items * Add TODO * Use () as the PriceForParentDelivery * Fixes * Fixes * Fixes * Fixes * Update transact_origin to transact_origin_and_runtime_call * Add ReachableDest config item to XCM pallet * Update SafeCallFilter to allow remark_with_event in runtime benchmarks * cargo fmt * Update substrate * Fix worst_case_holding * Fix DMQ queue unit tests * Remove unused label * cargo fmt * Actually process incoming XCMs * Fixes * Fixes * Fixes * Fixes - return back Weightless * Added measured benchmarks for `pallet_xcm` (#1968) * Fix Fix Fix * Fix * Fixes for transact benchmark * Fixes add pallet_xcm to benchmarks * Revert remark_with_event * ".git/.scripts/bench-bot.sh" xcm statemine assets pallet_xcm_benchmarks::generic * Fixes * TMP * Fix for reserve_asset_deposited * ".git/.scripts/bench-bot.sh" pallet statemine assets pallet_xcm * Fix * ".git/.scripts/bench-bot.sh" pallet statemint assets pallet_xcm * Fix * ".git/.scripts/bench-bot.sh" pallet westmint assets pallet_xcm * Fix westmint * ".git/.scripts/bench-bot.sh" xcm statemine assets pallet_xcm_benchmarks::generic * Fix * ".git/.scripts/bench-bot.sh" xcm westmint assets pallet_xcm_benchmarks::generic * ".git/.scripts/bench-bot.sh" xcm statemint assets pallet_xcm_benchmarks::generic * ".git/.scripts/bench-bot.sh" pallet collectives-polkadot collectives pallet_xcm * Fix for collectives * ".git/.scripts/bench-bot.sh" pallet bridge-hub-kusama bridge-hubs pallet_xcm * ".git/.scripts/bench-bot.sh" pallet bridge-hub-rococo bridge-hubs pallet_xcm * Fixes for bridge-hubs * Fixes - return back Weightless * Fix - removed MigrateToTrackInactive for contracts-rococo Co-authored-by: command-bot <> * cargo fmt * Fix benchmarks * Bko gav xcm v3 (#1993) * Fix * ".git/.scripts/bench-bot.sh" xcm statemint assets pallet_xcm_benchmarks::fungible * ".git/.scripts/bench-bot.sh" xcm statemine assets pallet_xcm_benchmarks::fungible * ".git/.scripts/bench-bot.sh" xcm westmint assets pallet_xcm_benchmarks::fungible * ".git/.scripts/bench-bot.sh" xcm statemine assets pallet_xcm_benchmarks::generic * ".git/.scripts/bench-bot.sh" xcm statemint assets pallet_xcm_benchmarks::generic * ".git/.scripts/bench-bot.sh" xcm westmint assets pallet_xcm_benchmarks::generic * ".git/.scripts/bench-bot.sh" pallet statemine assets pallet_xcm * ".git/.scripts/bench-bot.sh" pallet westmint assets pallet_xcm * ".git/.scripts/bench-bot.sh" pallet statemint assets pallet_xcm * ".git/.scripts/bench-bot.sh" pallet collectives-polkadot collectives pallet_xcm * ".git/.scripts/bench-bot.sh" pallet bridge-hub-kusama bridge-hubs pallet_xcm * ".git/.scripts/bench-bot.sh" pallet bridge-hub-rococo bridge-hubs pallet_xcm Co-authored-by: command-bot <> * Change AllowUnpaidExecutionFrom to be explicit * xcm-v3 benchmarks, weights, fixes for bridge-hubs (#2035) * Dumy weights to get compile * Change UniversalLocation according to https://github.com/paritytech/polkadot/pull/4097 (Location Inversion Removed) * Fix bridge-hubs weights * ".git/.scripts/bench-bot.sh" pallet statemine assets pallet_xcm * ".git/.scripts/bench-bot.sh" pallet statemint assets pallet_xcm * ".git/.scripts/bench-bot.sh" pallet collectives-polkadot collectives pallet_xcm * ".git/.scripts/bench-bot.sh" pallet westmint assets pallet_xcm * ".git/.scripts/bench-bot.sh" xcm bridge-hub-kusama bridge-hubs pallet_xcm_benchmarks::generic * ".git/.scripts/bench-bot.sh" xcm bridge-hub-kusama bridge-hubs pallet_xcm_benchmarks::fungible * ".git/.scripts/bench-bot.sh" pallet bridge-hub-kusama bridge-hubs pallet_xcm * ".git/.scripts/bench-bot.sh" pallet bridge-hub-rococo bridge-hubs pallet_xcm * ".git/.scripts/bench-bot.sh" xcm bridge-hub-rococo bridge-hubs pallet_xcm_benchmarks::fungible * ".git/.scripts/bench-bot.sh" xcm bridge-hub-rococo bridge-hubs pallet_xcm_benchmarks::generic * Change NetworkId to Option<NetworkId> Co-authored-by: command-bot <> Co-authored-by: Keith Yeung <[email protected]> * Add event for showing the hash of an UMP sent message (#1228) * Add UpwardMessageSent event in parachain-system * additional fixes * Message Id * Fix errors from merge * fmt * more fmt * Remove todo * more formatting * Fixes * Fixes * Fixes * Fixes * Allow explicit unpaid executions from the relay chains for system parachains (#2060) * Allow explicit unpaid executions from the relay chains for system parachains * Put origin-filtering barriers into WithComputedOrigin * Use ConstU32<8> * Small nits * formatting * cargo fmt * Allow receiving XCMs from any relay chain plurality * Fixes * update lockfile for {"polkadot", "substrate"} * Update polkadot * Add runtime-benchmarks feature Co-authored-by: Keith Yeung <[email protected]> Co-authored-by: Branislav Kontur <[email protected]> Co-authored-by: girazoki <[email protected]> Co-authored-by: parity-processbot <>
-
- Nov 28, 2022
-
-
Branislav Kontur authored
* Allow Sufficient Assets for XCM Fee Payment on Statemint #1884 * Revert of removed payment.clone().into() * Fixes * Bring AssetFeeAsExistentialDepositMultiplier to test_asset_xcm_trader * Fixes
-
- Aug 31, 2022
-
-
Shawn Tabrizi authored
* cargo test -p cumulus-primitives-utility * cargo test -p cumulus-pallet-xcmp-queue * cargo test -p cumulus-pallet-xcm * cargo test -p cumulus-pallet-dmp-queue * cargo test -p pallet-template * cargo test -p cumulus-test-runtime * fix weights * fix more weights * cargo test -p parachains-common * cargo test -p parachain-template-runtime * fix weights import * cargo test -p collectives-polkadot-runtime * cargo test -p contracts-rococo-runtime * more * unused * fixes * Update benchmarking.rs * Update lib.rs * Update lib.rs * fix * fix bug in conversion * update lockfile for {"polkadot", "substrate"} Co-authored-by: parity-processbot <>
-
- Aug 03, 2022
-
-
girazoki authored
* point to my branch * girazoki-add-TakeFirstAssetTrader-to-utility * Commit lock * point at custom branch * add new trader to statemine runtimes * compiles * Back to master * Update last tomls * Imports up * remove non-needing imports * FMT * log messages properly * Use TakeRevenue instead of HandleCredit * Introduce xcm fee handler * check total supply in tests * FMT * fix test * Start decoupling balance calculation into different traits * Make traits a bit more generic * PR suggestions * add import * import well * Place xcmfeesassethandler into parachains common * fix tests * config parameters * Min amount to fee receiver * Make minimum amount for block author to be at least the ED * Doc in AssetFeeAsExistentialDepositMultiplier * saturating sub * make sure we dont enter twice * FMT * fmt again * adapt tests * Add doc and struct for weight refund * Doc * More doc * PR suggestions * store all info related to asset payment as multiasset * return AssetNotFound instead of TooExpensive * Use asset transactor to deposit fee * uninstall from statemint * R for RUntime and CON for BalanceConverter * Rework logic to avoid unnecesary match and error * Rework ED check, also in case of refund * rework typo * In case refund makes drop below ED, just refund the difference * fix test westmint * clone id * move test imports to preamble * move test imports to preamble * test-utils with builderS * lock file updated * remove unused imports Co-authored-by: Stephen Shelton <[email protected]> Co-authored-by: joe petrowski <[email protected]> Co-authored-by: joepetrowski <[email protected]>
-
- Oct 01, 2021
-
-
Bastian Köcher authored
* Same procedure as not every day * Remove warning * Update
-
- Sep 16, 2021
-
-
Chevdor authored
* ci: add quick-check with clippy and rustfmt * chore: rustfmt round * chore: set the same rustfmt config than substrate * chore: fix formatting * cI: remove clippy * ci: switch to nightly for the checks * ci: fix toolchains and naming * ci: Limit the check to formatting * chore: fix formatting * Update .rustfmt.toml * Update .rustfmt.toml Co-authored-by: Bastian Köcher <[email protected]>
-
- Aug 28, 2021
-
-
Gavin Wood authored
* Update .gitignore and bring into line with XCM v2's SendError * type * Some work * Weighed responses * extra fields to xcm pallet * Fixes * Bump
-
- Aug 12, 2021
-
-
Keith Yeung authored
* Use new MultiLocation syntax everywhere * Make tests compile
-
- Aug 09, 2021
-
-
Gavin Wood authored
* Remove Filter and use Contains instead * Fixes * Remove patch * Bump Polkadot * bump
-
- Aug 06, 2021
-
-
Gavin Wood authored
* support for XCM v1 * Fixes * Fix. * Use `xcm::latest` * Bump Polkadot Co-authored-by: Bastian Köcher <[email protected]>
-
- May 02, 2021
-
-
Gavin Wood authored
* Introduce the converter into the hub * Parachain recognises Rococo governance body as admin * Whitespace * Use UsingComponents for fee payment in XCM * Fixes * Fixes for XCM permissions * Remove encode_call test * Fixes * Rococo Collator supports Shell runtime * Fixes * Fixes * Initial draft of DMP Queue pallet * DMP Queue builds. * Companion for Polkadot gav-allow-xcm-exec * Bump * Fix std * Fixes * fix and improve docs * fix compile errors in tests * add test for try_service_message * update cargo.lock * Fixes * Make test name read well * Fixes * Add a couple of simple tests * Tests * Tests * Update pallets/dmp-queue/src/lib.rs Co-authored-by: Alexander Popiak <[email protected]> * Update pallets/dmp-queue/src/lib.rs Co-authored-by: Alexander Popiak <[email protected]> * Update pallets/dmp-queue/src/lib.rs Co-authored-by: Alexander Popiak <[email protected]> * Update pallets/dmp-queue/src/lib.rs Co-authored-by: Alexander Popiak <[email protected]> * Update pallets/dmp-queue/src/lib.rs Co-authored-by: Alexander Popiak <[email protected]> * Update pallets/dmp-queue/src/lib.rs Co-authored-by: Alexander Popiak <[email protected]> * Update pallets/dmp-queue/src/lib.rs Co-authored-by: Alexander Popiak <[email protected]> * Chain ID and ParaID don't collide * Fixes * Update pallets/dmp-queue/src/lib.rs Co-authored-by: Shawn Tabrizi <[email protected]> * Update pallets/dmp-queue/src/lib.rs Co-authored-by: Shawn Tabrizi <[email protected]> * Fixes Co-authored-by: Alexander Popiak <[email protected]> Co-authored-by: Shawn Tabrizi <[email protected]>
-
- Apr 14, 2021
-
-
Gavin Wood authored
* Add spambot * Fixes * Add some extra functions to spambot, bump version * Lock.. * Aggregate HRMP (XCMP/HMP) messages. Payloads for spambot. * Fix tests, bump Polkadot. * Fix HMP tests * Rename Hrmp -> Xcmp for handler/sender * Use master branch * Test Xcm message passing & rename away from HMP * Docs * Introduce fee payment mechanics into XCM. * Rename spambot -> ping * Lock * XCMP message dispatch system reimagining - Moved most of the logic into xcm-handler pallet - Altered the outgoing XCMP API from push to pull - Changed underlying outgoing queue data structures to avoid multi-page read/writes - Introduced queuing for incoming messages - Introduced signal messages as a flow-control sub-stream - Introduced flow-control with basic threshold back-pressure - Introduced overall weight limitation on messages executed - Additonal alterations to XCM APIs for the new system * Should process any remaining XCM messages when we're not doing anything else. * Update API usage and preparation for the big build. * Some build fixes * Build fixes * xcm-handler builds * Fix warnings * Docs * Parachains system builds * Parachain runtime building * Fix build * Introduce transfer_asset specialisation. * Fixes * Two-stage upgrade for parachains. * Fixes * Fixes * Updates for message sending. * Repotting/renaming. Add primitives/utility. * Remove real-overseer and bump refs * Configure & document Rococo XCM runtime. * Add shell runtime, some companion changes for #8589 * Bumps & fixes * Fix test * Build fix * Update pallets/xcmp-queue/src/lib.rs Co-authored-by: Amar Singh <[email protected]> * Make tests compile * Apply suggestions from code review Co-authored-by: Bastian Köcher <[email protected]> * remove unused * remove unused event stuff * Adds proper validation-worker to make integration tests work * Apply suggestions from code review Co-authored-by: Bastian Köcher <[email protected]> * Apply suggestions from code review Co-authored-by: Bastian Köcher <[email protected]> * import saturating * remove panic test Co-authored-by: Robert Habermeier <[email protected]> Co-authored-by: Bastian Köcher <[email protected]> Co-authored-by: Amar Singh <[email protected]> Co-authored-by: Shawn Tabrizi <[email protected]> Co-authored-by: Bastian Köcher <[email protected]>
-