Skip to content

feat(config): add ProviderKind::Gonka and gonka_nodes / gonka_chain_prefix schema #3607

@bug-ops

Description

@bug-ops

Part of epic #3602.

Scope

Extend ProviderEntry with the new fields needed to declare a native gonka provider, and add the Gonka variant to ProviderKind. No provider implementation yet — that lands in #9.

Files to modify

  • crates/zeph-config/src/providers.rs:
    • ProviderKind::Gonka variant; as_str() returns \"gonka\".
    • New GonkaNode { base_url: String, address: String } struct.
    • New fields on ProviderEntry (both #[serde(default)]):
      • pub gonka_nodes: Option<Vec<GonkaNode>>
      • pub gonka_chain_prefix: Option<String> (default \"gonka\")
    • Validator: when type = \"gonka\", gonka_nodes must be non-empty; otherwise return a config error.

Acceptance

  • cargo nextest run -p zeph-config -- providers includes new tests:
    • Round-trip of a gonka entry with three nodes
    • Validator rejects empty gonka_nodes
    • Default chain_prefix is \"gonka\" when omitted
  • Existing configs (which never set these fields) still parse correctly.
  • cargo +nightly fmt --check and cargo clippy --workspace --features full -- -D warnings pass.

Depends on

None.

Size

S (~1.5h)

Metadata

Metadata

Assignees

Labels

P2High value, medium complexityconfigConfiguration file changesenhancementNew feature or requestsize/SSmall PR (11-50 lines)

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions