Conversation
| /// 1) if message has been dispatched successfully, but post-dispatch weight is less than | ||
| /// the weight, declared by the message sender; | ||
| /// 2) if message has not been dispatched at all. |
There was a problem hiding this comment.
I was thinking a bit about burning part of that weight, or returning part of the fee to the message sender, but I concluded that it doesn't make much sense for now. Leaving the comment here for posterity though.
- In case of target-chain fee payment, messages senders are heavily incentivised to specify the lowest possible weight, cause they pay up-front. Any unused weight is benefiting the relayers now by increasing their reward for accepting target-chain fee payment, which inherently increases the risk for them. So that seems to be quite aligned.
- In case of source-chain fee payment, the situation is quite similar - in such case relayers risk is increased by price fluctuation though.
- Hence message senders does not really benefit directly from having the dispatch consume less weight than declared, cause they pay for dispatch upfront. Burning part of the unused weight would only reduce reward for the relayers (which are exposed to a bunch of risks already) and would unnecessarily inflate block consumption.
- Returning part of unused fee to senders reduces their incentive to calculate the fee correctly and increases risk for the relayers.
Overall we might consider doing a more detailed analysis, perhaps there is some fair split between returning/burning/leaving to the relayer, but taking into account real-world data will be a great help for this, so I'd rather collect it first :)
My gut feeling is that relayers are more on the upside here, but I think it's acceptable for the first deployment.
…e/delivery tx cost
|
Some notes about weight of the delivery transaction - it has been increased from As a result of ^^^, we now able to deliver only |
tomusdrw
left a comment
There was a problem hiding this comment.
looks good to me! Couple of small grumbles and questions. I'm super sorry it took my so long to take a look at this.
Co-authored-by: Tomasz Drwięga <[email protected]>
Co-authored-by: Tomasz Drwięga <[email protected]>
Co-authored-by: Tomasz Drwięga <[email protected]>
Co-authored-by: Tomasz Drwięga <[email protected]>
* Add the uniques migration for statemine * return weight from on_runtime_upgrade (#914) need to return the weight from on_runtimie_upgrade(). * cargo update -p sp-io * cargo update -p polkadot-primitives Co-authored-by: hamidra <[email protected]>
* pay dispatch fee at target chain
* refund unspent dispatch weight to messages relayer
* test that transfer actually happens
* pay-at-target-cchain benchmarks + fix previous benchmarks (invalid signature)
* include/exclude pay-dispatch-fee weight from delivery_and_dispatch_fee/delivery tx cost
* remvoe some redundant traces
* enum DispatchFeePayment {}
* typo
* update docs
* (revert removal of valid check)
* Update modules/messages/src/benchmarking.rs
Co-authored-by: Tomasz Drwięga <[email protected]>
* Update modules/messages/src/benchmarking.rs
Co-authored-by: Tomasz Drwięga <[email protected]>
* Update modules/messages/src/benchmarking.rs
Co-authored-by: Tomasz Drwięga <[email protected]>
* Update modules/messages/src/benchmarking.rs
Co-authored-by: Tomasz Drwięga <[email protected]>
Co-authored-by: Tomasz Drwięga <[email protected]>
Co-authored-by: Tomasz Drwięga <[email protected]>
* pay dispatch fee at target chain
* refund unspent dispatch weight to messages relayer
* test that transfer actually happens
* pay-at-target-cchain benchmarks + fix previous benchmarks (invalid signature)
* include/exclude pay-dispatch-fee weight from delivery_and_dispatch_fee/delivery tx cost
* remvoe some redundant traces
* enum DispatchFeePayment {}
* typo
* update docs
* (revert removal of valid check)
* Update modules/messages/src/benchmarking.rs
Co-authored-by: Tomasz Drwięga <[email protected]>
* Update modules/messages/src/benchmarking.rs
Co-authored-by: Tomasz Drwięga <[email protected]>
* Update modules/messages/src/benchmarking.rs
Co-authored-by: Tomasz Drwięga <[email protected]>
* Update modules/messages/src/benchmarking.rs
Co-authored-by: Tomasz Drwięga <[email protected]>
Co-authored-by: Tomasz Drwięga <[email protected]>
Co-authored-by: Tomasz Drwięga <[email protected]>
closes #377
closes #561
Things to do in this PR (quite a lot - opening just to show some progress):
messagesadapter;Things to do in follow-up PRs:
encode-call,send-messageand other subcommands;