Essentially a proof of concept of a multi-protocol RPC sub-system for rusty-kaspa.
This demo features:
- Trait
RpcApi(initial work of Aspectron) exposing a protocol-agnostic API - rpc-core
RpcApiserver responsible for fetching data from consensus - rpc-grpc
RpcApiservice and client implementing (partially) theprotowireRPC from kaspad - Notification system with following pipeline: consensus -> rpc-core server -> rpc-grpc service -> rpc-grpc client -> client code
The gRPC implementation at this stage should be considered essentially a proof of concept. It is limited to 2 queries: get_block and get_info.
The same is true of the notification system that only implements BlockAdded.
The whole rpc sub-system is not actually connected to consensus for now, neither for queries nor for notifications.
The client code requires an actual go kaspa node in order to demonstrate inter-operability and backwards compatibility.
To run the prototype:
-
Open 2 terminals and run respectively following commands:
cargo run --bin servercargo run --bin client -- -a http://<kaspad_ip>:<rpc_port>(ie. -a http://192.168.1.233:16110)