Skip to content

app/upgrades: add v1.11.1 audit min_disk_free_percent floor#106

Merged
mateeullahmalik merged 2 commits intomasterfrom
feat/audit-min-disk-free-floor-mainnet
Mar 16, 2026
Merged

app/upgrades: add v1.11.1 audit min_disk_free_percent floor#106
mateeullahmalik merged 2 commits intomasterfrom
feat/audit-min-disk-free-floor-mainnet

Conversation

@mateeullahmalik
Copy link
Contributor

Summary

  • add a new custom upgrade handler v1.11.1
  • enforce audit.params.min_disk_free_percent >= 15 at upgrade execution
  • keep behavior monotonic: only raise to floor, never downgrade if governance already set a higher value
  • wire v1.11.1 into the central upgrade registry and upgrade tests

Context

Mainnet needs a deterministic, upgrade-time safety floor for audit host disk-free enforcement, without mutating historical v1.11.0 semantics.

Safety / Correctness

  • no store key additions/deletions
  • runs RunMigrations first, then applies bounded param update
  • fails fast if AuditKeeper wiring is missing
  • preserves deterministic behavior and minimal blast radius

Files Changed

  • app/upgrades/upgrades.go
  • app/upgrades/upgrades_test.go
  • app/upgrades/v1_11_1/upgrade.go (new)
  • app/upgrades/v1_11_1/upgrade_test.go (new)

Tests

Executed:

  • go test ./app/upgrades/... ./x/audit/v1/keeper/...

All passed.

@roomote-v0
Copy link

roomote-v0 bot commented Mar 13, 2026

Rooviewer Clock   See task

Reviewed commits dc05815..3208581 which add the v1.11.1 upgrade handler with conditional audit store support for direct v1.10.1->v1.11.1 upgrades. The AuditStoreLoader correctly detects on-disk store presence and skips adding audit when it already exists. The upgrade handler properly distinguishes between the two upgrade paths via fromVM presence checks: for the direct path it initializes audit with DefaultGenesis (which includes ScEnabled=true matching v1.11.0 behavior) and anchors epoch zero at the upgrade height; for the v1.11.0 path it skips initialization. The min_disk_free_percent floor enforcement is monotonic and applied in both cases. Store loader selector, registration wiring, and tests all look correct. No issues found.

Previous reviews

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

@mateeullahmalik mateeullahmalik self-assigned this Mar 13, 2026
@mateeullahmalik mateeullahmalik requested a review from a-ok123 March 13, 2026 17:03
roomote-v0[bot]
roomote-v0 bot previously approved these changes Mar 13, 2026
@mateeullahmalik mateeullahmalik force-pushed the feat/audit-min-disk-free-floor-mainnet branch from 6c82c1e to 3208581 Compare March 16, 2026 14:45
@mateeullahmalik mateeullahmalik merged commit cfef8f3 into master Mar 16, 2026
8 checks passed
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.

2 participants