Skip to content

fix(cosmos): audit and fix cosmos plugin genesis patching#94

Merged
qj0r9j0vc2 merged 2 commits intomainfrom
fix/cosmos-plugin-audit
Feb 7, 2026
Merged

fix(cosmos): audit and fix cosmos plugin genesis patching#94
qj0r9j0vc2 merged 2 commits intomainfrom
fix/cosmos-plugin-audit

Conversation

@qj0r9j0vc2
Copy link
Copy Markdown
Member

Summary

  • Fix silent error swallowing in PatchGenesis by adding structured logging with slog.Logger
  • Fix applyPatches misleading guard condition and add warning when plugin is nil but patch options are set
  • Standardize duration format to nanoseconds (30000000000ns) matching Cosmos SDK v0.50+ convention
  • Implement InflationRate patching via new patchMintParams method
  • Document MinGasPrice (app.toml config) and Validators (provisioner layer) fields
  • Improve extractGenesisJSON to skip JSON log lines by verifying chain_id/app_state
  • Make example plugin ModifyGenesis functional
  • Replace custom test helpers with stdlib strings.Contains

Test plan

  • go test ./internal/plugin/cosmos/... -v passes (37 tests)
  • go test ./internal/daemon/provisioner/... -v -run Genesis passes (12 tests)
  • go test ./internal/infrastructure/genesis/... -v passes (7 tests)
  • go build ./examples/cosmos-plugin/ builds successfully
  • go test ./... full suite passes with zero failures

@qj0r9j0vc2 qj0r9j0vc2 self-assigned this Feb 7, 2026
@qj0r9j0vc2 qj0r9j0vc2 merged commit 248ddd0 into main Feb 7, 2026
14 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.

1 participant