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: no legacy evm param after multi upgrades #1371

Merged
merged 7 commits into from
Apr 8, 2024

Conversation

mmsqe
Copy link
Collaborator

@mmsqe mmsqe commented Apr 5, 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

  • Bug Fixes
    • Addressed an RPC bug by adding a parameter keytable in EVM for an old upgrade.
  • New Features
    • Updated the application to support new EVM types and parameters.
    • Enhanced integration tests with new functionality for upgrade testing and parameter verification.
    • Improved configuration management in integration tests.
  • Chores
    • Updated dependencies in gomod2nix.toml to newer versions for better stability and performance.
  • Refactor
    • Refined the upgrade process in integration tests for more efficient testing of new versions.

Copy link
Contributor

coderabbitai bot commented Apr 5, 2024

Walkthrough

This update encompasses a series of enhancements and fixes focused on improving EVM compatibility, refining configurations, and strengthening testing frameworks. Key changes include a critical RPC bug fix in EVM, module version updates, configuration restructuring for cosmovisor, and the integration of new testing capabilities to ensure upgrade stability and parameter updates. These collective efforts aim to streamline application functionality and enhance operational robustness.

Changes

Files Change Summary
CHANGELOG.md Bug fix for RPC in EVM, introducing the keytable parameter.
app/app.go Imported v0evmtypes and updated initParamsKeeper to use v0evmtypes.ParamKeyTable().
gomod2nix.toml Updated versions and hashes for "github.com/evmos/ethermint" and "github.com/felixge/httpsnoop".
integration_tests/configs/...cosmovisor.jsonnet Restructured configuration, moving consensus_params under genesis, adding gov parameters, and adjusting bank parameters.
integration_tests/configs/...upgrade-test-package.nix, integration_tests/cosmoscli.py, integration_tests/test_gov_update_params.py, integration_tests/test_upgrade.py Introduced a new fetching function, additional keyword arguments, assertions for EVM parameter updates, and various enhancements in upgrade testing including function additions, refactoring, and verification processes.

🐰✨

In code's vast garden, under the moon's soft glow,
A diligent rabbit toils, with updates in tow.
From EVM's depths to testing's playful chase,
It hops through changes, leaving bugs no space.
With each commit, a better world in sight,
A digital burrow, basking in the light.
🌟🐾

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.

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 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.

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

codecov bot commented Apr 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 36.55%. Comparing base (6a16d57) to head (4d98fc0).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #1371       +/-   ##
===========================================
+ Coverage   15.37%   36.55%   +21.17%     
===========================================
  Files          80      129       +49     
  Lines        6138     9597     +3459     
===========================================
+ Hits          944     3508     +2564     
- Misses       5118     5712      +594     
- Partials       76      377      +301     

see 123 files with indirect coverage changes

@mmsqe mmsqe force-pushed the legacy_evm_params branch from 5add437 to 7de01aa Compare April 8, 2024 01:46
@mmsqe mmsqe marked this pull request as ready for review April 8, 2024 02:03
@mmsqe mmsqe requested a review from a team as a code owner April 8, 2024 02:03
@mmsqe mmsqe requested review from yihuang and thomas-nguy and removed request for a team April 8, 2024 02:03
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: 0

Review Status

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 6a16d57 and 276c5e1.
Files ignored due to path filters (2)
  • go.mod is excluded by !**/*.mod
  • go.sum is excluded by !**/*.sum
Files selected for processing (8)
  • CHANGELOG.md (1 hunks)
  • app/app.go (2 hunks)
  • gomod2nix.toml (1 hunks)
  • integration_tests/configs/cosmovisor.jsonnet (1 hunks)
  • integration_tests/configs/upgrade-test-package.nix (2 hunks)
  • integration_tests/cosmoscli.py (2 hunks)
  • integration_tests/test_gov_update_params.py (1 hunks)
  • integration_tests/test_upgrade.py (4 hunks)
Files not reviewed due to errors (1)
  • (no review received)
Additional comments not posted (11)
integration_tests/configs/upgrade-test-package.nix (2)

3-9: The addition of fetchFlake0 function is correctly implemented for fetching specific GitHub repository revisions.


24-25: The modifications to pkgs.linkFarm call, including the new released0 path for "genesis" and the addition of "v1.1.0", are correctly implemented for upgrade testing.

integration_tests/configs/cosmovisor.jsonnet (1)

13-45: The restructuring of the configuration, including the addition of governance parameters and adjustments to bank parameters, is logically implemented and improves the clarity and functionality of the configuration.

integration_tests/test_gov_update_params.py (1)

44-45: The added assertions for verifying the updates to merge_netsplit_block and shanghai_time in the EVM configuration are correctly implemented and essential for testing the expected behavior.

integration_tests/test_upgrade.py (3)

19-19: The addition of the get_send_enable function is correctly implemented for verifying send enable parameters as part of the upgrade testing process.


120-143: The do_upgrade function correctly refactors the upgrade process, improving maintainability and readability. Its implementation, including governance proposal handling and binary switching, is well-executed.


228-231: The verification of EVM parameters pre and post-upgrades using cli.query_params at specific heights is correctly implemented and essential for ensuring the integrity of the EVM configuration throughout the upgrade process.

CHANGELOG.md (1)

7-7: The changelog entry accurately reflects the addition made to the project. It's clear and provides a direct link to the PR for more details.

app/app.go (2)

131-131: The addition of v0evmtypes and its usage in initParamsKeeper to ensure compatibility with older EVM parameters aligns with the PR's objectives. However, please ensure that the suppression of static analysis warnings with //nolint: staticcheck is justified and documented to avoid potential issues in the future.

Also applies to: 1172-1172


128-134: > 📝 NOTE

This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [1-1171]

Ensure thorough testing and verification of the changes, especially how the newly introduced legacy EVM parameters interact with the current system functionalities. It's crucial to confirm that there are no conflicts or regressions introduced by these changes.

Also applies to: 1173-1310

integration_tests/cosmoscli.py (1)

1064-1073: The addition of **kwargs to query_params enhances method flexibility by allowing the passing of arbitrary keyword arguments. This is a positive change, assuming self.raw is designed to handle these appropriately.

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: 0

Review Status

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 276c5e1 and 1387c19.
Files selected for processing (2)
  • .github/workflows/build.yml (1 hunks)
  • .github/workflows/test.yml (1 hunks)
Files skipped from review due to trivial changes (1)
  • .github/workflows/test.yml
Additional comments not posted (1)
.github/workflows/build.yml (1)

89-89: Update of codecov/codecov-action to v4 is approved.

Ensure to verify the compatibility of the new action version with the workflow's requirements and check the action's documentation for any breaking changes or new features that could be leveraged.

@mmsqe mmsqe enabled auto-merge April 8, 2024 02:42
@mmsqe mmsqe added this pull request to the merge queue Apr 8, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 8, 2024
@mmsqe mmsqe added this pull request to the merge queue Apr 8, 2024
@mmsqe mmsqe removed this pull request from the merge queue due to a manual request Apr 8, 2024
@mmsqe mmsqe enabled auto-merge April 8, 2024 03:44
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: 0

Review Status

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 1387c19 and 4d98fc0.
Files selected for processing (2)
  • .github/workflows/lint.yml (1 hunks)
  • CHANGELOG.md (1 hunks)
Files skipped from review due to trivial changes (1)
  • .github/workflows/lint.yml
Additional comments not posted (1)
CHANGELOG.md (1)

9-9: The documentation of the addition of a parameter keytable in EVM for an old upgrade under v1.2.0-rc1 is clear and accurately reflects the PR objectives.

@mmsqe mmsqe added this pull request to the merge queue Apr 8, 2024
Merged via the queue into crypto-org-chain:main with commit 1aea999 Apr 8, 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