- 
                Notifications
    You must be signed in to change notification settings 
- Fork 273
feat: add dump memiavl root and iavl root cmds #1874
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
base: release/v1.4.x
Are you sure you want to change the base?
Conversation
| Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the  You can disable this status message by setting the  WalkthroughThis 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
 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
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
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60–90 minutes Possibly related PRs
 Suggested labels
 Suggested reviewers
 Poem
 Pre-merge checks and finishing touches and finishing touches❌ Failed checks (1 warning)
 ✅ Passed checks (2 passed)
 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. Comment  | 
8d5f462    to
    cd95093      
    Compare
  
    | @songgaoye your pull request is missing a changelog! | 
| Semgrep found 1  Risk: Affected versions of github.com/cosmos/cosmos-sdk are vulnerable to Integer Overflow or Wraparound. A malicious validator can exploit improperly handled arithmetic in the distribution module by making a crafted deposit to the validator rewards pool. This integer overflow can trigger a chain halt, resulting in a denial-of-service. Fix: Upgrade this library to at least version 0.53.3 at cronos/go.mod:23. Reference(s): GHSA-p22h-3m2v-cmgh | 
b2349d0    to
    bab9433      
    Compare
  
    0a9dbe6    to
    93ded93      
    Compare
  
    
👮🏻👮🏻👮🏻 !!!! REFERENCE THE PROBLEM YOUR ARE SOLVING IN THE PR TITLE AND DESCRIBE YOUR SOLUTION HERE !!!! DO NOT FORGET !!!! 👮🏻👮🏻👮🏻
PR Checklist:
make)make test)go fmt)golangci-lint run)go list -json -m all | nancy sleuth)Thank you for your code, it's appreciated! :)
Summary by CodeRabbit