-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Add ConstFeeMultiplier
to the transaction payment pallet
#12222
Add ConstFeeMultiplier
to the transaction payment pallet
#12222
Conversation
User @mrshiposha, please sign the CLA here. |
The template node was kept simple on purpose, to not confuse new developers. |
Yeah, this is intentional. The That being said, I think the intention is to disable any weight multiplier update for node-template. This means that the default value should be set to 1, and the convert should be |
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.
Valid concern, but needs a different approach! I would appreciate if you fix this.
@kianenigma maybe it would be nice to change the default implementation of the So the default implementation won't change the multiplier. And I will revert all the changes to the template node. |
IMO it would be better to add a new implement for the trait, since we extensively use |
FeeMultiplierUpdate
in the template nodeConstFeeMultiplier
to the transaction payment pallet
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! Can you put a polkadot address in the description for a tip https://github.com/apps/substrate-tip-bot?
Added, thank you! :) |
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!
CI is currently broken, but that's not your fault.
/tip small |
@kianenigma A small tip was successfully submitted for MrShiposha (11Ze4Gi9iHZ1qPEweUewWk5iUTYL4Zd18VxKZ6cHhqyrfep on polkadot). https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.polkadot.io#/treasury/tips |
bot merge |
…h#12222) * fix: FeeMultiplierUpdate * fix: cargo fmt * fix: rustdoc * Revert "fix: rustdoc" This reverts commit 96b6ad8. * Revert "fix: cargo fmt" This reverts commit 1301652. * Revert "fix: FeeMultiplierUpdate" This reverts commit 2cbddd0. * feat: add ConstFeeMultiplier * fix: use cConstFeeMultiplier in the template node
Currently, the template node sets the
FeeMultiplierUpdate
of thepallet_transaction_payment::Config
to the unit type.It seems not obvious (and barely noticeable) that the default implementation of the
MultiplierUpdate
trait returns0
(and not1
).Because of that, the transaction weights will be discarded due to the multiplication by 0 inside the transaction payment pallet.
This PR suggests using the
FeeMultipleUpdate
equivalent to theSlowAdjustingFeeUpdate
from the Polkadot runtime common.I believe it will fix the non-obvious behavior and will add extra useful info to the template node.
polkadot address: 11Ze4Gi9iHZ1qPEweUewWk5iUTYL4Zd18VxKZ6cHhqyrfep