XCM: Properly set the pricing for the DMP router (#6843)
* Properly set the pricing for the DMP router * Publicize price types * Use FixedU128 instead of Percent * Add sp-arithmetic as a dependency for rococo runtime * Add sp-arithmetic as a dependency to all runtimes * Remove duplicate import * Add missing import * Fix tests * Create an appropriate QueueDownwardMessageError variant * Recalculate delivery fee factor based on past queue sizes * Remove unused error variant * Fixes * Fixes * Remove unused imports * Rewrite fee factor update mechanism * Remove unused imports * Fixes * Update runtime/parachains/src/dmp.rs Co-authored-by:Squirrel <gilescope@gmail.com> * Make DeliveryFeeFactor be a StorageMap keyed on ParaIds * Fixes * introduce limit for fee increase on dmp queue * add message_size based fee factor to increment_fee_factor * change message_size fee rate to correct value * fix div by 0 error * bind limit to variable * fix message_size_factor and add DeliveryFeeFactor test * add test for ExponentialPrice implementation * make test formula based * make delivery fee factor test formula based * add max value test for DeliveryFeeFactor and move limit to config * change threshold back to dynamic value and fix tests * fmt * suggested changes and fmt * small stylistic change * fmt * change to tokenlocation * small fixes * fmt * remove sp_arithmetic dependency * Update runtime/parachains/src/dmp.rs Co-authored-by:
Kian Paimani <5588131+kianenigma@users.noreply.github.com> --------- Co-authored-by:
Squirrel <gilescope@gmail.com> Co-authored-by:
Just van Stam <just.van.stam@gmail.com> Co-authored-by:
Just van Stam <vstam1@users.noreply.github.com> Co-authored-by:
Kian Paimani <5588131+kianenigma@users.noreply.github.com>
Showing
- polkadot/runtime/common/src/xcm_sender.rs 78 additions, 1 deletionpolkadot/runtime/common/src/xcm_sender.rs
- polkadot/runtime/kusama/Cargo.toml 2 additions, 1 deletionpolkadot/runtime/kusama/Cargo.toml
- polkadot/runtime/kusama/src/lib.rs 1 addition, 1 deletionpolkadot/runtime/kusama/src/lib.rs
- polkadot/runtime/kusama/src/xcm_config.rs 18 additions, 4 deletionspolkadot/runtime/kusama/src/xcm_config.rs
- polkadot/runtime/parachains/src/dmp.rs 103 additions, 10 deletionspolkadot/runtime/parachains/src/dmp.rs
- polkadot/runtime/parachains/src/dmp/tests.rs 71 additions, 1 deletionpolkadot/runtime/parachains/src/dmp/tests.rs
- polkadot/runtime/parachains/src/lib.rs 6 additions, 1 deletionpolkadot/runtime/parachains/src/lib.rs
- polkadot/runtime/polkadot/Cargo.toml 2 additions, 1 deletionpolkadot/runtime/polkadot/Cargo.toml
- polkadot/runtime/polkadot/src/lib.rs 1 addition, 1 deletionpolkadot/runtime/polkadot/src/lib.rs
- polkadot/runtime/polkadot/src/xcm_config.rs 19 additions, 5 deletionspolkadot/runtime/polkadot/src/xcm_config.rs
- polkadot/runtime/rococo/src/lib.rs 1 addition, 1 deletionpolkadot/runtime/rococo/src/lib.rs
- polkadot/runtime/rococo/src/xcm_config.rs 18 additions, 4 deletionspolkadot/runtime/rococo/src/xcm_config.rs
- polkadot/runtime/test-runtime/src/lib.rs 1 addition, 1 deletionpolkadot/runtime/test-runtime/src/lib.rs
- polkadot/runtime/westend/src/lib.rs 1 addition, 1 deletionpolkadot/runtime/westend/src/lib.rs
- polkadot/runtime/westend/src/xcm_config.rs 17 additions, 4 deletionspolkadot/runtime/westend/src/xcm_config.rs
- polkadot/xcm/pallet-xcm/src/lib.rs 5 additions, 1 deletionpolkadot/xcm/pallet-xcm/src/lib.rs
- polkadot/xcm/pallet-xcm/src/tests.rs 6 additions, 6 deletionspolkadot/xcm/pallet-xcm/src/tests.rs
- polkadot/xcm/src/v3/mod.rs 1 addition, 1 deletionpolkadot/xcm/src/v3/mod.rs
Please register or sign in to comment