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

Problem: mempool.max-txs flag is not supported #1503

Merged
merged 4 commits into from
Jul 3, 2024

Conversation

mmsqe
Copy link
Collaborator

@mmsqe mmsqe commented Jul 2, 2024

👮🏻👮🏻👮🏻 !!!! REFERENCE THE PROBLEM YOUR ARE SOLVING IN THE PR TITLE AND DESCRIBE YOUR SOLUTION HERE !!!! DO NOT FORGET !!!! 👮🏻👮🏻👮🏻

PR Checklist:

  • Have you read the CONTRIBUTING.md?
  • Does your PR follow the C4 patch requirements?
  • Have you rebased your work on top of the latest master?
  • Have you checked your code compiles? (make)
  • Have you included tests for any non-trivial functionality?
  • Have you checked your code passes the unit tests? (make test)
  • Have you checked your code formatting is correct? (go fmt)
  • Have you checked your basic code style is fine? (golangci-lint run)
  • If you added any dependencies, have you checked they do not contain any known vulnerabilities? (go list -json -m all | nancy sleuth)
  • If your changes affect the client infrastructure, have you run the integration test?
  • If your changes affect public APIs, does your PR follow the C4 evolution of public contracts?
  • If your code changes public APIs, have you incremented the crate version numbers and documented your changes in the CHANGELOG.md?
  • If you are contributing for the first time, please read the agreement in CONTRIBUTING.md now and add a comment to this pull request stating that your PR is in accordance with the Developer's Certificate of Origin.

Thank you for your code, it's appreciated! :)

Summary by CodeRabbit

  • New Features

    • Configurable mempool MaxTx parameter with a default value of 3000.
    • Added ability to set mempool.max-txs to 25000 during benchmark tests.
  • Dependency Updates

    • Updated github.com/crypto-org-chain/ethermint to a new version for enhanced performance and stability.
  • Bug Fixes

    • Removed outdated constants and updated references to improve code maintainability.
  • Documentation

    • Updated CHANGELOG.md to reflect the latest changes and improvements.

@mmsqe mmsqe requested a review from a team as a code owner July 2, 2024 13:04
@mmsqe mmsqe requested review from yihuang and thomas-nguy and removed request for a team July 2, 2024 13:04
Copy link
Contributor

coderabbitai bot commented Jul 2, 2024

Walkthrough

The changes improve the cronos project by updating the mempool transaction limit configuration and aligning dependencies with the latest versions. This includes updating DefaultMaxTxs references, enhancing the benchmark testing with new mempool parameters, and making necessary module version adjustments.

Changes

File Change Summary
CHANGELOG.md Updated to include a summary of setting the mempool MaxTx from the configuration with a default value of 3000.
app/app.go Adjusted imports, removed DefaultMaxTxs constant, and updated references to servercfg.DefaultMaxTxs.
go.mod Upgraded ethermint dependency to a new hash and version.
gomod2nix.toml Synced ethermint module version and hash with those in go.mod.
testground/benchmark/benchmark... Added mempool parameter in subprocess.Popen call to set max-txs to 25000.
testground/benchmark/benchmark... Introduced mempool.max-txs configuration in config_patch.

Poem

In Cronos' realm, changes bloom,
Mempools grow, past the gloom.
Code aligns, dependencies neat,
Ethermint's rhythm, now on repeat.
Benchmarks soar with max-txs high,
Under the open, starry sky.
Progress whispers, as updates fly.

Tip

AI model upgrade

gpt-4o model for reviews and chat is now live

OpenAI claims that this model is better at understanding and generating code than the previous models. Please join our Discord Community to provide any feedback or to report any issues.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

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 an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • 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/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

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.

Actionable comments posted: 4

Outside diff range and nitpick comments (1)
app/app.go (1)

[!TIP]
Codebase Verification

Definition of servercfg.DefaultMaxTxs is missing.

The code references servercfg.DefaultMaxTxs, but this constant is not defined anywhere in the local repository. Please define DefaultMaxTxs in the appropriate location within the servercfg package.

  • app/app.go
Analysis chain

Line range hint 377-383: LGTM! But verify the definition of servercfg.DefaultMaxTxs.

The code changes are approved. The logic for setting the mempool configuration with a maximum number of transactions is correct.

However, ensure that servercfg.DefaultMaxTxs is correctly defined and used in the codebase.

Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the definition of `servercfg.DefaultMaxTxs`.

# Test: Search for the definition of `DefaultMaxTxs` in `server/config`.
rg --type go --pattern 'DefaultMaxTxs' server/config

Length of output: 464



Script:

#!/bin/bash
# Description: Verify the definition of `servercfg.DefaultMaxTxs`.

# Test: Search for the definition of `DefaultMaxTxs` in `server/config`.
rg 'DefaultMaxTxs' server/config

Length of output: 86



Script:

#!/bin/bash
# Description: Verify the definition of `servercfg.DefaultMaxTxs`.

# Test: Search for the definition of `DefaultMaxTxs` in the entire codebase.
rg 'DefaultMaxTxs'

Length of output: 65



Script:

#!/bin/bash
# Description: Verify the import and definition of `servercfg`.

# Test: Search for the import statement of `servercfg` in `app/app.go`.
rg 'servercfg' app/app.go

# Test: Search for the definition of `servercfg` in the entire codebase.
rg 'servercfg'

Length of output: 485



Script:

#!/bin/bash
# Description: Verify the definition of `DefaultMaxTxs` in the `github.com/evmos/ethermint/server/config` package.

# Test: Search for the definition of `DefaultMaxTxs` in the `github.com/evmos/ethermint/server/config` package.
rg 'DefaultMaxTxs' $(go list -m -f '{{.Dir}}' github.com/evmos/ethermint)/server/config

Length of output: 213



Script:

#!/bin/bash
# Description: Verify the definition of `DefaultMaxTxs` in the local repository.

# Test: Search for the definition of `DefaultMaxTxs` in the local repository.
rg 'DefaultMaxTxs'

Length of output: 65

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 86a00f3 and 3068e8e.

Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
Files selected for processing (5)
  • CHANGELOG.md (1 hunks)
  • app/app.go (3 hunks)
  • go.mod (1 hunks)
  • gomod2nix.toml (1 hunks)
  • testground/benchmark/benchmark/main.py (1 hunks)
Additional context used
Ruff
testground/benchmark/benchmark/main.py

33-33: Use context handler for opening files

(SIM115)

Markdownlint
CHANGELOG.md

24-24: Expected: 0 or 2; Actual: 1
Trailing spaces

(MD009, no-trailing-spaces)


26-26: Expected: 1; Actual: 2
Multiple consecutive blank lines

(MD012, no-multiple-blanks)


27-27: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)

Additional comments not posted (3)
go.mod (1)

280-280: LGTM!

The version update for the github.com/evmos/ethermint module aligns with the PR objective.

gomod2nix.toml (1)

265-266: Verify consistency of module version and hash updates.

Ensure that the version and hash updates for the github.com/evmos/ethermint module in this file are consistent with the changes in the go.mod file.

CHANGELOG.md (1)

24-24: Changelog entry addition approved.

The new changelog entry for setting mempool MaxTx from config looks good.

Tools
Markdownlint

24-24: Expected: 0 or 2; Actual: 1
Trailing spaces

(MD009, no-trailing-spaces)

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.

Actionable comments posted: 2

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 3068e8e and 15a2c07.

Files selected for processing (2)
  • CHANGELOG.md (1 hunks)
  • testground/benchmark/benchmark/peer.py (1 hunks)
Files skipped from review due to trivial changes (1)
  • testground/benchmark/benchmark/peer.py
Additional context used
Markdownlint
CHANGELOG.md

26-26: Expected: 1; Actual: 2
Multiple consecutive blank lines

(MD012, no-multiple-blanks)


27-27: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)

Additional comments not posted (1)
CHANGELOG.md (1)

26-26: Remove multiple consecutive blank lines.

There are multiple consecutive blank lines. It is recommended to remove the extra blank line to comply with markdown linting rules.

- 
- 
+ 

Likely invalid or redundant comment.

Tools
Markdownlint

26-26: Expected: 1; Actual: 2
Multiple consecutive blank lines

(MD012, no-multiple-blanks)

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.

Actionable comments posted: 2

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 15a2c07 and 78bc32d.

Files selected for processing (2)
  • CHANGELOG.md (1 hunks)
  • testground/benchmark/benchmark/peer.py (3 hunks)
Files skipped from review as they are similar to previous changes (1)
  • testground/benchmark/benchmark/peer.py
Additional context used
Markdownlint
CHANGELOG.md

26-26: Expected: 1; Actual: 2
Multiple consecutive blank lines

(MD012, no-multiple-blanks)


27-27: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)

Additional comments not posted (1)
CHANGELOG.md (1)

26-26: Remove multiple consecutive blank lines.

There are multiple consecutive blank lines. It is recommended to remove the extra blank line to comply with markdown linting rules.

- 
- 
+ 

Likely invalid or redundant comment.

Tools
Markdownlint

26-26: Expected: 1; Actual: 2
Multiple consecutive blank lines

(MD012, no-multiple-blanks)

@mmsqe mmsqe enabled auto-merge July 3, 2024 01:09
@mmsqe mmsqe added this pull request to the merge queue Jul 3, 2024
Merged via the queue into crypto-org-chain:main with commit 1bb8cf0 Jul 3, 2024
45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants