feat(sidecar): gov-param-change task (PLT-487)#203
Conversation
Adds a gov-param-change sidecar task that submits a v1beta1 ParameterChangeProposal signed by the operator account, mirroring gov-software-upgrade. The per-change value is carried as json.RawMessage and stringified exactly once in buildParamChangeMsg — so any JSON shape (scalar/string/bool/object) reaches the chain single-encoded, structurally preventing the double-encode-at-apply bug. usei-denom deposit guard; param-change-specific REHYDRATION WARNING (no apply-once safety net). isExpedited deferred (honored only via NewMsgSubmitProposalWithExpedite). Wires engine.TaskGovParamChange, client.GovParamChangeTask, and the serve.go handler registry. Test covers the single-encode regression for object + scalar values, non-usei deposit rejection, and empty-changes rejection. Design: bdchatham-designs designs/wave/seinode-govparamchange-submit-proposal.md (PLT-487).
PR SummaryMedium Risk Overview The task is wired end-to-end:
Reviewed by Cursor Bugbot for commit 3b5a00a. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit a9dbc9d. Configure here.
…cs/tests (review) - CRITICAL: newSignTxInterfaceRegistry now registers the x/params proposal package — without it, packing a ParameterChangeProposal into an Any fails at TxEncoder at runtime. CGO_ENABLED=0 build verified clean (proposal doesn't pull x/wasm). - Add TestGovParamChangeHandler_HappyPath (threads signAndBroadcast end-to-end; proves the registration) + a Terminal-error validation table. - Document that integer-valued params must be JSON strings, not bare numbers (the sidecar map decode is float64-based; >2^53 loses precision). Sei large-integer params are string-encoded by convention. UseNumber() on the shared server decode is a tracked follow-up.
…204) Follow-up to #203. The `gov-param-change` handler was tested, but the client `GovParamChangeTask` builder had no coverage (flagged in cross-review). Adds: - **`Validate()` table** — valid + every failure branch. - **`ToTaskRequest()`** — type + required param keys + memo-omitted-when-empty. - **`ValueSingleEncodedOnWire`** — the client-side half of the single-encode contract: the per-change value survives `ToTaskRequest` + the HTTP `json.Marshal` **byte-identical** for object/string/number/bool, complementing the handler-side regression guard. This is the full client→wire path the prior unit test bypassed. Test-only; no behavior change. 🤖 Generated with [Claude Code](https://claude.com/claude-code)

Adds a
gov-param-changesidecar task — submits a v1beta1ParameterChangeProposalsigned by the operator account, mirroringgov-software-upgrade.The load-bearing decision: the per-change
valueis carried asjson.RawMessageandstring()-converted exactly once inbuildParamChangeMsg. So any JSON shape — scalar100, string"86400000000000", bool, or object — reaches the chain single-encoded. This structurally prevents the double-encode-at-apply bug that consumed the deposit on the arctic-1 prop-252 first draft.isExpediteddeferred (honored only viaNewMsgSubmitProposalWithExpedite, not the content field)Wires
engine.TaskGovParamChange,client.GovParamChangeTask, and theserve.goregistry.go build/go vet/tests green.Design (Coral-signed-off, Brandon-approved):
bdchatham-designs designs/wave/seinode-govparamchange-submit-proposal.md. First half of PLT-487 (seictl → release → controller bump).🤖 Generated with Claude Code