Skip to content

fix: support iavl.* pruning config keys with legacy fallback#2767

Merged
blindchaser merged 4 commits intomainfrom
yiren/fix-iavl-config
Jan 27, 2026
Merged

fix: support iavl.* pruning config keys with legacy fallback#2767
blindchaser merged 4 commits intomainfrom
yiren/fix-iavl-config

Conversation

@blindchaser
Copy link
Contributor

Describe your changes and provide context

In v6.3.0, pruning config moved from top-level keys to [iavl] section
(e.g., pruning -> iavl.pruning). Add fallback logic to read new iavl.* keys first, falling back to
legacy top-level keys for backward compatibility with older configs.

Testing performed to validate your change

@github-actions
Copy link

github-actions bot commented Jan 26, 2026

The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedJan 26, 2026, 10:43 PM

@blindchaser blindchaser enabled auto-merge (squash) January 26, 2026 21:50
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 51e21e65d9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +19 to +22
strategy := cast.ToString(appOpts.Get(FlagIAVLPruning))
if strategy == "" {
strategy = cast.ToString(appOpts.Get(FlagPruning))
}

Choose a reason for hiding this comment

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

P2 Badge Preserve CLI pruning overrides when iavl config exists

With the generated config template, iavl.pruning is always present (defaulted to a non-empty value), so this logic will always take that value and never consult the legacy --pruning flag. That means running seid start --pruning=everything (or custom --pruning-keep-* flags) won’t override the config anymore once a node has an app.toml with the [iavl] section, even though those flags are still registered. This is a regression in CLI behavior; consider checking whether the legacy flag was explicitly set (or binding new iavl.* flags) before unconditionally preferring iavl.pruning.

Useful? React with 👍 / 👎.

@codecov
Copy link

codecov bot commented Jan 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 56.32%. Comparing base (cfd3327) to head (7c83402).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2767      +/-   ##
==========================================
- Coverage   57.03%   56.32%   -0.72%     
==========================================
  Files        2004     2000       -4     
  Lines      164633   164048     -585     
==========================================
- Hits        93901    92395    -1506     
- Misses      62526    63564    +1038     
+ Partials     8206     8089     -117     
Flag Coverage Δ
sei-chain 40.96% <0.00%> (-0.83%) ⬇️
sei-cosmos 48.11% <100.00%> (+0.01%) ⬆️
sei-db 68.72% <ø> (ø)
sei-tendermint 58.95% <ø> (-0.09%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
sei-cosmos/server/pruning.go 85.71% <100.00%> (+10.71%) ⬆️
sei-cosmos/server/start.go 24.54% <ø> (ø)

... and 52 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.

@blindchaser blindchaser merged commit 804252f into main Jan 27, 2026
40 checks passed
@blindchaser blindchaser deleted the yiren/fix-iavl-config branch January 27, 2026 04:09
github-actions bot pushed a commit that referenced this pull request Jan 27, 2026
## Describe your changes and provide context

In v6.3.0, pruning config moved from top-level keys to [iavl] section
(e.g., `pruning` -> `iavl.pruning`). Add fallback logic to read new
`iavl.*` keys first, falling back to
legacy top-level keys for backward compatibility with older configs.

## Testing performed to validate your change

(cherry picked from commit 804252f)
@github-actions
Copy link

Successfully created backport PR for release/v6.3:

arajasek pushed a commit that referenced this pull request Jan 27, 2026
## Describe your changes and provide context

In v6.3.0, pruning config moved from top-level keys to [iavl] section
(e.g., `pruning` -> `iavl.pruning`). Add fallback logic to read new
`iavl.*` keys first, falling back to
legacy top-level keys for backward compatibility with older configs.

## Testing performed to validate your change
philipsu522 pushed a commit that referenced this pull request Jan 27, 2026
… legacy fallback (#2769)

Backport of #2767 to `release/v6.3`.

---------

Co-authored-by: yirenz <blindchaser@users.noreply.github.com>
Co-authored-by: Masih H. Derkani <m@derkani.org>
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.

3 participants