── verification ────────────────────────────────────────────────────────────
id: ante-handler-simplification title: Remove custom ante.go wrapper version: v50+ -> v54 description: | The v53 simapp ships with a custom ante.go file that wraps ante.HandlerOptions in a chain-local HandlerOptions struct. This extra struct existed solely to hold a CircuitKeeper field for the circuit-breaker ante decorator. In v54, ante.NewAnteHandler is called directly using the SDK ante.HandlerOptions struct, so the wrapper file is no longer needed.
This spec:
- Deletes ante.go (verified to contain "circuitante" before deletion).
- Rewrites the call site in app.go to use ante.NewAnteHandler with the SDK HandlerOptions struct directly, removing the CircuitKeeper argument and the outer HandlerOptions wrapper.
If your chain has customised ante.go beyond the circuitante decorator, do NOT apply this spec automatically. Review ante.go manually and merge your custom logic into the SDK HandlerOptions pattern.
upstream_sources:
- docs://upgrading/v0.54
depends_on:
- circuit-contrib-migration
detection: sdk_version: max_exclusive: v0.54.0-0
ante.go file exists AND the app.go call site still passes CircuitKeeper.
patterns: - circuitante "cosmossdk.io/x/circuit/ante" - circuitante "github.com/cosmos/cosmos-sdk/contrib/x/circuit/ante" - "&app.CircuitKeeper"
changes:
── file removals ──────────────────────────────────────────────────────
file_removals: - file_name: ante.go contains_must_match: circuitante
── text replacements ─────────────────────────────────────────────────
text_replacements: # Rewrite the call site in app.go, but only for the simapp-style wrapper # that passes CircuitKeeper explicitly. Chains with custom HandlerOptions # fields should be handled manually. # Before: # anteHandler, err := NewAnteHandler( # HandlerOptions{ # ante.HandlerOptions{ # ... # }, # &app.CircuitKeeper, # }, # ) # # After: # anteHandler, err := ante.NewAnteHandler( # ante.HandlerOptions{ # ... # }, # ) - old: "anteHandler, err := NewAnteHandler(" new: "anteHandler, err := ante.NewAnteHandler(" file_match: app.go
- old: "HandlerOptions{\n\t\t\tante.HandlerOptions{\n"
new: "ante.HandlerOptions{\n"
file_match: app.go
- old: "\t\t\t},\n\t\t\t&app.CircuitKeeper,\n\t\t},\n\t)\n"
new: "\t\t\t},\n\t)\n"
file_match: app.go
── verification ────────────────────────────────────────────────────────────
verification: must_not_contain: - pattern: circuitante - pattern: "NewAnteHandler(\n\t\tHandlerOptions{"