cumulus
cumulus copied to clipboard
Increase xcm fees when busy
This is the corollary to https://github.com/paritytech/polkadot/pull/6843 . Xcmp fees upwards and horizontally get exponentially more expensive as the queues increase.
TODO:
- [ ] broadenend out from just statemine
Please make sure there is an easy way to estimate XCM fee https://github.com/paritytech/polkadot-sdk/issues/690
Also please consider the scenario that the XCM is triggered indirectly. For example, from a smart contract. The smart contract will pay for the XCM fee so it will need to know how much to charge from the user for the XCM fee.
The CI pipeline was cancelled due to failure one of the required jobs. Job name: test-linux-stable Logs: https://gitlab.parity.io/parity/mirrors/cumulus/-/jobs/2546897
This just does not translate well from the polkadot dmp PR. The polkadot DMP pallet does not page, but holds a list of messages where as the xcmp-queue holds pages of messages. Establishing how many messages are in a page when it gets sent would require decoding all the page or keeping a tally separately, so it's probably nicer to bump the xcm fees based on the number of pages queued up which is readily available information. I.e. once one page is full then xcm messages get more expensive, and once two pages get full then the channel suspends while it clears down (2 pages is the current suspendThreshold).