Skip to content

Thomas/go.1.25 test#1943

Closed
thomas-nguy wants to merge 33 commits into
crypto-org-chain:mainfrom
thomas-nguy:thomas/go.1.25-test
Closed

Thomas/go.1.25 test#1943
thomas-nguy wants to merge 33 commits into
crypto-org-chain:mainfrom
thomas-nguy:thomas/go.1.25-test

Conversation

@thomas-nguy

@thomas-nguy thomas-nguy commented Dec 18, 2025

Copy link
Copy Markdown
Collaborator

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

  • Chores
    • Upgraded Go toolchain to 1.25, CI actions to newer releases, and Nix channels to the latest branch.
    • Updated packaging/build overlays, Darwin SDK handling, and Windows bundle DLL reference.
    • Added TypeScript config and contract runtime/dev dependencies; updated .gitignore and Makefile exclusions.
  • Tests
    • Switched contract installs to deterministic install and adjusted an integration test gas expectation.

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

@thomas-nguy
thomas-nguy requested a review from a team as a code owner December 18, 2025 02:59
@thomas-nguy
thomas-nguy requested review from XinyuCRO and calvinaco and removed request for a team December 18, 2025 02:59
@github-actions

github-actions Bot commented Dec 18, 2025

Copy link
Copy Markdown
Contributor

Hey there and thank you for opening this pull request! 👋🏼

We require pull request titles to follow the Conventional Commits specification and it looks like your proposed title needs to be adjusted.

Details:

No release type found in pull request title "Thomas/go.1.25 test". Add a prefix to indicate what kind of release this pull request corresponds to. For reference, see https://www.conventionalcommits.org/

Available types:
 - feat: A new feature
 - fix: A bug fix
 - docs: Documentation only changes
 - style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
 - refactor: A code change that neither fixes a bug nor adds a feature
 - perf: A code change that improves performance
 - test: Adding missing tests or correcting existing tests
 - build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
 - ci: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
 - chore: Other changes that don't modify src or test files
 - revert: Reverts a previous commit

@coderabbitai

coderabbitai Bot commented Dec 18, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

Upgrades CI workflows (checkout, setup-go, nixpkgs), bumps Go toolchain to 1.25, migrates Nix overlays and Go build helpers to use go_1_25/buildGoModule, adds TypeScript/pytest test infra, and introduces multiple Nix package/overlay changes including rocksdb, solc-static-versions, and Windows bundle DLL update.

Changes

Cohort / File(s) Summary
GitHub Actions workflows
.github/workflows/... (build.yml, codeql-analysis.yml, dependabot-update-all.yml, dependencies-review.yml, gosec.yml, linkchecker.yml, lint.yml, proto.yml, release.yml, semgrep.yml, sims.yml, test.yml)
Bumped actions/checkout v3→v4, actions/setup-go (where present) v3→v5, and unified Go tool versions to ~1.25; updated nixpkgs channel references from 22.11→25.11 in multiple jobs.
Go version and module files
go.mod, default.nix, default.nix (root and default.nix buildGoApplication areas)
go directive bumped 1.23.12→1.25.0; default.nix exposes go in build inputs and adds modRoot = "." to buildGoApplication invocation.
Flake and Nix overlay wiring
flake.nix, nix/build_overlay.nix, nix/default.nix
Added gomodOverlay / gomod2nix overrides to set modRoot=".", replaced go_1_23 with go_1_25 derivation (overriding go_1_24), updated overlay usage and nixpkgs release from 24.11→25.11.
Nix package updates & build helpers
nix/golangci-lint.nix, nix/go-ethereum.nix, nix/hermes.nix, default.nix (root default.nix)
Replaced buildGo123Module→buildGoModule, wired go_1_25 in overlays, swapped Darwin inputs (libobjc/IOKit → apple-sdk_15) in several packages, and adjusted gomod/gomod2nix integration.
RocksDB and platform packaging
nix/rocksdb.nix, nix/bundle-win-exe.nix
Added enableLite option, conditional LZ4 support and MinGW import-library generation, platform-specific flags and fixups; Windows bundle updated to reference libmcfgthread-2.dll.
Test environment & poetry overrides
nix/testenv.nix, nix/sources.json
Added pkgs input and a customPoetry2nix override for rpds‑py to handle Cargo/vendor artifacts; updated nixpkgs and poetry2nix sources to release-25.11.
Integration tests (JS/TS + pytest)
integration_tests/contracts/package.json, integration_tests/contracts/tsconfig.json, integration_tests/pytest.ini, scripts/run-integration-tests, integration_tests/test_basic.py
Added hardhat, ts-node, typescript deps and tsconfig; added pytest markers; changed npm install→npm ci; adjusted expected gas in a test.
Makefile & .gitignore
Makefile, .gitignore
Lint targets updated to use find ... -prune exclusions (skipping chain-main-* etc.); added chain-main-* ignore under direnv.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Pay extra attention to:
    • nix/build_overlay.nix — new go_1_25 derivation, postPatch/postPatch logic and platform metadata.
    • nix/rocksdb.nix — MinGW LZ4 handling, preConfigure generation, and cmakeFlags wiring.
    • nix/testenv.nix — customPoetry2nix overrides and pkgs input integration.
    • Consistency of go_1_25 and buildGoModule replacements across overlays (nix/default.nix, flake.nix, nix/golangci-lint.nix).

Possibly related PRs

Suggested reviewers

  • calvinaco
  • XinyuCRO
  • songgaoye

Poem

🐰
Hopping through branches, I bumped every tool,
From actions to Go, and fixed every rule.
Nix overlays polished, tests typed with delight,
The rabbit hops off — CI's shining tonight! 🥕✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Title check ❓ Inconclusive The title 'Thomas/go.1.25 test' is vague and generic, using branch naming convention rather than describing the actual changes. Replace with a descriptive title that summarizes the main change, such as 'Upgrade Go toolchain to 1.25.0 and update dependencies' or similar.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d730f69 and af2f524.

📒 Files selected for processing (1)
  • integration_tests/test_basic.py (1 hunks)
⏰ 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). (20)
  • GitHub Check: Run golangci-lint
  • GitHub Check: unittest
  • GitHub Check: gomod2nix
  • GitHub Check: build (macos-14)
  • GitHub Check: build (ubuntu-latest)
  • GitHub Check: build (macos-latest)
  • GitHub Check: integration_tests (mint)
  • GitHub Check: integration_tests (ibc_timeout)
  • GitHub Check: integration_tests (upgrade)
  • GitHub Check: integration_tests (gas)
  • GitHub Check: integration_tests (ica)
  • GitHub Check: integration_tests (unmarked)
  • GitHub Check: integration_tests (gov)
  • GitHub Check: integration_tests (evm)
  • GitHub Check: integration_tests (slow)
  • GitHub Check: integration_tests (ibc_rly_evm)
  • GitHub Check: integration_tests (ibc_update_client)
  • GitHub Check: integration_tests (ibc)
  • GitHub Check: integration_tests (ibc_rly_gas)
  • GitHub Check: semgrep-cloud-platform/scan
🔇 Additional comments (1)
integration_tests/test_basic.py (1)

120-120: Document the gas usage change with root cause explanation.

The expected gas for TestERC20A deployment increased by 192 units (564532→564724) in commit "fix gas", but the commit message provides no explanation for the change. Before merging, confirm and document:

  1. What caused the 192-unit increase (Go toolchain changes, EVM implementation update, bytecode generation differences)?
  2. Is this change intentional and expected from the Go 1.25 upgrade or other dependencies?
  3. Why was only this test updated and not others (e.g., test_pruned_node.py's 51531 value)?

Add clarification to the commit message or PR description explaining the root cause.


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

socket-security Bot commented Dec 18, 2025

Copy link
Copy Markdown

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

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatednpm/​ts-node@​10.9.1 ⏵ 10.9.297 +110010082100
Updatednpm/​hardhat@​2.26.3 ⏵ 2.27.19410092 +297 +180
Updatednpm/​typescript@​4.7.4 ⏵ 5.9.3100 +110090 -1010090 +10

View full report

@codecov

codecov Bot commented Dec 18, 2025

Copy link
Copy Markdown

Codecov Report

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

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1943      +/-   ##
==========================================
+ Coverage   16.87%   25.65%   +8.77%     
==========================================
  Files          72       78       +6     
  Lines        6163     5118    -1045     
==========================================
+ Hits         1040     1313     +273     
+ Misses       5000     3643    -1357     
- Partials      123      162      +39     

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🧹 Nitpick comments (6)
integration_tests/contracts/tsconfig.json (1)

7-7: Consider enabling TypeScript strict mode for better type safety.

Setting "strict": false disables TypeScript's strict type checking, which can lead to runtime errors that would otherwise be caught at compile time. Consider enabling it incrementally or setting it to true to improve code quality and catch potential issues early.

🔎 Apply this diff to enable strict mode:
-    "strict": false,
+    "strict": true,
flake.nix (1)

32-43: Clarify the purpose of modRoot override on gomod2nix.

The overrideAttrs sets modRoot = "." on the gomod2nix CLI tool itself. This attribute typically affects buildGoApplication, not the CLI. If the intent is to configure the module root for builds, this should be set in default.nix (which it is on line 60).

Consider removing this override if it has no effect, or add a comment explaining why it's needed for the CLI tool.

nix/testenv.nix (1)

16-19: Document hash maintenance for rpds-py vendor dependencies.

The hardcoded hash for fetchCargoVendor is tied to a specific rpds-py version. When the rpds-py version changes in poetry.lock, this hash will need to be updated.

Consider adding a comment indicating the corresponding rpds-py version for maintainability:

              cargoDeps = pkgs.rustPlatform.fetchCargoVendor {
                inherit (old) src pname version;
+               # Hash for rpds-py cargo dependencies - update when rpds-py version changes
                hash = "sha256-npvJz6PMHWzPkI0LVNeiMsZVxmwR6uzjlhBPMCCrFfw=";
              };
nix/rocksdb.nix (3)

178-182: Use stdenv.hostPlatform.isDarwin instead of deprecated stdenv.isDarwin.

stdenv.isDarwin and stdenv.isLinux are deprecated in favor of stdenv.hostPlatform.isDarwin and stdenv.hostPlatform.isLinux for cross-compilation correctness.

🔎 Apply this diff:
-  + lib.optionalString stdenv.isDarwin ''
+  + lib.optionalString stdenv.hostPlatform.isDarwin ''
     ls -1 $tools/bin/* | xargs -I{} ${stdenv.cc.bintools.targetPrefix}install_name_tool -change "@rpath/librocksdb.${lib.versions.major finalAttrs.version}.dylib" $out/lib/librocksdb.dylib {}
   ''
-  + lib.optionalString (stdenv.isLinux && enableShared) ''
+  + lib.optionalString (stdenv.hostPlatform.isLinux && enableShared) ''
     ls -1 $tools/bin/* | xargs -I{} patchelf --set-rpath $out/lib:${stdenv.cc.cc.lib}/lib {}
   '';

192-195: Consistent use of platform detection in postFixup.

Same issue as preInstall - use stdenv.hostPlatform.isDarwin for consistency and cross-compilation support.

🔎 Apply this diff:
-  + lib.optionalString stdenv.isDarwin ''
+  + lib.optionalString stdenv.hostPlatform.isDarwin ''
     ${stdenv.cc.targetPrefix}install_name_tool -change "@rpath/libsnappy.1.dylib" "${snappy}/lib/libsnappy.1.dylib" $out/lib/librocksdb.dylib

143-143: Hardcoded LZ4 version may become stale.

The version 1.10.0 is hardcoded in the generated pkgconfig file. If the nixpkgs lz4 package is updated, this could cause version mismatches.

🔎 Consider extracting version dynamically:
-    Version: 1.10.0
+    Version: ${lz4.version or "1.10.0"}

Note: This requires verifying that the lz4 derivation exposes a version attribute.

#!/bin/bash
# Check if lz4 package in nixpkgs has a version attribute
nix-instantiate --eval -E '(import <nixpkgs> {}).lz4.version or "no-version-attr"' 2>/dev/null || echo "Could not evaluate"
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5cabab4 and 4fc674a.

⛔ Files ignored due to path filters (3)
  • flake.lock is excluded by !**/*.lock
  • go.sum is excluded by !**/*.sum
  • integration_tests/contracts/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (31)
  • .github/workflows/build.yml (6 hunks)
  • .github/workflows/codeql-analysis.yml (1 hunks)
  • .github/workflows/dependabot-update-all.yml (1 hunks)
  • .github/workflows/dependencies-review.yml (1 hunks)
  • .github/workflows/gosec.yml (1 hunks)
  • .github/workflows/linkchecker.yml (1 hunks)
  • .github/workflows/lint.yml (5 hunks)
  • .github/workflows/proto.yml (3 hunks)
  • .github/workflows/release.yml (2 hunks)
  • .github/workflows/semgrep.yml (1 hunks)
  • .github/workflows/sims.yml (6 hunks)
  • .github/workflows/test.yml (6 hunks)
  • .gitignore (1 hunks)
  • Makefile (1 hunks)
  • default.nix (3 hunks)
  • flake.nix (3 hunks)
  • go.mod (2 hunks)
  • gomod2nix.toml (1 hunks)
  • integration_tests/contracts/package.json (1 hunks)
  • integration_tests/contracts/tsconfig.json (1 hunks)
  • integration_tests/pytest.ini (1 hunks)
  • nix/build_overlay.nix (1 hunks)
  • nix/bundle-win-exe.nix (1 hunks)
  • nix/default.nix (3 hunks)
  • nix/go-ethereum.nix (2 hunks)
  • nix/golangci-lint.nix (1 hunks)
  • nix/hermes.nix (2 hunks)
  • nix/rocksdb.nix (4 hunks)
  • nix/sources.json (2 hunks)
  • nix/testenv.nix (2 hunks)
  • scripts/run-integration-tests (1 hunks)
⏰ 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: integration_tests (slow)
  • GitHub Check: integration_tests (gas)
  • GitHub Check: integration_tests (mint)
  • GitHub Check: integration_tests (upgrade)
  • GitHub Check: integration_tests (evm)
  • GitHub Check: integration_tests (ica)
  • GitHub Check: integration_tests (gov)
  • GitHub Check: integration_tests (ibc_rly_gas)
  • GitHub Check: integration_tests (ibc)
  • GitHub Check: integration_tests (ibc_update_client)
  • GitHub Check: integration_tests (unmarked)
  • GitHub Check: integration_tests (ibc_timeout)
  • GitHub Check: integration_tests (ibc_rly_evm)
  • GitHub Check: build (macos-14)
  • GitHub Check: build (ubuntu-latest)
  • GitHub Check: build (macos-latest)
  • GitHub Check: gomod2nix
  • GitHub Check: unittest
🔇 Additional comments (47)
.gitignore (1)

28-28: LGTM! Appropriate ignore pattern for build artifacts.

The chain-main-* pattern correctly excludes generated build/test artifacts referenced in the build workflows and Makefile.

integration_tests/contracts/package.json (1)

17-20: LGTM! Appropriate TypeScript tooling additions.

The ts-node and typescript devDependencies correctly support the new TypeScript configuration for integration tests.

.github/workflows/semgrep.yml (1)

23-23: LGTM! Standard GitHub Actions upgrade.

The update to actions/checkout@v4 is a standard version upgrade that aligns with the broader workflow modernization across the repository.

.github/workflows/gosec.yml (1)

19-19: LGTM! Consistent workflow modernization.

The actions/checkout@v4 upgrade is appropriate and consistent with other workflow updates in this PR.

go.mod (2)

306-306: LGTM! Routine dependency version bump.

The ethermint version update from December 8 to December 10, 2025 appears to be a routine pseudo-version bump, likely incorporating recent upstream changes.


3-3: Go 1.25.0 is a valid syntax and correctly released.

The go directive must be a valid Go version, such as 1.14, 1.21rc1, or 1.23.0, which means three-part versions with patch numbers (like 1.25.0) are accepted. Go 1.25 was officially released on August 12, 2025, so go 1.25.0 is both syntactically valid and reflects a stable release. While the syntax 1.N (e.g. 1.22) is called a "language version" denoting the overall family of Go releases, including the patch version is a common best practice that clearly specifies the minimum released version of that Go family.

.github/workflows/dependabot-update-all.yml (1)

29-29: Verify Go 1.25 availability.

Same concern as in dependencies-review.yml: please confirm Go 1.25 is officially released and production-ready before deploying these workflow changes.

.github/workflows/release.yml (1)

16-16: LGTM! Standard GitHub Actions upgrade.

The actions/checkout@v4 upgrades are appropriate and widely adopted.

Also applies to: 57-57

.github/workflows/dependencies-review.yml (1)

18-18: Go 1.25 is officially released and production-ready—no action needed.

Go 1.25 is an officially released major version (released August 12, 2025), and Go 1.25.5 (released December 2, 2025) includes security fixes, confirming stability across multiple patch releases over the past four months. This release maintains Go 1's promise of compatibility, making it appropriate for production use in workflows.

.github/workflows/linkchecker.yml (1)

14-14: LGTM!

The upgrade to actions/checkout@v4 is a standard maintenance update with improved performance and features.

.github/workflows/proto.yml (1)

16-16: LGTM!

Consistent upgrade to actions/checkout@v4 across all three jobs (lint, breakage, protogen). This is a standard maintenance update.

Also applies to: 27-27, 38-38

.github/workflows/sims.yml (2)

99-99: LGTM!

Consistent upgrade to actions/checkout@v4 across all simulation test jobs. This is a standard maintenance update that improves performance and features.

Also applies to: 107-107, 163-163, 171-171, 219-219, 227-227, 275-275, 283-283, 331-331, 339-339


111-113: Go 1.25.0 is officially released and compatible with actions/setup-go@v5.

Go 1.25.0 was officially released on August 12, 2025 and actions/setup-go supports Go 1.25 with semantic version syntax. The workflow configuration is correct.

integration_tests/pytest.ini (1)

4-17: LGTM!

The addition of pytest markers provides excellent test categorization capabilities, enabling selective test execution by category (IBC, governance, upgrades, etc.). This improves test suite maintainability and CI/CD efficiency.

nix/sources.json (2)

118-122: LGTM!

The poetry2nix source update aligns with the nixpkgs upgrade and ensures compatibility with the new package set.


101-101: nixpkgs 25.11 compatibility is already addressed through explicit overlays.

The upgrade to release-25.11 is supported by proactive compatibility fixes:

  • Go 1.25 Windows support (build_overlay.nix:16): Explicitly overrides go_1_24 with Go 1.25 source to inherit Windows platform support, since native nixpkgs go_1_25 lacks Windows targets. This requires go_1_24 availability in nixpkgs 25.11.
  • solc-static-versions Darwin fix (build_overlay.nix:78): Uses pre-built macOS binaries for Darwin due to legacy SDK incompatibility in nixpkgs 25.11.
  • go-ethereum Darwin support (go-ethereum.nix:60): Explicitly adds apple-sdk_15 for IOKit framework availability in nixpkgs 25.11.
  • RocksDB and Windows cross-compilation: Already configured with proper platform definitions (x86_64-windows, i686-windows, aarch64-windows) and jemalloc disabled for Windows.
.github/workflows/codeql-analysis.yml (1)

47-47: Go 1.25.0 is officially released and stable. Go 1.25 was officially released on August 12, 2025, and is a major release of Go. Multiple patch releases (1.25.1 through 1.25.5) have been released with security and bug fixes, demonstrating the version's stability and active maintenance. This workflow version specification is safe to use.

nix/bundle-win-exe.nix (1)

24-24: Verify the mcfgthread DLL version is correct for the updated toolchain.

The Windows bundle correctly references libmcfgthread-2.dll. This version is the current standard in mcfgthread and is available in all modern mingw-w64 toolchains, including those used by nixpkgs 25.11. The DLL is compatible with GCC 13+ (which has the MCF thread model integrated) and will not cause runtime loading failures.

Makefile (1)

139-144: LGTM: Prune-based exclusion is more efficient.

The revised approach excludes directories before searching, which is more efficient than the previous pattern-based exclusions. The syntax correctly uses -prune to skip the specified directories and -print to output only the .nix files from the remaining paths.

scripts/run-integration-tests (1)

10-10: LGTM: npm ci ensures deterministic installs.

Switching to npm ci makes the installation deterministic by using package-lock.json, which is appropriate for CI environments and can reduce install time.

nix/hermes.nix (1)

10-10: LGTM: Consolidated Darwin SDK dependencies.

The update consolidates Darwin SDK dependencies into apple-sdk_15, replacing individual framework imports. This modernization aligns with similar changes in other nix files in this PR.

Also applies to: 48-51

.github/workflows/lint.yml (1)

26-26: LGTM: Consistent action and nixpkgs version updates.

The updates to actions/checkout@v4 and nixpkgs channel nixos-25.11 are applied consistently across all lint jobs (golangci, lint-python, lint-nix), aligning with the broader PR modernization efforts.

Also applies to: 29-29, 65-65, 77-77, 92-92, 103-103

gomod2nix.toml (1)

326-329: LGTM: ethermint dependency updated.

The evmos/ethermint version and hash have been updated, indicating a newer commit (timestamp moved from Dec 8 to Dec 10). The update aligns with the broader Go toolchain upgrade in this PR.

.github/workflows/test.yml (2)

28-28: LGTM: Consistent version updates across test workflows.

The updates to actions/checkout@v4 and nixpkgs channel nixos-25.11 are consistently applied across all test jobs (integration_tests, upload-cache, testground-test), maintaining uniformity with other workflow files.

Also applies to: 40-40, 85-85, 97-97, 116-116, 121-121


67-67: LGTM: Go toolchain reference updated for coverage.

The coverage conversion step now correctly references go_1_25 instead of go_1_22, ensuring the coverage tool uses the updated Go version.

nix/golangci-lint.nix (1)

2-2: LGTM: Modernized Go toolchain override pattern.

The derivation now uses buildGoModule with an explicit go_1_25 override instead of the version-specific buildGo123Module. This is the standard Nix pattern for specifying custom Go versions and provides better flexibility for future toolchain updates.

Also applies to: 6-6, 9-9

.github/workflows/build.yml (1)

22-22: Verified: Updated dependencies are valid and stable.

The upgrades from actions/checkout@v3 to v4 and nixpkgs channel from nixos-22.11 to nixos-25.11 are confirmed. Both versions are valid, actively maintained, and align with the PR's goal of modernizing the toolchain.

nix/go-ethereum.nix (1)

6-6: LGTM! Darwin SDK consolidation aligns with nixpkgs 25.11.

The migration from individual frameworks (libobjc, IOKit) to apple-sdk_15 is the correct approach for nixpkgs 25.11, which consolidates all Darwin frameworks into unified SDK packages.

Also applies to: 60-63

default.nix (2)

5-5: LGTM! Explicit Go toolchain injection.

Explicitly passing go through the inputs and into buildGoApplication ensures the build uses the overridden go_1_25 from the overlay rather than relying on implicit defaults.

Also applies to: 43-44


60-60: LGTM! modRoot configuration for gomod2nix.

Setting modRoot = "." is required for gomod2nix to correctly locate the Go module root directory.

flake.nix (2)

92-106: LGTM! Overlay composition and Go 1.25 upgrade.

The overlay correctly:

  • Replaces the default gomod2nix overlay with the custom gomodOverlay
  • Upgrades Go to 1.25 via go = final.go_1_25
  • Uses final for test-env to access the fully composed package set

3-3: nixpkgs release-25.11 is stable and released.

The nixpkgs-25.11 release (under the codename "Xantusia") is publicly available, with support for bugfixes and security updates for seven months (up until 2026-06-30). This is a stable production branch, not a future release.

nix/testenv.nix (2)

7-30: LGTM! rpds-py Cargo vendor fix for source builds.

The customPoetry2nix override correctly handles rpds-py source builds by:

  • Fetching Cargo vendor dependencies with fetchCargoVendor
  • Adding necessary Rust toolchain (cargo, rustc) to nativeBuildInputs
  • Only applying when building from source (!(old.src.isWheel or false))

61-74: LGTM! License field format fixes for pyproject.toml compatibility.

The postPatch modifications correctly handle the license field format changes required by newer Python packaging standards, converting inline license strings to the table format.

nix/build_overlay.nix (4)

22-36: LGTM! Patch filtering and manual iana-etc substitution.

The approach of filtering out the incompatible iana-etc-1.17.patch and applying substitutions manually via postPatch is a valid workaround for Go 1.25 compatibility.


37-51: Complex fallback logic for MinGW cross-compilation.

The depsTargetTarget logic handles multiple scenarios for finding the threads package in cross-compilation:

  1. targetPackages.threads.package (standard path)
  2. targetPackages.windows.pthreads (fallback for LLVM-based toolchains)

The defensive null checks are appropriate for handling varying toolchain configurations.


12-21: Go 1.25.0 release confirmed with valid source URL.

Go 1.25.0 is a major release of Go, announced on 12 August 2025. The source tarball URL follows the correct pattern. While the hash cannot be verified from public sources (Go does not publish checksums in easily accessible machine-readable formats), the existence of multiple stable patch versions (1.25.1 through 1.25.5) confirms the 1.25 branch is legitimate.


78-113: Clarify solc binary architecture support and URL availability.

The Darwin workaround uses x86_64-only macOS binaries for solc 0.6.8, which requires Rosetta on Apple Silicon. However, solc 0.8.21 runs natively on ARM64, so the v0.8.21 binary should work without translation. Additionally, verify that the GitHub release URLs for both versions are accessible and remain stable, as older release artifacts may have limited availability.

nix/default.nix (4)

13-31: LGTM - Go 1.25 upgrade with chain-maind workaround.

The overlay correctly upgrades the Go toolchain to 1.25 and applies necessary overrides for chain-maind. The go_1_23 = final.buildPackages.go_1_25 mapping is a reasonable workaround to make the upstream chain-main package use the new Go version without requiring upstream changes.


33-45: LGTM - gomod2nix integration with modRoot fix.

The overlay properly sets up gomod2nix tooling and applies the modRoot = "." override to address the same gomod2nix builder issue referenced for chain-maind.


85-95: LGTM - rly package using buildGoModule.

The switch to buildGoModule aligns with the Go 1.25 upgrade and follows standard Nix Go packaging conventions.


82-82: The pkgs argument should remain. testenv.nix explicitly declares pkgs as a required function argument, making the inherit pkgs pass-through necessary and not redundant.

Likely an incorrect or invalid review comment.

nix/rocksdb.nix (5)

107-111: LGTM - ABI-safe memcpy fix.

The explicit static_cast<void*> addresses potential issues with std::memcpy on non-trivially copyable types, ensuring ABI compatibility across compilers.


127-128: Verify awk pattern escaping for objdump parsing.

In Nix strings, \\+ becomes the literal \+ passed to awk. Ensure this correctly matches the objdump output format. The pattern /\+base/ expects a literal + character, which is correct for Windows PE export tables.


61-73: LGTM - Platform-specific compiler warning suppression.

The warning flags appropriately handle GCC 12+ and Clang-specific diagnostics. The -faligned-allocation flag for Clang ensures proper C++17 aligned allocation support.


113-172: Comprehensive MinGW LZ4 workaround.

This is a well-structured workaround for MinGW's stub import library issue. The approach of regenerating a correct import library from the actual DLL using objdump/dlltool and providing both pkgconfig and CMake config files ensures proper library discovery.


19-19: The enableLite parameter and ROCKSDB_LITE CMake flag are correctly implemented in this Nix derivation and remain functional in RocksDB 10.5.1. The ROCKSDB_LITE option has not been removed from RocksDB.

Likely an incorrect or invalid review comment.

Comment on lines +23 to +25
- uses: actions/setup-go@v5
with:
go-version: '1.22.7'
- uses: actions/checkout@v3
go-version: '1.25.0'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Go 1.25.0 is officially available; consider upgrading to setup-go@v6 for better compatibility.

Go 1.25.0 is a major release of Go and is fully available. However, setup-go@v6 is the current major version and current documentation emphasizes setup-go@v6. While setup-go@v5 should technically resolve Go 1.25.0, upgrading to @v6 aligns with the recommended tooling and ensures better forward compatibility with future Go releases.

🤖 Prompt for AI Agents
.github/workflows/lint.yml around lines 23 to 25: the workflow pins
actions/setup-go to v5 while Go 1.25.0 is current and setup-go@v6 is the
recommended major version; update the action reference to actions/setup-go@v6 to
align with current tooling and ensure compatibility, and verify the go-version
input remains '1.25.0' (or adjust to a desired supported version) and run the
workflow to confirm no breaking changes from the major-version bump.

- uses: cachix/install-nix-action@fc6e360bedc9ee72d75e701397f0bb30dce77568 # v31.5.2
with:
nix_path: nixpkgs=channel:nixos-22.11
nix_path: nixpkgs=channel:nixos-25.11

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Get the workflow file
git ls-files '.github/workflows/' | head -20

Repository: crypto-org-chain/cronos

Length of output: 621


🏁 Script executed:

#!/bin/bash
# Read the release.yml workflow file
cat -n .github/workflows/release.yml | head -80

Repository: crypto-org-chain/cronos

Length of output: 3244


🏁 Script executed:

#!/bin/bash
# Check for nix configuration files
fd -t f '(flake|default|shell)\.nix' || echo "No standard nix config files found"

# Check scripts/release.sh
wc -l scripts/release.sh
head -50 scripts/release.sh

Repository: crypto-org-chain/cronos

Length of output: 2084


🏁 Script executed:

#!/bin/bash
# Check the main flake.nix
wc -l flake.nix
head -100 flake.nix

echo "---"

# Also check default.nix
wc -l default.nix
head -100 default.nix

Repository: crypto-org-chain/cronos

Length of output: 5250


🏁 Script executed:

#!/bin/bash
# Check the build overlay for any specific compiler versions
cat nix/build_overlay.nix

echo "---"

# Also check nix/cronos-matrix.nix
cat nix/cronos-matrix.nix | head -80

Repository: crypto-org-chain/cronos

Length of output: 5649


🏁 Script executed:

#!/bin/bash
# Check if there are any recent commits changing flake.nix or release.yml
git log --oneline --max-count=20 -- flake.nix .github/workflows/release.yml

echo "---"

# Check the git history for nix_path changes
git log -p --max-count=5 -- .github/workflows/release.yml | grep -A5 -B5 "nix_path"

Repository: crypto-org-chain/cronos

Length of output: 96


🏁 Script executed:

#!/bin/bash
# Check the exact git log for recent nix-related changes
git log --oneline --all | grep -i "nix\|25.11\|22.11" | head -20

echo "---"

# Get more details on the actual current state
git log --oneline -1

echo "---"

# Check if there are any comments or issues in the workflow file
grep -n "25.11\|22.11\|macos" .github/workflows/release.yml

Repository: crypto-org-chain/cronos

Length of output: 1647


Update macOS runners to meet nixpkgs 25.11 requirements.

Nixpkgs 25.11 is publicly available, and the project's flake.nix already pins to this version. However, Nixpkgs 25.11 requires macOS Sonoma 14 or newer, which means the macOS-13 runner in the workflow (line 53) is incompatible and will likely fail. Update the runners to use only macos-14 or newer, or specify a compatible nixpkgs version for the macOS-13 environment. Ensure the release build completes successfully with the updated configuration before merging.

🤖 Prompt for AI Agents
In .github/workflows/release.yml around line 19 (nix_path:
nixpkgs=channel:nixos-25.11) and the macOS runner definition near line 53, the
workflow pins nixpkgs 25.11 which requires macOS Sonoma (macos-14) and is
incompatible with the macos-13 runner; update the macOS runner(s) to macos-14
(or newer) so they match nixpkgs 25.11, or alternatively for that specific job
change the nixpkgs pin to a version compatible with macos-13; after making the
change, run the release workflow locally or in CI to verify the build completes
successfully before merging.

Comment thread default.nix
Comment on lines +46 to +58
src = nix-gitignore.gitignoreSourcePure [
"/*" # ignore all, then add whitelists
"!/x/"
"!/app/"
"!/cmd/"
"!/client/"
"!/versiondb/"
"!/memiavl/"
"!/store/"
"!go.mod"
"!go.sum"
"!gomod2nix.toml"
] ./.;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: List top-level directories to verify all Go source directories are whitelisted

# List top-level directories containing .go files
echo "=== Top-level directories with Go source files ==="
fd -t f -e go --max-depth 2 | sed 's|/[^/]*$||' | sort -u

echo ""
echo "=== Checking for any Go files outside whitelisted dirs ==="
# Check if there are Go files outside the whitelisted directories
fd -t f -e go | grep -vE '^(x|app|cmd|client|versiondb|memiavl|store)/' | head -20

Repository: crypto-org-chain/cronos

Length of output: 225


Add missing source directories to the gitignore whitelist.

The whitelist is incomplete. Go source files exist in docs/ (docs/docs.go) and testutil/ (testutil/simapp/simapp.go) directories that are not whitelisted. Add these directories to ensure all source code is included:

  src = nix-gitignore.gitignoreSourcePure [
    "/*" # ignore all, then add whitelists
    "!/x/"
    "!/app/"
    "!/cmd/"
    "!/client/"
    "!/versiondb/"
    "!/memiavl/"
    "!/store/"
    "!/docs/"
    "!/testutil/"
    "!go.mod"
    "!go.sum"
    "!gomod2nix.toml"
  ] ./.;
🤖 Prompt for AI Agents
In default.nix around lines 46 to 58 the gitignore whitelist omits directories
containing Go sources (docs/ and testutil/) so those files are excluded; update
the nix-gitignore.gitignoreSourcePure whitelist to add "!/docs/" and
"!/testutil/" alongside the existing entries so the docs and testutil
directories are included in the src set.

"@openzeppelin/contracts": "^5.1.0",
"@typechain/ethers-v5": "^5.0.0",
"account-abstraction": "github:eth-infinitism/account-abstraction#v0.8.0",
"hardhat": "^2.22.0",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion | 🟠 Major

Move hardhat back to devDependencies.

Hardhat is a development and testing framework, not a runtime dependency. Keeping it in dependencies unnecessarily increases the production bundle size and creates confusion about the package's actual runtime requirements.

🔎 Apply this diff to move hardhat to devDependencies:
   "dependencies": {
     "@openzeppelin/contracts": "^5.1.0",
     "@typechain/ethers-v5": "^5.0.0",
     "account-abstraction": "github:eth-infinitism/account-abstraction#v0.8.0",
-    "hardhat": "^2.22.0",
     "hardhat-typechain": "^0.3.5",
     "ts-generator": "^0.1.1",
     "typechain": "^4.0.3"
   },
   "devDependencies": {
+    "hardhat": "^2.22.0",
     "ts-node": "^10.9.2",
     "typescript": "^5.0.0"
   },
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"hardhat": "^2.22.0",
"dependencies": {
"@openzeppelin/contracts": "^5.1.0",
"@typechain/ethers-v5": "^5.0.0",
"account-abstraction": "github:eth-infinitism/account-abstraction#v0.8.0",
"hardhat-typechain": "^0.3.5",
"ts-generator": "^0.1.1",
"typechain": "^4.0.3"
},
"devDependencies": {
"hardhat": "^2.22.0",
"ts-node": "^10.9.2",
"typescript": "^5.0.0"
},
🤖 Prompt for AI Agents
In integration_tests/contracts/package.json around line 12, hardhat is listed
under "dependencies" but should be a dev-only tool; remove the "hardhat":
"^2.22.0" entry from the dependencies section and add the exact same entry under
"devDependencies" (or run npm/yarn with --save-dev to move it). Keep the version
string "^2.22.0" unchanged and ensure the package.json remains valid JSON
(commas adjusted) after the move.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants