Skip to content

Commit

Permalink
CIP-24: Versioned Gas Scheduler Variables
Browse files Browse the repository at this point in the history
  • Loading branch information
ninabarbakadze committed Jul 24, 2024
1 parent 0301c23 commit 4ee7e05
Showing 1 changed file with 62 additions and 0 deletions.
62 changes: 62 additions & 0 deletions cips/cip-24.md
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).

0 comments on commit 4ee7e05

Please sign in to comment.