-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CIP-24: Versioned Gas Scheduler Variables
- Loading branch information
1 parent
0301c23
commit 4ee7e05
Showing
1 changed file
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
| cip | 24 | | ||
| - | - | | ||
| title | Versioned Gas Scheduler Variables | | ||
| description | Gas scheduler variables hard fork modifiable | | ||
| author | Nina Barbakadze (@ninabarbakadze) | | ||
| discussions-to | | | ||
| status | Draft | | ||
| type | Standards Track | | ||
| category | Core | | ||
| created | 2024-07-24 | | ||
|
||
## Abstract | ||
|
||
Currently, `GasPerBlobByte` and `TxSizeCostPerByte` are defined as module parameters within their respective modules, `blob` and `auth`, allowing for their modification via a `ParameterChangeProposal` in the Cosmos SDK. | ||
|
||
The proposed solution is to transition these parameters to hardcoded values within the application that can be accessed with a gatter throughout the application. | ||
|
||
## Motivation | ||
|
||
Versioning on-chain governance modifiable parameters, such as `blob.GasPerBlobByte` and `auth.TxSizeCostPerByte`, aims to stabilize gas estimation by removing block-to-block variability. | ||
|
||
## Specification | ||
|
||
Currently, `GasPerBlobByte` and `TxSizeCostPerByte` are module parameters within the `blob` and `auth` modules, allowing for their modification via ParameterChangeProposal. The proposed modification changes these parameters to hardcoded constants within the application, accessible via version-specific getters. | ||
|
||
### Parameters | ||
|
||
The proposal makes these two variables modifiable through hard fork upgrades: | ||
|
||
Previously: | ||
|
||
1. `blob.GasPerBlobByte` | ||
2. `auth.TxSizeCostPerByte` | ||
|
||
Now: | ||
|
||
1. `appconsts.GasPerBlobByte` | ||
1. `appconsts.TxSizeCostPerByte` | ||
|
||
### Rationale | ||
|
||
Versioned Gas Scheduler Variables allow for hardcoding these values into estimators, simplifying the gas estimation process and making transaction costs more predictable without the need for pre-transaction queries. | ||
|
||
## Backwards Compatibility | ||
|
||
Enabling this feature requires a hard fork network upgrade. | ||
|
||
## Test Cases | ||
|
||
Test cases should verify that gas scheduler variables are exclusively updated via hard fork, effectively preventing updates through governance mechanisms. | ||
|
||
## Reference Implementation | ||
|
||
TBC | ||
|
||
## Security Considerations | ||
|
||
This change prioritizes network stability and predictability but requires heightened vigilance against potential misconfigurations. | ||
|
||
## Copyright | ||
|
||
Copyright and related rights waived via [CC0](https://github.com/celestiaorg/CIPs/blob/main/LICENSE). |