Skip to content

Version-aware defaults: remove hardcoded memiavl_only overrides once sei-config tracks seid version #28

@bdchatham

Description

@bdchatham

Problem

sei-config currently defaults WriteMode to cosmos_only to not break stable seid v6.5.1, while nightly seid (main, unreleased) requires memiavl_only. To bridge this gap, memiavl_only is hardcoded as explicit overrides in the seitask-runner scenario SND templates (sei-k8s-controller#357) rather than driven by sei-config defaults. This is brittle: every time a write mode changes with a new seid version, someone has to manually update scenario templates and remember to remove those overrides once the sei-config default catches up to the new release.

The current workaround in sei-k8s-controller#357:

overrides:
  storage.state_commit.write_mode: memiavl_only
  storage.state_store.write_mode: memiavl_only

These overrides exist only because sei-config cannot express "give me the right defaults for seid nightly." They will need to be manually removed once seid v6.6.0 is tagged.

Impact

Ongoing operator burden every time a new seid version ships a write mode change. Risk of hardcoded overrides lingering past their intended lifespan — silent misconfiguration that manifests only when someone upgrades the seid binary without removing the now-stale template override.

Relevant experts

  • platform-engineer — sei-config library design, seictl sidecar config generation

Proposed approach

sei-config should gain a mechanism to express version-aware defaults so callers can request the correct defaults for a given seid version without knowing the internal schema version mapping. Three options discussed:

  1. DefaultForVersion(seidVersion string) — new entry point that parses a seid semver and returns mode-appropriate defaults. Most explicit; ties sei-config API surface to seid versioning.

  2. SeidVersionForSchema map + caller-side comparisonSeidVersionForSchema (already defined as a skeleton in migrate.go) paired with a MinSeidVersionForSchema(schemaVersion int) string helper. Callers compare the running seid version against the map and call DefaultForMode with the right schema. No new entry point; callers own the comparison logic.

  3. Image-tag–aware config in seictl — seictl reads the seid image tag from the SeiNode spec, parses the version, and selects the right sei-config schema version before generating app.toml. sei-config stays version-agnostic; version awareness lives in the callsite.

Option 3 is likely the right level of abstraction — sei-config is a leaf library and shouldn't need to know about seid release cadence. The version-to-schema mapping belongs closer to the deployment layer (seictl or sei-k8s-controller).

Acceptance criteria

  • Hardcoded storage.state_commit.write_mode: memiavl_only overrides removed from sei-k8s-controller scenario SND templates
  • Nightly scenarios continue to provision validators with memiavl_only without explicit template overrides
  • v6.5.x nodes continue to use cosmos_only without explicit overrides

Out of scope

  • The seid v6.6.0 release itself
  • Changes to seitask-runner templates (downstream; cleaned up once this resolves)
  • Any sei-chain write mode changes beyond cosmos_onlymemiavl_only

References

  • sei-config#27 — reverted default to cosmos_only (this issue's root cause)
  • sei-k8s-controller#357 — hardcoded memiavl_only workaround (to be removed)
  • migrate.goSeidVersionForSchema skeleton

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions