Rollkit RPC Equivalency
Abstract
Rollkit RPC is a remote procedure call (RPC) service that provides a set of endpoints for interacting with a Rollkit node. It supports various protocols such as URI over HTTP, JSONRPC over HTTP, and JSONRPC over WebSockets.
Protocol/Component Description
Rollkit RPC serves a variety of endpoints that allow clients to query the state of the blockchain, broadcast transactions, and subscribe to events. The RPC service follows the specifications outlined in the CometBFT specification.
Rollkit RPC Functionality Coverage
Routes | Full Node | Test Coverage |
---|---|---|
Health | ✅ | ❌ |
Status | ✅ | 🚧 |
NetInfo | ✅ | ❌ |
Blockchain | ✅ | 🚧 |
Block | ✅ | 🚧 |
BlockByHash | ✅ | 🚧 |
BlockResults | ✅ | 🚧 |
Commit | ✅ | 🚧 |
Validators | ✅ | 🚧 |
Genesis | ✅ | 🚧 |
GenesisChunked | ✅ | 🚧 |
ConsensusParams | ✅ | 🚧 |
UnconfirmedTxs | ✅ | 🚧 |
NumUnconfirmedTxs | ✅ | 🚧 |
Tx | ✅ | 🚧 |
BroadCastTxSync | ✅ | 🚧 |
BroadCastTxAsync | ✅ | 🚧 |
Message Structure/Communication Format
The communication format depends on the protocol used. For HTTP-based protocols, the request and response are typically structured as JSON objects. For web socket-based protocols, the messages are sent as JSONRPC requests and responses.
Assumptions and Considerations
The RPC service assumes that the Rollkit node it interacts with is running and correctly configured. It also assumes that the client is authorized to perform the requested operations.
Implementation
The implementation of the Rollkit RPC service can be found in the rpc/json/service.go
file in the Rollkit repository.
References
[1] CometBFT RPC Specification [2] RPC Service Implementation