From 4f2db3c2bd0e82ec0aa9174c85f7d9cc8fc6efde Mon Sep 17 00:00:00 2001 From: Nina Barbakadze Date: Wed, 3 Apr 2024 11:26:52 +0200 Subject: [PATCH 1/4] docs: update the cip-6 reference implementation --- cips/cip-6.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cips/cip-6.md b/cips/cip-6.md index 347b7f4..d537198 100644 --- a/cips/cip-6.md +++ b/cips/cip-6.md @@ -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. From a0e2411664f740c37a724cba11e9e93f9398faef Mon Sep 17 00:00:00 2001 From: Nina Barbakadze Date: Wed, 3 Apr 2024 12:33:23 +0200 Subject: [PATCH 2/4] docs: change last call to final --- cips/cip-6.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cips/cip-6.md b/cips/cip-6.md index d537198..fe93a65 100644 --- a/cips/cip-6.md +++ b/cips/cip-6.md @@ -4,7 +4,7 @@ title: Mininum gas price enforcement description: Enforce payment of the gas for a transaction based on a governance modifiable global minimum gas price author: Callum Waters (@cmwaters) discussions-to: https://forum.celestia.org/t/cip-006-price-enforcement/1351 -status: Last Call +status: Final last-call-deadline: 2024-03-06 type: Standards Track category: Core From 9ec2ee37d8c92546f7aebfdb366c55f8f8071098 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?nina=20/=20=E1=83=9C=E1=83=98=E1=83=9C=E1=83=90?= Date: Wed, 3 Apr 2024 17:19:47 +0200 Subject: [PATCH 3/4] Update cips/cip-6.md Co-authored-by: Josh Stein <46639943+jcstein@users.noreply.github.com> --- cips/cip-6.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cips/cip-6.md b/cips/cip-6.md index fe93a65..d537198 100644 --- a/cips/cip-6.md +++ b/cips/cip-6.md @@ -4,7 +4,7 @@ title: Mininum gas price enforcement description: Enforce payment of the gas for a transaction based on a governance modifiable global minimum gas price author: Callum Waters (@cmwaters) discussions-to: https://forum.celestia.org/t/cip-006-price-enforcement/1351 -status: Final +status: Last Call last-call-deadline: 2024-03-06 type: Standards Track category: Core From 43d6dd2e27f2b653997534cc33a82161330f800c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?nina=20/=20=E1=83=9C=E1=83=98=E1=83=9C=E1=83=90?= Date: Thu, 4 Apr 2024 09:40:57 +0200 Subject: [PATCH 4/4] Update cips/cip-6.md Co-authored-by: Rootul P --- cips/cip-6.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cips/cip-6.md b/cips/cip-6.md index d537198..28d2487 100644 --- a/cips/cip-6.md +++ b/cips/cip-6.md @@ -81,7 +81,7 @@ 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`, `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. +A mechanism to enforce a minimum fee is already in place in the `DeductFeeDecorator`. Currently, the decorator uses a min gas price sourced from the validator's local config. To introduce a network-wide constraint on min gas price, we introduce a new `param.Subspace=minfee`, which contains the global min gas price. If the param is unpopulated, it defaults to `0.002utia` (which matches the current local 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.