Skip to content

Delete the retired feegrant store at v6.8 - #4563

Open
alexander-sei wants to merge 2 commits into
mainfrom
alex/delete-feegrant-store-v68
Open

alexander-sei wants to merge 2 commits into
mainfrom
alex/delete-feegrant-store-v68

Conversation

@alexander-sei

Copy link
Copy Markdown
Contributor

The feegrant module was removed in v6.7 (#3958), but its store stayed mounted for historical state access, and the v6.8 handler only drops its module-version entry. v6.8 already deletes the other stores v6.7 kept for the same reason (capability, ibc and transfer, #4337), which leaves feegrant as the last retired store still mounted, holding allowances nothing in the binary uses.

feegrantModuleName joins v68DeletedStores, so the v6.8 store loader deletes the feegrant tree at the upgrade height and the handler's existing loop drops its version-map entry in place of the separate DeleteModuleVersion call. The store is unmounted everywhere #4337 unmounted the IBC stores, including keys.MemIAVLStoreKeys, whose FeegrantStoreKey constant goes, and the v6.8 in-process, cross-version and offline tests now treat it as deleted. Because this binary no longer mounts any store v6.7 retained, the v6.7 suite's in-process store-retention checks are removed: TestV67RetainsRetiredModuleStateWrittenBeforeUpgrade keeps its version-map assertions as TestV67RemovesCommittedRetiredModuleVersions, and v6.7's retention stays covered by its offline and cross-version suites, which build from the release branches.

This is app-hash breaking at the v6.8 height. From then on v6.8 nodes answer no such store: feegrant at every height, so feegrant history needs a v6.7 or older node, the trade-off #4337 accepted for IBC. memiavl refuses to delete a tree it does not have, so the upgrade relies on every network carrying a feegrant tree, which holds because v6.7 mounts it and all three networks' genesis files include it. Validated with the v6.8-tagged, v6.7-tagged and untagged app tests, the sei-db keys, composite and migration packages, golangci-lint, make fmtcheck, and the three upgrade-test-offline phases from release/v6.7 against this branch, including crash replay and the v6.7 reopen refusal; the cross-version and docker-cluster suites have not run yet.

The v6.8 store loader deletes the feegrant tree v6.7 kept mounted, and the store is unmounted from the app, the canonical sei-db store list and tooling. The v6.7 suite drops its in-process store-retention checks, since this binary no longer mounts any store v6.7 retained.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

github-actions Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

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

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedOct 18, 2026, 3:30 PM

@codecov

codecov Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 57.57%. Comparing base (3608f90) to head (3512481).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4563      +/-   ##
==========================================
- Coverage   57.58%   57.57%   -0.01%     
==========================================
  Files        2133     2133              
  Lines      167297   167296       -1     
==========================================
- Hits        96337    96326      -11     
- Misses      70955    70965      +10     
  Partials        5        5              
Flag Coverage Δ
sei-chain 55.62% <100.00%> (-0.01%) ⬇️
sei-db 75.17% <ø> (ø)
sei-db-state-db 80.17% <ø> (+0.03%) ⬆️

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

Files with missing lines Coverage Δ
app/app.go 50.88% <ø> (ø)
app/upgrades.go 45.68% <ø> (-0.47%) ⬇️
sei-db/common/keys/store_keys.go 100.00% <ø> (ø)
sei-wasmd/app/app.go 73.46% <100.00%> (ø)
tools/utils/helper.go 0.00% <ø> (ø)

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

@alexander-sei

Copy link
Copy Markdown
Contributor Author

@seidroid review

@seidroid seidroid Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Adds feegrant to v68DeletedStores, so the v6.8 store loader deletes the retired tree and the handler's existing loop drops its version entry. It also unmounts the store everywhere #4337 unmounted the IBC stores and retargets the v6.7/v6.8 tests. The handler, store loader, MemIAVLStoreKeys/kvStoreKeyNames parity and test imports all check out against the merge tree, and nothing blocks; codex's reading found nothing, and I agree, so no claims were carried over or dropped.

Non-blocking

  • Not built or tested here because no Go toolchain was available; the only check of the edited test files was a manual one that no import is left unused. The PR also says the cross-version and docker-cluster suites have not run, and those are what exercise the no such store: feegrant path in verifyV68State against a real v6.7→v6.8 chain.

seidroid review · decision approve · session 4f164120ed72460f89dfb66f8786180c · turn resp_claude_66e6df419c379ca2668e08e62aa4af2e · item 8b6570780d525bfc94e45147b57c889c

Findings: 0 blocking | 1 non-blocking | 0 posted inline

@alexander-sei
alexander-sei marked this pull request as ready for review October 18, 2026 16:21
@cursor

cursor Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

PR Summary

High Risk
App-hash breaking state migration at the v6.8 height that permanently removes feegrant store data from the multistore; incorrect rollout would fork the chain.

Overview
At the v6.8 upgrade, the retired feegrant KV store is deleted from the multistore and unmounted everywhere production nodes mount stores (app store keys, sei-db MemIAVLStoreKeys, Wasm test app, and tooling lists). feegrant is added to v68DeletedStores, so the existing v6.8 store loader removes the tree at the upgrade height and the handler’s version-map cleanup loop covers feegrant instead of a separate DeleteModuleVersion call.

Tests and docs are aligned with IBC-style retirement: v6.8 suites assert no such store: feegrant and offline migration treats feegrant as a deleted store; v6.7 in-process checks that only pinned mounted retired-store bytes are dropped in favor of version-map removal (cross-version/offline still cover v6.7 retention). The orphan-store registry no longer lists feegrant as retained past v6.7.

App-hash breaking at v6.8 — feegrant state is only queryable on v6.7 or older nodes after the upgrade.

Reviewed by Cursor Bugbot for commit 3512481. Bugbot is set up for automated code reviews on this repo. Configure here.

This branch has not been deployed

No deployments
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