Skip to content

[Bug] Schema fetch uses snapshot.indexer_url even when snapshot.enabled=false #376

Description

@Mutu-s

Describe the bug

On every startup the host tries to fetch the GraphQL schema from host.snapshot.indexer_url even when snapshot.enabled is false.

With the shipped default config.yaml, that means every install attempts:

GET http://35.206.105.60:8080/api/v1/schema

That indexer is unreachable (times out after 30s), so the host logs:

Schema fetch failed, using embedded schema: ... context deadline exceeded

and silently falls back to the embedded schema.

Root cause

pkg/host/schema_resolve.go always parses cfg.HostConfig.Snapshot.IndexerURL and never checks cfg.HostConfig.Snapshot.Enabled:

parsedURL, parseErr := url.Parse(cfg.HostConfig.Snapshot.IndexerURL)

Schema fetching is incorrectly coupled to the snapshot bootstrap config.

To Reproduce

  1. Use default config.yaml (snapshot.enabled: false, indexer_url: "http://35.206.105.60:8080").
  2. Start the host (Docker prod setup is enough).
  3. Check logs on startup → schema fetch timeout to 35.206.105.60:8080.
  4. Host continues with embedded schema.

Confirmed on production host: Docker container shinzo-host on public VPS, Aug 28 2026.

Expected behavior

When snapshot.enabled: false, the host should not call snapshot indexer_url for schema fetch.

Schema fetch should use a dedicated config (e.g. schema.indexer_url or INDEXER_SCHEMA_URL) or bootstrap/indexer discovery — not a stale snapshot default.

Impact

Suggested fix

if !cfg.HostConfig.Snapshot.Enabled {
    return schema.GetSchema() // or use dedicated schema.indexer_url when set
}

Or introduce schema.indexer_base_url separate from snapshot bootstrap.

Environment

  • Image: ghcr.io/shinzonetwork/shinzo-host-client (ethereum-mainnet-latest)
  • snapshot.enabled: false
  • DEFRA_URL=127.0.0.1:9181

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions