-
Notifications
You must be signed in to change notification settings - Fork 1.6k
XCM: Properly set the pricing for the DMP router #6843
Conversation
runtime/parachains/src/dmp.rs
Outdated
@@ -14,13 +14,34 @@ | |||
// You should have received a copy of the GNU General Public License | |||
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>. | |||
|
|||
//! To prevent Out of Memory errors on the `DownwardMessageQueue`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
formatting and line wrapping in this doc comment is somewhat not on par with the rest of the code; always been suggesting using https://marketplace.visualstudio.com/items?itemName=stkb.rewrap or similar.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some spacing would also help; see this line from this PR as an inspiration.
runtime/parachains/src/dmp.rs
Outdated
|
||
/// The number to multiply the base delivery fee by. | ||
#[pallet::storage] | ||
#[pallet::getter(fn delivery_fee_factor)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getters are being deprecated: please don't add more :D
https://github.com/paritytech/substrate/issues/13259
runtime/westend/Cargo.toml
Outdated
@@ -26,6 +26,7 @@ sp-io = { git = "https://github.com/paritytech/substrate", branch = "master", de | |||
sp-mmr-primitives = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } | |||
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } | |||
sp-staking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } | |||
sp-arithmetic = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not being used?
runtime/rococo/Cargo.toml
Outdated
@@ -27,6 +27,7 @@ sp-io = { git = "https://github.com/paritytech/substrate", branch = "master", de | |||
sp-mmr-primitives = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } | |||
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } | |||
sp-staking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } | |||
sp-arithmetic = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the well-documented PR! 💯
@@ -1410,7 +1410,7 @@ construct_runtime! { | |||
ParaScheduler: parachains_scheduler::{Pallet, Storage} = 55, | |||
Paras: parachains_paras::{Pallet, Call, Storage, Event, Config, ValidateUnsigned} = 56, | |||
Initializer: parachains_initializer::{Pallet, Call, Storage} = 57, | |||
Dmp: parachains_dmp::{Pallet, Call, Storage} = 58, | |||
Dmp: parachains_dmp::{Pallet, Storage} = 58, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this could be all refactored to use default parts in the future, no?
Co-authored-by: Kian Paimani <[email protected]>
bot merge |
* master: (30 commits) update rocksdb to 0.20.1 (#7113) Reduce base proof size weight component to zero (#7081) PVF: Move PVF workers into separate crate (#7101) Companion for #13923 (#7111) update safe call filter (#7080) PVF: Don't dispute on missing artifact (#7011) XCM: Properly set the pricing for the DMP router (#6843) pvf: Update docs for PVF artifacts (#6551) Bump syn from 2.0.14 to 2.0.15 (#7093) Companion for substrate#13771 (#6983) Added Dwellir Nigeria bootnodes. (#7097) Companion for Substrate #13889 (#7063) Switch to DNS name based bootnodes for Rococo (#7040) companion for substrate#13883 (#7059) [xcm] Added `UnpaidExecution` instruction to `UnpaidRemoteExporter` (#7091) Bump serde_json from 1.0.85 to 1.0.96 (#7072) Bump hex-literal from 0.3.4 to 0.4.1 (#7071) Small simplification (#7089) [XCM - UnpaidRemoteExporter] Remove unreachable code (#7088) sync versions with current release (#7083) ...
* master: (39 commits) malus: dont panic on missing validation data (#6952) Offences Migration v1: Removes `ReportsByKindIndex` (#7114) Fix stalling dispute coordinator. (#7125) Fix rolling session window (#7126) [ci] Update buildah command and version (#7128) Bump assigned_slots params (#6991) XCM: Remote account converter (#6662) Rework `dispute-coordinator` to use `RuntimeInfo` for obtaining session information instead of `RollingSessionWindow` (#6968) Revert default proof size back to 64 KB (#7115) update rocksdb to 0.20.1 (#7113) Reduce base proof size weight component to zero (#7081) PVF: Move PVF workers into separate crate (#7101) Companion for #13923 (#7111) update safe call filter (#7080) PVF: Don't dispute on missing artifact (#7011) XCM: Properly set the pricing for the DMP router (#6843) pvf: Update docs for PVF artifacts (#6551) Bump syn from 2.0.14 to 2.0.15 (#7093) Companion for substrate#13771 (#6983) Added Dwellir Nigeria bootnodes. (#7097) ...
Partial paritytech/substrate#6121.
This PR properly adds a delivery fee to the DMP router used by the relay chain. It uses a base fee of
CENTS * 3
, and is then multiplied by1.01
to the power of the number of pending messages in the message queue of the destination. Such a formula is intended to make the fees cheap initially when the queue is small, but would get prohibitively expensive relatively quickly.