Skip to content

Conversation

songgaoye
Copy link
Contributor

@songgaoye songgaoye commented Sep 22, 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

  • New Features
    • Added dump-root CLI to inspect IAVL and memIAVL store roots.
    • Enabled legacy transaction decoding for older message formats.
  • Bug Fixes
    • Improved state commit robustness with idempotent writes and safer WAL replay.
    • More reliable upgrades via version-aware store loading.
  • Documentation
    • Updated JSON-RPC references and documented eth_getBlockReceipts.
  • Chores
    • Pinned CI actions to specific versions/SHAs.
    • Updated dependencies (Go 1.23.3, IBC/Cosmos SDK, RocksDB) and Nix/flake sources.
    • Minor build/test tooling and configuration tweaks.

@songgaoye songgaoye requested a review from a team as a code owner September 22, 2025 09:57
@songgaoye songgaoye requested review from JayT106 and randy-cro and removed request for a team September 22, 2025 09:57
Copy link
Contributor

coderabbitai bot commented Sep 22, 2025

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

This PR pins CI actions, updates Nix/go module inputs, adds legacy codec/interface registration, introduces a version-aware store loader for upgrades, adds a dump-root CLI, enhances memiavl WAL batching/idempotency, improves versiondb TS read/cleanup, updates docs, and expands/adjusts integration tests and configs accordingly.

Changes

Cohort / File(s) Summary
CI workflows
.github/workflows/* (build.yml, container.yml, gosec.yml, linkchecker.yml, lint.yml, proto.yml, release.yml, sims.yml, test.yml)
Pin/upgrade GitHub Actions to specific SHAs/versions; no logic changes.
App upgrade/store loader
app/app.go, app/upgrades.go, app/storeloader.go
Change RegisterUpgradeHandlers signature to include max/qms version and return bool; add MaxVersion{,Upgrade}StoreLoader for version-aware loading/upgrade application.
Legacy codec/interface wiring
app/legacy.go, app/legacy/icaauth/types/codec.go, app/legacy_test.go, cmd/cronosd/cmd/root.go
Add legacy Amino/interface registrations for icaauth/authz; register them during root cmd setup; tests verify decoding legacy txs succeeds after registration.
CLI: dump-root
cmd/cronosd/cmd/dump_root.go
New dump-root command group with mem-iavl and iavl subcommands to print per-store roots and consolidated commit info.
Integration tests and tooling
integration_tests/* (configs/*.jsonnet, configs/upgrade-test-package.nix, contracts/contracts/TestERC20Owner.sol, cosmoscli.py, pytest.ini, shell.nix, test_basic.py, test_upgrade.py, test_versiondb.py, utils.py), scripts/run-integration-tests
Add TestERC20Owner contract; add batch-tx signed helper; extend tests (block receipts, eth_getLogs case, upgrade trace stability); config tweaks (async-commit-buffer, pytest discovery, TMPDIR); CLI adds changeset_fixdata; adjust script paths/timeouts.
memiavl durability/idempotency
memiavl/db.go, memiavl/db_test.go, memiavl/multitree.go
Introduce write batching and idempotent write handling; relax WAL catch-up endIndex bounds; add tests covering idempotent writes (sync/async modes).
versiondb TS RocksDB
versiondb/tsrocksdb/store.go
Ensure TS read options are destroyed; dry-run short-circuit in FixData; defer write batch creation; compare timestamps via GetCFWithTS and free resources.
Modules, Nix, build
go.mod, gomod2nix.toml, flake.nix, nix/sources.json, nix/* (build_overlay.nix, go_no_vendor_checks-1.23.patch, rocksdb.nix, testenv.nix), testground/benchmark/*, default.nix, Makefile
Bump Go/tool/deps (ibc-go, cosmos-sdk forks, ethermint, cometbft); refresh gomod2nix pins/replacements; add GO_NO_VENDOR_CHECKS patch; update RocksDB to 9.8.4; minor overlay/testenv adjustments; Makefile runs integration tests via script.
Docs
docs/api/json-rpc/*, docs/architecture/adr-001.md, docs/architecture/adr-008.md, CHANGELOG.md
Update external links and endpoint list; edit ADR refs; add changelog entries.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant Node as Node Startup
  participant App as App
  participant Base as BaseApp
  participant U as Upgrades
  Note over App: RegisterUpgradeHandlers(cdc, qmsVersion) -> bool
  Node->>App: Init app with cdc, qmsVersion
  App->>U: Query upgrade info
  alt matching plan
    U-->>App: plan(height), storeUpgrades
    App->>Base: SetStoreLoader(MaxVersionUpgradeStoreLoader(qmsVersion, plan.height, storeUpgrades))
    App-->>Node: true (loader overridden)
  else no plan or no override
    App-->>Node: false
  end
Loading
sequenceDiagram
  autonumber
  participant User as User
  participant CLI as cronosd dump-root
  participant App as App (store keys)
  participant Mem as MemIAVL
  participant IAVL as IAVL
  User->>CLI: dump-root mem-iavl --dir ... --version N
  CLI->>App: get store keys
  CLI->>Mem: Load version N, per-store roots
  Mem-->>CLI: Root hashes, last commit
  CLI-->>User: Print per-store roots + commit info
  User->>CLI: dump-root iavl --db ... --version N
  CLI->>IAVL: Open DB, mount stores, load version
  IAVL-->>CLI: Store roots + commit
  CLI-->>User: Print per-store roots + consolidated commit
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60–90 minutes

Possibly related PRs

Suggested labels

ci, nix, cronos, simulation, cli

Suggested reviewers

  • thomas-nguy
  • leejw51crypto
  • JayT106

Poem

Hop, hop! I pin my SHAs just right,
Batch my WALs by moonlit night.
Roots I dump, old types I know,
Upgrades follow version’s flow.
Tests all pass—what a sight!
Carrot-commits? Crunchy, bright. 🥕✨

Pre-merge checks and finishing touches and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 30.30% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title succinctly and accurately summarizes the primary change: adding commands to dump memiavl and iavl roots. The diff adds DumpMemIavlRoot and DumpIavlRoot implementations and wires a DumpRoot command into the CLI, so the title is fully related and specific to the main change.

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


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.

@songgaoye songgaoye changed the base branch from main to release/v1.4.x September 22, 2025 09:57
@songgaoye songgaoye changed the title WIP: debug wrong apphash feat: add dump memiavl root and iavl root cmds Sep 22, 2025
@songgaoye songgaoye marked this pull request as draft September 22, 2025 09:58
@songgaoye songgaoye marked this pull request as ready for review September 22, 2025 10:05
@songgaoye songgaoye closed this Sep 22, 2025
@songgaoye songgaoye reopened this Sep 22, 2025
@songgaoye songgaoye marked this pull request as draft September 22, 2025 10:07
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.

1 participant