Skip to content

Conversation

@randy-cro
Copy link
Contributor

@randy-cro randy-cro commented Dec 8, 2025

👮🏻👮🏻👮🏻 !!!! 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

  • Tests

    • Added EVM parameter validation tests covering boundary and overflow scenarios to ensure governance updates behave correctly.
  • Chores

    • Extended CI test matrix to include EVM tests.
    • Bumped and updated module dependencies and related configuration entries.
  • Documentation

    • Added changelog entry noting EVM parameter validation updates.

✏️ Tip: You can customize this high-level summary in your review settings.

@randy-cro randy-cro requested a review from a team as a code owner December 8, 2025 05:12
@randy-cro randy-cro requested review from JayT106 and calvinaco and removed request for a team December 8, 2025 05:12
@github-actions github-actions bot added the ci label Dec 8, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 8, 2025

Walkthrough

Adds "evm" to the CI integration test matrix, introduces a new Python integration test validating EVM parameter int64 overflow behavior, updates changelog, and bumps/updates several Go dependency pins and gomod2nix entries.

Changes

Cohort / File(s) Summary
Workflow Configuration
\.github/workflows/test.yml
Adds "evm" to the integration test matrix and includes it in the TESTS_TO_RUN environment variable.
Integration Tests
integration_tests/test_evm_params_int_64_overflow.py
New Python integration test module with five tests verifying EVM params (header_hash_num, history_serve_window) across bounds: zero, valid value, MAX_INT64 boundary, overflow (MAX_INT64+1), and UINT64_MAX; includes helper functions for querying and submitting governance param updates.
Changelog
CHANGELOG.md
Adds an UNRELEASED entry noting a chore to add validation for HeaderHashNum and HistoryServeWindow in EVM params.
Dependency Updates
go.mod, gomod2nix.toml
Bumps github.com/spf13/cobra v1.10.1 → v1.10.2; updates github.com/evmos/ethermint replace/pseudo-version in go.mod and updates module hashes/versions in gomod2nix.toml.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Review the new integration test logic and assertions (file: integration_tests/test_evm_params_int_64_overflow.py)
  • Verify CI matrix change (.github/workflows/test.yml) integrates cleanly with existing workflow steps
  • Confirm dependency pseudo-version/hash updates in go.mod and gomod2nix.toml match intended forks/versions

Possibly related PRs

Suggested reviewers

  • calvinaco
  • JayT106
  • yihuang

Poem

🐰
Hops to the CI where evm tests play,
Counting hashes and windows all day,
Boundaries checked, proposals sent on air,
Blocks keep producing with careful care,
A little rabbit cheers — code trimmed and fair.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title accurately describes the main change: adding validation for HeaderHashNum and HistoryServeWindow variables in EVM parameters, which aligns with the new integration test for EVM parameter validation and the changelog entry.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c7633cd and d26d4ce.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (2)
  • go.mod (2 hunks)
  • gomod2nix.toml (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • gomod2nix.toml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (22)
  • GitHub Check: gomod2nix
  • GitHub Check: build (macos-latest)
  • GitHub Check: build (macos-14)
  • GitHub Check: build (ubuntu-latest)
  • GitHub Check: unittest
  • GitHub Check: integration_tests (slow)
  • GitHub Check: integration_tests (gas)
  • GitHub Check: integration_tests (evm)
  • GitHub Check: integration_tests (mint)
  • GitHub Check: integration_tests (gov)
  • GitHub Check: integration_tests (ibc_timeout)
  • GitHub Check: integration_tests (upgrade)
  • GitHub Check: integration_tests (ibc_update_client)
  • GitHub Check: integration_tests (unmarked)
  • GitHub Check: integration_tests (ica)
  • GitHub Check: integration_tests (ibc)
  • GitHub Check: integration_tests (ibc_rly_gas)
  • GitHub Check: integration_tests (ibc_rly_evm)
  • GitHub Check: Run golangci-lint
  • GitHub Check: Socket Security: Pull Request Alerts
  • GitHub Check: semgrep-cloud-platform/scan
  • GitHub Check: semgrep-cloud-platform/scan
🔇 Additional comments (2)
go.mod (2)

38-38: Cobra patch-level version bump is safe.

The update from v1.10.1 to v1.10.2 is a patch-level maintenance release with no expected breaking changes.


306-306: Verify that the ethermint version update includes the necessary EVM parameter validation changes.

The pseudo-version for github.com/crypto-org-chain/ethermint has been updated from v0.22.1-0.20251204034614-3b1542d755b6 to v0.22.1-0.20251208051817-9f5d1db3246d. The timestamp progression (Dec 4 → Dec 8) is consistent with the PR creation date. Please confirm that commit 9f5d1db3246d in the crypto-org-chain/ethermint fork includes the validation logic for HeaderHashNum and HistoryServeWindow parameters and that this version is compatible with the rest of the codebase.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@socket-security
Copy link

socket-security bot commented Dec 8, 2025

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedgolang/​github.com/​crypto-org-chain/​ethermint@​v0.22.1-0.20251204034614-3b1542d755b6 ⏵ v0.22.1-0.20251208051817-9f5d1db3246d75 +110010010070
Updatedgolang/​github.com/​spf13/​cobra@​v1.10.1 ⏵ v1.10.295100100100100

View full report

@codecov
Copy link

codecov bot commented Dec 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 37.13%. Comparing base (a3c2f70) to head (d26d4ce).
⚠️ Report is 125 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #1933       +/-   ##
===========================================
+ Coverage   16.87%   37.13%   +20.25%     
===========================================
  Files          72      127       +55     
  Lines        6163     9757     +3594     
===========================================
+ Hits         1040     3623     +2583     
- Misses       5000     5713      +713     
- Partials      123      421      +298     

see 121 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

🧹 Nitpick comments (1)
integration_tests/test_evm_params_int_64_overflow.py (1)

33-62: Refine exception handling in test helper function.

The current exception handling catches bare Exception which is too broad. While this may work for testing, it could mask unexpected errors and make debugging harder.

Consider catching more specific exceptions:

 def submit_evm_param_update(cronos, params):
     """
     Submit a governance proposal to update EVM module parameters.
 
     Args:
         cronos: Cronos cluster instance
         params: Complete params dict with updated values
 
     Returns:
         True if proposal passes, False if it fails
     """
     authority = module_address("gov")
     msg = "/ethermint.evm.v1.MsgUpdateParams"
 
     try:
         submit_gov_proposal(
             cronos,
             msg,
             messages=[
                 {
                     "@type": msg,
                     "authority": authority,
                     "params": params,
                 }
             ],
         )
-        return True
-    except (AssertionError, Exception) as e:
+    except AssertionError as e:
         print(f"Proposal failed as expected: {e}")
         return False
+    else:
+        return True

This change:

  1. Removes the broad Exception catch that could mask bugs
  2. Moves the success return to an else block for clarity
  3. Only catches AssertionError which is the expected failure mode from submit_gov_proposal
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bb992dd and c7633cd.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (5)
  • .github/workflows/test.yml (1 hunks)
  • CHANGELOG.md (1 hunks)
  • go.mod (2 hunks)
  • gomod2nix.toml (2 hunks)
  • integration_tests/test_evm_params_int_64_overflow.py (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
integration_tests/test_evm_params_int_64_overflow.py (2)
integration_tests/utils.py (1)
  • wait_for_new_blocks (134-142)
integration_tests/cosmoscli.py (1)
  • query_params (1115-1126)
🪛 Ruff (0.14.7)
integration_tests/test_evm_params_int_64_overflow.py

59-59: Consider moving this statement to an else block

(TRY300)


60-60: Do not catch blind exception: Exception

(BLE001)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (19)
  • GitHub Check: Run golangci-lint
  • GitHub Check: build (macos-14)
  • GitHub Check: build (macos-latest)
  • GitHub Check: build (ubuntu-latest)
  • GitHub Check: gomod2nix
  • GitHub Check: unittest
  • GitHub Check: integration_tests (slow)
  • GitHub Check: integration_tests (evm)
  • GitHub Check: integration_tests (gas)
  • GitHub Check: integration_tests (gov)
  • GitHub Check: integration_tests (ica)
  • GitHub Check: integration_tests (mint)
  • GitHub Check: integration_tests (ibc)
  • GitHub Check: integration_tests (ibc_rly_gas)
  • GitHub Check: integration_tests (ibc_timeout)
  • GitHub Check: integration_tests (ibc_update_client)
  • GitHub Check: integration_tests (unmarked)
  • GitHub Check: integration_tests (upgrade)
  • GitHub Check: integration_tests (ibc_rly_evm)
🔇 Additional comments (12)
CHANGELOG.md (1)

8-8: LGTM! Changelog entry properly documents the validation addition.

The changelog entry correctly documents the addition of validation for EVM parameters under the UNRELEASED section.

.github/workflows/test.yml (1)

22-22: LGTM! Test matrix appropriately expanded to include EVM tests.

The addition of "evm" to the test matrix ensures the new EVM parameter validation tests will be executed in CI.

go.mod (2)

306-306: Verify the ethermint fork switch from organization to personal repository.

The module replacement mirrors the change in gomod2nix.toml, switching from crypto-org-chain/ethermint to randy-cro/ethermint. This raises the same concerns about using a personal fork in production code.

Please confirm:

  1. Is this temporary for testing or intended for production?
  2. What validation changes are in this fork that aren't in the main organization fork?
  3. What is the timeline for merging these changes back to the organization fork?

38-38: No action needed; cobra v1.10.2 is a safe patch upgrade.

The upgrade from v1.10.1 to v1.10.2 includes only dependency path migration (gopkg.in/yaml.v3 to go.yaml.in/yaml/v3) and CI/CD linter fixes. No breaking changes.

integration_tests/test_evm_params_int_64_overflow.py (6)

1-24: LGTM! Well-documented test suite with correct constants.

The module docstring clearly explains the test objectives and edge cases being validated. The constants MAX_INT64 and UINT64_MAX are correctly defined.


83-123: LGTM! Test properly validates zero value edge case.

The test correctly verifies that zero is a valid value for both parameters, includes proper assertions, and confirms the chain continues producing blocks after the update.


125-161: LGTM! Test validates normal operation with typical values.

The test establishes a baseline by verifying that typical valid values (100) work correctly for both parameters.


163-199: LGTM! Test properly validates the MAX_INT64 boundary case.

The test correctly verifies that MAX_INT64 (the maximum valid int64 value) is accepted for both parameters and the chain continues functioning.


201-232: LGTM! Test correctly validates overflow rejection.

The test properly verifies that values exceeding MAX_INT64 are rejected and that the parameters remain unchanged when an invalid proposal fails.


234-262: LGTM! Test validates rejection of extreme overflow values.

The test properly verifies that UINT64_MAX is rejected, testing the most extreme overflow case.

gomod2nix.toml (2)

315-317: Verify the intentionality and scope of the ethermint fork switch to a personal repository.

The module replacement has changed from crypto-org-chain/ethermint to randy-cro/ethermint. This raises legitimate concerns about code review governance, long-term maintenance, and availability. Clarify:

  • Is this fork switch intentional and approved by the team?
  • What specific changes in randy-cro/ethermint are required for this PR?
  • Is this a temporary workaround or permanent dependency, and if permanent, is there a plan to upstream changes?

628-629: Confirm cobra library version upgrade to v1.10.2.

The cobra library has been upgraded from v1.10.1 to v1.10.2, which includes a migration from gopkg.in/yaml.v3 to go.yaml.in/yaml/v3 and CI/CD linter fixes. This is a safe, non-breaking maintenance update.

Copy link
Contributor

@JayT106 JayT106 left a comment

Choose a reason for hiding this comment

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

LTGM

@randy-cro randy-cro added this pull request to the merge queue Dec 8, 2025
Merged via the queue into crypto-org-chain:main with commit 5050b31 Dec 8, 2025
44 checks passed
@randy-cro randy-cro deleted the fix/evm-params-validation branch December 8, 2025 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants