Closed
Description
There's some support for XCM+bridges in https://github.com/paritytech/polkadot/tree/gav-xcm-v3 branch. Just making this issue to not to lose gained knowledge.
So in bridges+XCM:
- dispatch fee is paid using
BuyExecution
XCVM instruction, so we don't need to pay it at the source chain. However I have some doubts about dispatch - if it'll be immediate dispatch, then we need to declare dispatch weight in advance (and relayer pays for it in advance). If it'll be just queueing - we'll need to pay for the queueing operation (single db write?). It must be decided before any changes are made; - XCM+bridge connector shall return message delivery fee from its
SendXcm::validate()
implementation; - right now the delivery fee is not actually paid when the XCM message is sent -
Ok(price)
needs to be handled properly here. But when it'll be fixed, we need to decide whether we need a separate relayer strategy? Like what happens with an XCM message when its pre-paid fee becomes lower than the actual cost of all involved transactions? For encoded calls, we have thisincrease_message_fee
call. But for XCM messages, the fee is paid at the upper level (so I assume on messages pallet it'll be zero) => this method doesn't work. Do we need ordered delivery in this case at all? Can we just skip underpaid XCM? This is a bit larger than just fee-related question, but it needs an answer before this work starts. https://github.com/paritytech/polkadot/pull/4097/files#r854844093