Skip to content

Add v6.7 retired module upgrade tests - #4040

Draft
alexander-sei wants to merge 3 commits into
mainfrom
alex/v67-upgrade-tests
Draft

Add v6.7 retired module upgrade tests#4040
alexander-sei wants to merge 3 commits into
mainfrom
alex/v67-upgrade-tests

Conversation

@alexander-sei

Copy link
Copy Markdown
Contributor

Summary

  • Add focused in-process coverage for the feegrant, capability, IBC, and transfer modules retired by v6.7, plus the deprecated oracle handlers.
  • Guard against orphaned module-version entries and require every mounted store to be either owned by a registered module or explicitly retained.
  • Extend the process-block test helper to expose full transaction results and construct transactions with a fee granter.
  • Leave the release-to-main E2E test from Add semi-automated e2e major version upgrade test #4019 unchanged; that shared test covers the real two-binary, four-validator halt and restart path.

Test coverage

  • Retired transactions return the same ABCI code, codespace, and error across ApplyUpgrade; self fee-granters remain valid while distinct fee granters are rejected.
  • Rejected oracle transactions still consume gas, fees, and account sequence without writing oracle vote state.
  • v6.7 removes exactly the retired module-version entries while preserving their mounted store data across later blocks.
  • Oracle's blocker continues writing its expected penalty state after the handler deprecation.
  • Retained retired-module state remains on disk but is omitted from exported genesis because no registered module can import it.
  • The latest upgrade leaves no module-version entry without a registered owner, and all explicitly retained stores remain mounted.

Test plan

  • go test ./app -count=1 -run 'Test(V67|LatestUpgradeLeavesNoOrphanedModuleVersions|MountedStoresAreOwnedOrExplicitlyRetained|RetainedStoresRemainMounted|RetiredOracle)'
  • go test ./app -count=1 -run '^TestOracleKeepsWritingStateAfterV67$'
  • go test ./testutil/processblock/... -count=1
  • make fmtcheck

Made with Cursor

alexander-sei and others added 3 commits August 27, 2026 17:16
Cover the v6.7 removal of capability, feegrant, ibc and transfer, plus the
oracle handler deprecation, at levels that trade control for realism.

The existing tests call ApplyUpgrade directly, which never writes
upgrade-info.json and never reloads the stores, so App.SetStoreUpgradeHandlers
— the code deciding whether a store is dropped at an upgrade height — was
reached by nothing.

* Assert that transactions aimed at retired modules are rejected identically
  on both sides of the upgrade, that a rejected oracle transaction still pays
  its fee and occupies gas, and that retained store state survives the upgrade
  while being absent from an exported genesis.
* Guard the whole module version map rather than the names v6.7 drops, so a
  later removal that forgets DeleteModuleVersion fails there instead of
  leaving an entry on chain for the life of the chain. Require every mounted
  store to be owned by a registered module or declared retained with a reason.
* Drive a real governance upgrade on one throwaway node, reaching the halt,
  upgrade-info.json and store-reload path in seconds without docker.
* Run the upgrade across two real binaries, seeding a spendable fee allowance
  and tallied oracle rates with v6.6.2 where those modules are still alive.
  This is the only layer whose pre-upgrade state is real, because the current
  binary can no longer create it.
* Record how a live network answers before an upgrade and verify it after, as
  two phases with an artifact carried between them.
* Add the four-node docker suite and its CI matrix row, and check every YAML
  suite parses without needing a cluster.

processblock gains RunBlockDetailed and SignWithFeeGranter. Both are additive;
existing callers are unchanged.

Co-authored-by: Cursor <cursoragent@cursor.com>
Extend the four-validator two-binary runner with real feegrant and oracle state plus v6.7 retirement assertions. Remove the overlapping local, YAML, and live-network harnesses.

Co-authored-by: Cursor <cursoragent@cursor.com>
Rely on the merged end-to-end test for upgrade orchestration and keep this branch limited to focused v6.7 in-process coverage and its test helpers.

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

Copy link
Copy Markdown

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

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedAug 27, 2026, 6:23 PM

@codecov

codecov Bot commented Aug 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.25%. Comparing base (d69e67d) to head (fa8fe5e).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4040      +/-   ##
==========================================
- Coverage   61.24%   60.25%   -0.99%     
==========================================
  Files        2153     2054      -99     
  Lines      188393   176716   -11677     
==========================================
- Hits       115373   106487    -8886     
+ Misses      62289    60462    -1827     
+ Partials    10731     9767     -964     
Flag Coverage Δ
sei-chain-pr 53.54% <100.00%> (?)
sei-db 69.80% <ø> (ø)
sei-db-state-db ?

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

Files with missing lines Coverage Δ
testutil/processblock/common.go 78.57% <100.00%> (+0.52%) ⬆️
testutil/processblock/tx.go 83.05% <100.00%> (+1.91%) ⬆️

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

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.

1 participant