From a1a300a570312a9bb7ff1fd9d2d12f38a288d9cc Mon Sep 17 00:00:00 2001 From: bdchatham Date: Wed, 20 May 2026 15:56:20 -0700 Subject: [PATCH] feat: enable gRPC on validator mode (parity with sei-infra canonical) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `applyValidatorOverrides` previously disabled `API.GRPC.Enable`, diverging from canonical sei-infra EC2 validators. Canonical evidence: - `sei-chain/docker/localnode/config/app.toml` `[grpc] enable = true` — the seid binary's built-in default. - `sei-infra/validators/deploy/scripts/init_configure.sh` sed-edits 10+ fields (pruning, indexer, sc-enable, concurrency) but never touches the `[grpc]` section — default carries through. - `sei-infra/validators/deploy/scripts/post_init.sh` starts the oracle price feeder, whose `price_feeder_config.toml:47` hard-codes `grpc_endpoint = "localhost:9090"`. A canonical validator without gRPC up cannot feed prices. K8s validators (where seictl writes app.toml from these defaults) have been diverging from this for the entire history of sei-config. The divergence is also what makes the cosmos-exporter sidecar Fatal-loop on K8s validators specifically — it dials :9090 at startup and seid isn't listening there. `GRPCWeb.Enable` stays disabled: no current consumer needs it and it adds browser-reachable surface for no benefit (security-specialist cross-review call). Un-defer when a real consumer appears. `REST.Enable` / `EVM.HTTPEnabled` / `Storage.StateStore.Enable` stay disabled — those are separate posture questions. Cross-repo coordination after this lands + tags v0.0.15: 1. bump sei-config dep in seictl, build new seictl image 2. bump `SEI_SIDECAR_IMAGE` in sei-k8s-controller's platform overlays 3. cycle validator pods (config-apply re-runs on Init/NodeUpdate, not on env-var change — existing pods retain old app.toml until cycled) Follow-up (filed separately as sei-k8s-controller issues): - NetworkPolicy gating :9090 on SeiNode pods (EC2 has SG-level gating; K8s parity requires explicit policy). - Remove `cosmosExporterReadinessProbePort` validator branch in sei-k8s-controller once full fleet cycles. Co-Authored-By: Claude Opus 4.7 --- config_test.go | 12 ++++++++++-- defaults.go | 1 - version.json | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/config_test.go b/config_test.go index 1efa196..a9edaa9 100644 --- a/config_test.go +++ b/config_test.go @@ -34,8 +34,8 @@ func TestDefaultForMode_ValidatorDisablesServices(t *testing.T) { if cfg.API.REST.Enable { t.Error("validator should have REST API disabled") } - if cfg.API.GRPC.Enable { - t.Error("validator should have gRPC disabled") + if cfg.API.GRPCWeb.Enable { + t.Error("validator should have gRPC-web disabled (no current consumer; raw gRPC carries the price-feeder + cosmos-exporter traffic)") } if cfg.EVM.HTTPEnabled { t.Error("validator should have EVM HTTP disabled") @@ -48,6 +48,14 @@ func TestDefaultForMode_ValidatorDisablesServices(t *testing.T) { } } +func TestDefaultForMode_ValidatorEnablesGRPC(t *testing.T) { + cfg := DefaultForMode(ModeValidator) + + if !cfg.API.GRPC.Enable { + t.Error("validator should have gRPC enabled (parity with sei-infra canonical EC2 deploy; price feeder + cosmos-exporter dial localhost:9090)") + } +} + func TestDefaultForMode_SeedHighConnections(t *testing.T) { cfg := DefaultForMode(ModeSeed) diff --git a/defaults.go b/defaults.go index da8f80a..79c3f58 100644 --- a/defaults.go +++ b/defaults.go @@ -259,7 +259,6 @@ func applyValidatorOverrides(cfg *SeiConfig) { cfg.Network.P2P.AllowDuplicateIP = false cfg.API.REST.Enable = false - cfg.API.GRPC.Enable = false cfg.API.GRPCWeb.Enable = false cfg.Storage.StateStore.Enable = false diff --git a/version.json b/version.json index c00f127..d5373c9 100644 --- a/version.json +++ b/version.json @@ -1,3 +1,3 @@ { - "version": "v0.0.14" + "version": "v0.0.15" }