Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: lower the default mempool min gas price #2843

Merged
merged 3 commits into from
Nov 20, 2023

Conversation

evan-forbes
Copy link
Member

@evan-forbes evan-forbes commented Nov 14, 2023

Overview

The mempool minfee seems too high as the goal of it is just to reduce spam if the blocks are empty. The proper solution will come with a consensus critical dynamic minfee. For now the default should be lowered by an order of magnitude.

Checklist

  • New and updated code has appropriate documentation
  • New and updated code has new and/or updated testing
  • Required CI checks are passing
  • Visual proof for any user facing features like CLI or documentation updates
  • Linked issues closed with keywords

Summary by CodeRabbit

  • Refactor
    • Adjusted the minimum gas price settings for better transaction filtering efficiency.

@evan-forbes evan-forbes self-assigned this Nov 14, 2023
@celestia-bot celestia-bot requested a review from a team November 14, 2023 15:19
rootulp
rootulp previously approved these changes Nov 14, 2023
Copy link
Collaborator

@rootulp rootulp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be backported to v1.x?

@@ -62,7 +62,7 @@ func TestDefaultAppConfig(t *testing.T) {

assert.Equal(t, uint64(1500), cfg.StateSync.SnapshotInterval)
assert.Equal(t, uint32(2), cfg.StateSync.SnapshotKeepRecent)
assert.Equal(t, "0.1utia", cfg.MinGasPrices)
assert.Equal(t, "0.01utia", cfg.MinGasPrices)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[question] how was the previous value of .1 utia determined?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just rough estimates iirc

@rootulp rootulp added the backport:v1.x PR will be backported automatically to the v1.x branch upon merging label Nov 14, 2023
staheri14
staheri14 previously approved these changes Nov 14, 2023
cmwaters
cmwaters previously approved these changes Nov 15, 2023
@evan-forbes evan-forbes dismissed stale reviews from cmwaters, staheri14, and rootulp via 6933d28 November 20, 2023 11:45
@evan-forbes evan-forbes marked this pull request as ready for review November 20, 2023 11:45
Copy link
Contributor

coderabbitai bot commented Nov 20, 2023

Walkthrough

The recent update involves a reduction in the minimum gas price within a blockchain-related application. This change lowers the cost threshold for transactions to be processed, potentially allowing for higher transaction throughput or lower costs for users.

Changes

File Path Change Summary
app/default_overrides_test.go Updated MinGasPrices from "0.1utia" to "0.002utia" in TestDefaultAppConfig.
pkg/.../initial_consts.go Changed DefaultMinGasPrice constant from 0.1 to 0.002.

🐇 In the code where numbers dance,
A tiny change, yet vast in expanse.
As autumn leaves in whirls take flight,
We code with joy, from morn till night. 🍂✨


Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • If you reply to a review comment from CodeRabbit, the bot will automatically respond.
  • To engage with CodeRabbit bot directly around the specific lines of code in the PR, mention @coderabbitai in your review comment
  • Note: Review comments are made on code diffs or files, not on the PR overview.
  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Note: For conversation with the bot, please use the review comments on code diffs or files.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between b75c7e3 and 6933d28.
Files selected for processing (2)
  • app/default_overrides_test.go (1 hunks)
  • pkg/appconsts/initial_consts.go (1 hunks)
Additional comments: 2
app/default_overrides_test.go (1)
  • 65-65: The change to the MinGasPrices value in the test configuration correctly reflects the new lower minimum gas price of "0.002utia". This is consistent with the pull request's intent to lower the default minimum gas price in the mempool.
pkg/appconsts/initial_consts.go (1)
  • 20-23: The change to DefaultMinGasPrice from 0.1 to 0.002 is consistent with the pull request's description to lower the default minimum gas price. This change will affect the app.toml configuration and the transaction filtering process. Ensure that all dependent configurations and documentation are updated to reflect this new default value.

@cmwaters
Copy link
Contributor

#makedatafreeagain

@evan-forbes evan-forbes enabled auto-merge (squash) November 20, 2023 14:26
Copy link
Collaborator

@rootulp rootulp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[not blocking] should we include this default in params.md?

@@ -62,7 +62,7 @@ func TestDefaultAppConfig(t *testing.T) {

assert.Equal(t, uint64(1500), cfg.StateSync.SnapshotInterval)
assert.Equal(t, uint32(2), cfg.StateSync.SnapshotKeepRecent)
assert.Equal(t, "0.1utia", cfg.MinGasPrices)
assert.Equal(t, "0.002utia", cfg.MinGasPrices)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[question] how was .002utia arrived at? IIUC 0.1utia was arrived at based on rough estimates. How did the estimates change to go from 0.1 -> 0.01 -> 0.002?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the original value was off by two orders of magnitude, I would expect 0.1 -> 0.01 -> 0.001

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/cosmos/chain-registry/blob/957a4c779024535ea947e13db6b2d101305fcadd/celestia/chain.json#L21 I'll keep an eye on thei thread and match what the consensus here is, in chain-registry

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since .002utia got merged here, I think we may want to update chain-registry to

        "low_gas_price": 0.002,
        "average_gas_price": 0.004,
        "high_gas_price": 0.008

but we likely only want to do this after a decent chunk of validators have updated to a release that includes this. On second thought, I think their locally configured default won't get overridden with this new default so our release notes should probably explicitly call out the manual action that validators need to take.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cosmos/chain-registry#3239
chainapsis/keplr-chain-registry#290

updating these now, but leaving in draft

@evan-forbes evan-forbes merged commit 1eb203c into main Nov 20, 2023
31 checks passed
@evan-forbes evan-forbes deleted the evan/lower-default-mempool-minfee branch November 20, 2023 14:46
mergify bot pushed a commit that referenced this pull request Nov 20, 2023
## Overview

The mempool minfee seems too high as the goal of it is just to reduce
spam if the blocks are empty. The proper solution will come with a
consensus critical dynamic minfee. For now the default should be lowered
by an order of magnitude.

## Checklist

- [x] New and updated code has appropriate documentation
- [x] New and updated code has new and/or updated testing
- [x] Required CI checks are passing
- [x] Visual proof for any user facing features like CLI or
documentation updates
- [ ] Linked issues closed with keywords

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Refactor**
- Adjusted the minimum gas price settings for better transaction
filtering efficiency.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

(cherry picked from commit 1eb203c)
evan-forbes added a commit that referenced this pull request Nov 20, 2023
## Overview

The mempool minfee seems too high as the goal of it is just to reduce
spam if the blocks are empty. The proper solution will come with a
consensus critical dynamic minfee. For now the default should be lowered
by an order of magnitude.

## Checklist

- [x] New and updated code has appropriate documentation
- [x] New and updated code has new and/or updated testing
- [x] Required CI checks are passing
- [x] Visual proof for any user facing features like CLI or
documentation updates
- [ ] Linked issues closed with keywords

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Refactor**
- Adjusted the minimum gas price settings for better transaction
filtering efficiency.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

(cherry picked from commit 1eb203c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:v1.x PR will be backported automatically to the v1.x branch upon merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants