-
Notifications
You must be signed in to change notification settings - Fork 0
Add gRPC API alongside JSON-RPC #3
Copy link
Copy link
Closed
Description
Summary
Introduce a gRPC server exposing the same blob and header APIs currently served over JSON-RPC. gRPC provides better performance characteristics (binary serialization, HTTP/2 multiplexing, streaming) which matters for high-throughput namespace indexing workloads.
Motivation
- Performance: Protobuf encoding is significantly faster and smaller than JSON-RPC payloads, especially for blob data which can be large
- Streaming: gRPC bidirectional streaming is a natural fit for
Subscribemethods (headers, blobs) - Type safety: Protobuf service definitions provide a strict contract and codegen for clients
- Ecosystem: Many Cosmos/Celestia ecosystem tools already use gRPC as the primary transport
Requirements
Proto definitions
- Define
BlobServiceandHeaderServicein.protofiles - Mirror the same methods as the JSON-RPC API:
Blob.Get,Blob.GetAll,Blob.Subscribe(server-stream),Blob.GetProof,Blob.IncludedHeader.GetByHeight,Header.Subscribe(server-stream),Header.LocalHead,Header.NetworkHead
Server
- gRPC server listening on a configurable port (separate from JSON-RPC)
- Add
[grpc] addressconfig field - Reuse the same underlying store and sync engine — no logic duplication
Client (optional, for testing/tooling)
- Generated Go client from proto definitions
- CLI or test harness that can exercise the gRPC endpoints
Non-goals
- Replacing JSON-RPC — both transports coexist. JSON-RPC remains the default for ev-node compatibility.
References
- Design doc:
test_plan.md
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels