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 upgrade plan for testnet #1322

Merged
merged 5 commits into from
Feb 19, 2024
Merged

Conversation

mmsqe
Copy link
Collaborator

@mmsqe mmsqe commented Feb 19, 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
    • Introduced a new upgrade plan v1.1.0-testnet-1 for the testnet, enhancing the platform's capabilities and performance.
  • Refactor
    • Simplified upgrade handling by refining parameters for core components.
  • Tests
    • Updated integration tests to align with the new testnet upgrade plan.

Copy link
Contributor

coderabbitai bot commented Feb 19, 2024

Walkthrough

The recent update involves introducing a new upgrade plan named v1.1.0-testnet-1 for the testnet. This change signifies an evolution from the previous version, impacting various components like the state machine and configurations. Notable adjustments include updating the upgrade plan name, removing specific parameter settings for CronosKeeper and FeeMarketKeeper, and aligning integration tests and configurations with the new testnet version.

Changes

File Path Summary
app/upgrades.go Updated testnetPlanName to v1.1.0-testnet-1 and removed certain parameter settings for CronosKeeper and FeeMarketKeeper.
integration_tests/configs/upgrade-testnet-test-package.nix Updated the package path in the linkFarm function call to v1.1.0-testnet-1.
integration_tests/test_upgrade.py Updated plan_name to include "-1" for the testnet scenario and removed lines related to querying "max_callback_gas" and its assertion.

🐇✨
In the realm of code, where changes abound,
A new testnet version, v1.1.0-testnet-1, is found.
With parameters pruned and paths anew,
We hop towards progress, with a vision true.
Let's celebrate the changes, both big and small,
For every leap forward, is a win for us all. 🚀🌟
🐇✨

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-tests for this file.
  • 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 tests 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 from git and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @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.
  • 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

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

CHANGELOG.md Outdated Show resolved Hide resolved
Signed-off-by: mmsqe <[email protected]>
Copy link

codecov bot commented Feb 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (185bb08) 15.85% compared to head (90610b4) 36.38%.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #1322       +/-   ##
===========================================
+ Coverage   15.85%   36.38%   +20.52%     
===========================================
  Files          80      118       +38     
  Lines        6249    10755     +4506     
===========================================
+ Hits          991     3913     +2922     
- Misses       5178     6463     +1285     
- Partials       80      379      +299     
Files Coverage Δ
app/upgrades.go 43.00% <100.00%> (+6.86%) ⬆️

... and 62 files with indirect coverage changes

@mmsqe mmsqe marked this pull request as ready for review February 19, 2024 12:31
@mmsqe mmsqe requested a review from a team as a code owner February 19, 2024 12:31
@mmsqe mmsqe requested review from yihuang and JayT106 and removed request for a team February 19, 2024 12:31
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 185bb08 and ec57b6c.
Files selected for processing (4)
  • CHANGELOG.md (1 hunks)
  • app/upgrades.go (1 hunks)
  • integration_tests/configs/upgrade-testnet-test-package.nix (1 hunks)
  • integration_tests/test_upgrade.py (2 hunks)
Additional comments: 6
integration_tests/configs/upgrade-testnet-test-package.nix (1)
  • 16-16: The update to the package path for the testnet upgrade plan is correctly implemented and aligns with the PR's objectives.
app/upgrades.go (2)
  • 122-122: The update to the testnetPlanName variable is correctly implemented and aligns with the PR's objectives.
  • 122-122: The removal of lines related to CronosKeeper and FeeMarketKeeper in the SetUpgradeHandler function simplifies the upgrade process. However, it's important to verify that this simplification does not introduce any unintended side effects or regressions in the upgrade process.
integration_tests/test_upgrade.py (2)
  • 142-142: The update to the plan_name variable in the integration test script correctly reflects the new testnet upgrade plan name and aligns with the PR's objectives.
  • 142-142: The removal of queries and assertions related to "max_callback_gas" in the integration test script is likely aimed at aligning with the updated upgrade plan. However, it's important to verify that this change does not omit necessary validations that ensure the upgrade process works as expected.
Verification successful

Given the need to verify the impact of removing queries and assertions related to "max_callback_gas" on the necessary validations in the integration tests, we will search the codebase for references to "max_callback_gas" and any related changes in the tests. This will help us understand whether the removal of these elements affects the integrity of the upgrade validation process.


The script output provides detailed information about the usage of "max_callback_gas" within the codebase and the specific changes made to the integration tests that involve this parameter. From the output, we can observe the following:

  1. The parameter "max_callback_gas" is referenced in various parts of the codebase, including protobuf definitions, simulation settings, and swagger documentation. This indicates its importance in the system's configuration.

  2. A specific pull request (#1252) added a plan v1.1.0-testnet to update the default max_callback_gas parameter, suggesting that adjustments to this parameter are part of the upgrade process.

  3. The integration test test_gov_update_params.py includes a test case that updates the max_callback_gas parameter among others, indicating that there is a mechanism to test changes to this parameter through governance proposals.

  4. The commit ec57b6cc9df892d233cd60f706c38163c6f183db shows the removal of assertions related to max_callback_gas in test_upgrade.py. This removal is part of a broader set of changes aimed at fixing the test, which suggests that the test was adjusted to align with the new upgrade plan.

Given this context, the removal of queries and assertions related to "max_callback_gas" in the integration test script seems to be a deliberate decision to align with the updated upgrade plan. The presence of other tests that can update and verify the max_callback_gas parameter, as well as the inclusion of this parameter in the upgrade plan, suggests that necessary validations related to this parameter can still be performed through other means.

Therefore, based on the information gathered, it appears that the removal of specific queries and assertions related to "max_callback_gas" does not omit necessary validations in the integration tests, as other mechanisms are in place to ensure the upgrade process works as expected.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Verify that the removal of queries and assertions related to "max_callback_gas" does not omit necessary validations in the integration tests.
# This script is a placeholder for the actual verification steps, which should be performed manually or through automated tests.
echo "Manual verification needed to ensure the removal of queries and assertions related to 'max_callback_gas' does not omit necessary validations."

Length of output: 298



Script:

#!/bin/bash
# Search for references to "max_callback_gas" in the codebase to understand its usage and the context of its removal.
rg "max_callback_gas" --context 5

# Search for recent changes in the integration tests that might relate to the upgrade process and "max_callback_gas".
git log -p -S "max_callback_gas" -- integration_tests/

Length of output: 23491

CHANGELOG.md (1)
  • 10-10: The addition of the new upgrade plan v1.1.0-testnet-1 for the testnet is well-documented under the "State Machine Breaking" section for the release v1.1.0-rc4. The inclusion of the PR link enhances traceability and accountability. Good job on maintaining a clear and concise CHANGELOG.

CHANGELOG.md Show resolved Hide resolved
Co-authored-by: yihuang <[email protected]>
Signed-off-by: mmsqe <[email protected]>
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 ec57b6c and 44a08a0.
Files selected for processing (1)
  • CHANGELOG.md (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • CHANGELOG.md

@yihuang yihuang enabled auto-merge February 19, 2024 12:50
@yihuang yihuang added this pull request to the merge queue Feb 19, 2024
@mmsqe mmsqe removed this pull request from the merge queue due to a manual request Feb 19, 2024
@mmsqe mmsqe enabled auto-merge February 19, 2024 13:24
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 44a08a0 and 90610b4.
Files selected for processing (3)
  • app/upgrades.go (2 hunks)
  • integration_tests/configs/upgrade-testnet-test-package.nix (1 hunks)
  • integration_tests/test_upgrade.py (1 hunks)
Files skipped from review as they are similar to previous changes (3)
  • app/upgrades.go
  • integration_tests/configs/upgrade-testnet-test-package.nix
  • integration_tests/test_upgrade.py

@mmsqe mmsqe added this pull request to the merge queue Feb 19, 2024
Merged via the queue into crypto-org-chain:main with commit 114f5a3 Feb 19, 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