Skip to content

CelestiaNodeFetcher: upstream RPC client #12

@tac0turtle

Description

@tac0turtle

Summary

Implement CelestiaNodeFetcher (pkg/fetch/celestia_node.go) — the DataFetcher backend that connects to a running celestia-node via JSON-RPC over WebSocket.

Requirements

  • Satisfy the DataFetcher interface:
    • GetHeader(ctx, height) — call header.GetByHeight
    • GetBlobs(ctx, height, namespace) — call blob.GetAll
    • GetNetworkHead(ctx) — call header.NetworkHead
    • SubscribeHeaders(ctx) — call header.Subscribe, return channel
    • Close() — clean shutdown of WebSocket connection
  • Use celestia-openrpc as the client library (lightweight, no cosmos-sdk dependency)
  • Auth token support for celestia-node's JWT authentication
  • Automatic reconnection on WebSocket disconnect with exponential backoff
  • Connection health check (periodic ping or detect stale subscription)

Configuration

[data_source]
type = "celestia-node"
endpoint = "ws://localhost:26658"
auth_token = ""

References

  • Design doc: test_plan.md — Data Source Interface section
  • celestia-openrpc client library
  • celestia-node api/rpc/server.go — server-side RPC setup

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