Skip to content

Commit

Permalink
docs: update the cip-6 reference implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
ninabarbakadze committed Apr 3, 2024
1 parent 46e1499 commit 4f2db3c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cips/cip-6.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ if err != nil {

This will now reject undecodable transactions. Decodable transactions will still have to pass the `AnteHandlers` before being accepted in a block so no further change is required.

A mechanism to enforce a minimum fee is already in place in the `DeductFeeDecorator`. Currently, this is the validators locally set value sourced from their config. To switch to a network-wide value, we introduce a new `param.Subspace` which solely consisty of the min gas price. If this is unpopulated, it will be set to the default value of `0.002utia` (which matches the current local min gas price). As a `param.Subspace`, this value can be modified via governance as can any other parameter.
A mechanism to enforce a minimum fee is already in place in the `DeductFeeDecorator`. Currently, this is the validators locally set value sourced from their config. To switch to a network-wide value, we introduce a new `param.Subspace`, `minfee`, which solely consists of the global min gas price. If this is unpopulated, it will be set to the default value of `0.002utia` (which matches the current local min gas price). As a `param.Subspace`, this value can be modified via governance as can any other parameter.

The `DeductFeeDecorator` antehandler will receive a new `ante.TxFeeChecker` function called `CheckTxFeeWithGlobalMinGasPrices` which will have access to the same `param.Subspace`. For `CheckTx`, it will use the max of either the global min gas price or the local min gas price. For `PrepareProposal`, `ProcessProposal` and `DeliverTx` it will only check using the global min gas price and ignore the locally set min gas price.
The `DeductFeeDecorator` antehandler will receive a new `ante.TxFeeChecker` function called `ValidateTxFee` which will have access to the same `param.Subspace`. For `CheckTx`, it will use the max of either the global min gas price or the local min gas price. For `PrepareProposal`, `ProcessProposal` and `DeliverTx` it will only check using the global min gas price and ignore the locally set min gas price.

The minimum gas price can already be queried through the gRPC client as can any other parameter.

Expand Down

0 comments on commit 4f2db3c

Please sign in to comment.