Skip to content

Conversation

@XinyuCRO
Copy link
Contributor

@XinyuCRO XinyuCRO commented Sep 17, 2025

backport #1872 #1869

Summary by CodeRabbit

  • New Features
    • Added compatibility with 4‑byte transaction tracing for richer debugging and analysis.
  • Bug Fixes
    • VM now initializes with the correct transaction context, improving execution correctness and trace reliability.
  • Documentation
    • Updated UNRELEASED changelog entries to reflect these updates.
  • Chores
    • Bumped several public and indirect dependencies, added YAML v3 support, and updated module resolution mappings for improved stability.

@XinyuCRO XinyuCRO requested a review from a team as a code owner September 17, 2025 02:55
@XinyuCRO XinyuCRO requested review from JayT106 and songgaoye and removed request for a team September 17, 2025 02:55
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 17, 2025

Walkthrough

Adds two UNRELEASED changelog entries and updates dependency versions: multiple public and indirect Go module bumps in go.mod, and corresponding module version/hash updates in gomod2nix.toml, including an updated replace target for github.com/evmos/ethermint.

Changes

Cohort / File(s) Summary
Changelog entries
CHANGELOG.md
Adds UNRELEASED notes for: missing tx context during VM initialization (#1869) and support for 4byteTracer in tracer (#1872).
Go module file
go.mod
Bumps several public requires (e.g., spf13/cast, pflag, viper, google.golang.org/grpc, protobuf) and indirect deps; updates replace for github.com/evmos/ethermint to a newer pseudo-version.
Nix module mapping
gomod2nix.toml
Updates multiple module version and hash blocks to newer commits/tags (e.g., evmos/ethermint, sagikazarmark/locafero, sourcegraph/conc, spf13/*, google.golang.org/*); adds go.yaml.in/yaml/v3 block; removes go.uber.org/multierr block.

Sequence Diagram(s)

sequenceDiagram
    participant CLI as CLI / Init
    participant VM as VM Initializer
    participant Tx as Tx Context
    participant Tracer as 4byteTracer (optional)

    note over CLI,VM #DDEBF7: VM initialization flow (high-level)

    CLI->>VM: request VM init
    alt before
        VM->>VM: init without Tx context
        VM->>Tracer: tracer init (legacy)
        VM-->>CLI: VM ready
    else after
        VM->>Tx: obtain tx context
        VM->>VM: init with Tx context
        VM->>Tracer: init with 4byteTracer support
        VM-->>CLI: VM ready (with tx & 4byteTracer)
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • JayT106
  • thomas-nguy
  • calvinaco

Poem

I hop through mods with nimble cheer,
A tx stitched in where it must appear.
Tracers learn new four-byte tunes,
Hashes changed beneath the moons.
Carrots crunch — the build draws near 🥕🐇

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 title is concise, a single sentence, and clearly describes a real, specific change in the changeset (adding 4byteTracer support to the EVM tracer); it is directly related to the PR's contents and is readable by reviewers. Although the PR also backports a separate VM initialization tx-context fix, referencing the tracer fix as the primary change is reasonable and not misleading.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch xyz/main

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.

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

🧹 Nitpick comments (1)
CHANGELOG.md (1)

5-7: Polish UNRELEASED wording for clarity/consistency.

Suggest capitalizing VM and tightening the tracer line.

-* [#1869](https://github.com/crypto-org-chain/cronos/pull/1869) Add missing tx context during vm initialisation
-* [#1872](https://github.com/crypto-org-chain/cronos/pull/1872) fix(evm): support 4byteTracer for tracer
+* [#1869](https://github.com/crypto-org-chain/cronos/pull/1869) Add missing tx context during VM initialization
+* [#1872](https://github.com/crypto-org-chain/cronos/pull/1872) EVM: support 4byteTracer in debug tracers

If you prefer to preserve exact PR titles, ignore.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a742531 and 95ffd3f.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (3)
  • CHANGELOG.md (1 hunks)
  • go.mod (1 hunks)
  • gomod2nix.toml (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: Socket Security: Pull Request Alerts
  • GitHub Check: integration_tests (slow)
  • GitHub Check: Run golangci-lint
  • GitHub Check: integration_tests (ica)
  • GitHub Check: integration_tests (gas)
  • GitHub Check: integration_tests (upgrade)
  • GitHub Check: integration_tests (ibc_rly_evm)
  • GitHub Check: integration_tests (gov)
  • GitHub Check: integration_tests (ibc_update_client)
  • GitHub Check: integration_tests (ibc)
  • GitHub Check: integration_tests (ibc_rly_gas)
  • GitHub Check: integration_tests (ibc_timeout)
  • GitHub Check: integration_tests (unmarked)
  • GitHub Check: build (macos-latest)
  • GitHub Check: build (macos-14)
  • GitHub Check: gomod2nix
  • GitHub Check: build (ubuntu-latest)
  • GitHub Check: unittest
  • GitHub Check: semgrep-cloud-platform/scan
  • GitHub Check: semgrep-cloud-platform/scan
🔇 Additional comments (1)
gomod2nix.toml (1)

318-320: Confirm gomod2nix-regenerated hash — go.mod lookup failed

Verification script returned no version from go.mod; gomod2nix.toml contains version v0.22.1-0.20250917021453-86f043d7a76a and hash sha256-5XfweV94HN5qlf1/SNta/aMMhLd750/3GStrAeMzjbM= (replaced = github.com/crypto-org-chain/ethermint). The check previously searched for github.com/evmos/ethermint, so it didn’t find a match. Regenerate the lockfile with: gomod2nix -w and commit the result, or confirm the hash was produced by gomod2nix (not hand‑edited).

Copy link
Collaborator

@thomas-nguy thomas-nguy left a comment

Choose a reason for hiding this comment

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

please use develop branch instead

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

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 95ffd3f and f5e167b.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (2)
  • go.mod (4 hunks)
  • gomod2nix.toml (4 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: build (ubuntu-latest)
  • GitHub Check: gomod2nix
  • GitHub Check: build (macos-latest)
  • GitHub Check: build (macos-14)
  • GitHub Check: unittest
  • GitHub Check: integration_tests (slow)
  • GitHub Check: Run golangci-lint
  • GitHub Check: integration_tests (gov)
  • GitHub Check: integration_tests (gas)
  • GitHub Check: integration_tests (ibc_update_client)
  • GitHub Check: integration_tests (upgrade)
  • GitHub Check: integration_tests (ica)
  • GitHub Check: integration_tests (unmarked)
  • GitHub Check: integration_tests (ibc_rly_evm)
  • GitHub Check: integration_tests (ibc_timeout)
  • GitHub Check: integration_tests (ibc_rly_gas)
  • GitHub Check: integration_tests (ibc)
  • GitHub Check: semgrep-cloud-platform/scan
  • GitHub Check: semgrep-cloud-platform/scan
🔇 Additional comments (7)
gomod2nix.toml (3)

615-642: Config stack bumps (locafero, conc, afero, cast, pflag, viper) — LGTM

These align with go.mod and are consistent. Watch for Viper 1.21 behavior changes; smoke-test config/env overrides.


792-796: gRPC/protobuf patch bumps — safe; ensure generated code compatibility

Patch updates should be non-breaking. Verify no generator/runtime mismatches with your pinned genproto.


746-748: Module path is valid — no change required
go.yaml.in/yaml/v3 is a published Go module (pkg.go.dev → github.com/yaml/go-yaml), so the gomod2nix.toml entry is correct.

go.mod (4)

37-45: Public deps bump (cast, pflag, viper, grpc, protobuf) — LGTM

Matches gomod2nix.toml and expected indirect updates. Proceed.


224-229: Indirect bumps (locafero, conc, afero) — LGTM

Aligned with gomod2nix.toml; no concerns.


262-262: Unusual module path ‘go.yaml.in/yaml/v3’ — please verify

Mirrors gomod2nix.toml. If not a real module, switch to gopkg.in/yaml.v3. See related comment in gomod2nix.toml.


309-309: Ethermint replace — matches gomod2nix; LGTM

go.mod replace (github.com/evmos/ethermint => github.com/crypto-org-chain/ethermint v0.22.1-0.20250918004400-f674c513792f) matches gomod2nix.toml; go.sum contains the corresponding crypto-org-chain/ethermint entries — refresh go.sum and nix lockfiles in CI.

@thomas-nguy thomas-nguy added this pull request to the merge queue Oct 1, 2025
Merged via the queue into main with commit 914ffb0 Oct 1, 2025
36 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.

5 participants