You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
There once was a fees module, but it was removed -- see #1993 for more details. I agree with the Gav's comment in which he mentioned that, because Substrate is not a fixed-function state-transition, transaction fees are not so clearly defined:
Substrate is not designed to provide fees to the block author and in some consensus methods, there may not even be a singular identifiable "block author". Some chains may choose to burn fees, others may pass them to one or more entities involved in block authorship, others (like Polkadot) may do a combination. Some more complex modules in Substrate may reserve "fees" and return them (or not) in the same block or some number of blocks later. None of this fits trivially and absolutely into a traditional definition of "transaction fees". src
I understand that #2048 introduces new types to handle situations in which currency must be minted or burned, but I don't think this renders a fees module completely useless. For Kusama, we have been using a Weight type to calculate transaction fees according to this research. If we really want Substrate to be generic, we ought to consider creating a separate module for managing fees instead of coding the Polkadot preferences as defaults into node/runtime and sr-primitives/weights.rs.
Not sure exactly how to do this yet, but we might consider the following:
include the types that depend on the Imbalance type (TransactionPayment, TransferPayment, DustRemoval) to fix this hack
OnFeeCharged for defining default behavior that occurs after a fee is charged (but first see here)
worth checking out the old fees module, git reset --hard 45824913c980bb1ba3963f9bba67775a507d8624 works for that purpose and git reset --hard HEAD gets you back to head of master
maybe include a collateral management system like Balance
There once was a
feesmodule, but it was removed -- see #1993 for more details. I agree with the Gav's comment in which he mentioned that, because Substrate is not a fixed-function state-transition, transaction fees are not so clearly defined:I understand that #2048 introduces new types to handle situations in which currency must be minted or burned, but I don't think this renders a
feesmodule completely useless. For Kusama, we have been using aWeighttype to calculate transaction fees according to this research. If we really want Substrate to be generic, we ought to consider creating a separate module for managing fees instead of coding the Polkadot preferences as defaults intonode/runtimeandsr-primitives/weights.rs.Not sure exactly how to do this yet, but we might consider the following:
Imbalancetype (TransactionPayment,TransferPayment,DustRemoval) to fix this hackgit reset --hard 45824913c980bb1ba3963f9bba67775a507d8624works for that purpose andgit reset --hard HEADgets you back to head of mastercc @kianenigma @xlc @joepetrowski