This PR aims to make x/ssi message incur fixed fees. Fees for each message is distinct and parameterised under x/ssi module. The rationale behind this has been described in HIP-9.
Implementation
Rules
If a transaction contains one SSI message (e.g. MsgCreateDID), then it will incur the exact cost as the current CreateDID fee. This is irrespective of the size of the message
If there are 2 or more SSI messages, the required fees would be the total sum of all fixed-fee cost of each SSI message. For example, lets say MsgCreateDID costs 4000uhid and MsgCreateSchema costs 2000uhid, the required fees would be 6000uhid
It should be noted that the user provided fees MUST MATCH with the required fees. For instance, if the required fees for a SSI transaction is 7500uhid, the user must provide 7500uhid as fee. Any value above or below 7500uhid is treated as invalid.
Since, SSI messages incur fixed cost and thus independent of gas consumption, they are NOT allowed to be grouped together with transaction messages of other SDK modules.
Ante Handlers
The x/ssi ante handlers SSITxDecorator, MempoolFeeDecorator and DeductFeeDecorator come together to perform the necessary verification to filter fixed-fee SSI messages and nominal non-SSI messages, and meter fixed charge for SSI messages. Order of calling ante handlers is crucial, and hence the position of these handlers should not be changed, unless a logic change is needed.
Governance Proposal
Any change of fee parameters of SSI transactions can be done by submitting a Param Change Governance Proposal. This type of Governance Proposal requires a JSON file (if done through CLI), describing the new values for consensus parameter(s), to be provided. Following is the format for changing the fixed-fee value of MsgCreateDID to 4578uhid
Description
This PR aims to make
x/ssi
message incur fixed fees. Fees for each message is distinct and parameterised underx/ssi
module. The rationale behind this has been described in HIP-9.Implementation
Rules
MsgCreateDID
), then it will incur the exact cost as the currentCreateDID
fee. This is irrespective of the size of the messageMsgCreateDID
costs4000uhid
andMsgCreateSchema
costs2000uhid
, the required fees would be6000uhid
7500uhid
, the user must provide7500uhid
as fee. Any value above or below7500uhid
is treated as invalid.Ante Handlers
The
x/ssi
ante handlersSSITxDecorator
,MempoolFeeDecorator
andDeductFeeDecorator
come together to perform the necessary verification to filter fixed-fee SSI messages and nominal non-SSI messages, and meter fixed charge for SSI messages. Order of calling ante handlers is crucial, and hence the position of these handlers should not be changed, unless a logic change is needed.Governance Proposal
Any change of fee parameters of SSI transactions can be done by submitting a
Param Change
Governance Proposal. This type of Governance Proposal requires a JSON file (if done through CLI), describing the new values for consensus parameter(s), to be provided. Following is the format for changing the fixed-fee value ofMsgCreateDID
to4578uhid
Querying current fixed fee
Querying the current fixed-fee for SSI transactions can be done through following methods: