Skip to content

Commit 24dd73b

Browse files
authored
Rollkit RPC Equivalency (#1275)
<!-- Please read and fill out this form before submitting your PR. Please make sure you have reviewed our contributors guide before submitting your first PR. --> ## Overview <!-- Please provide an explanation of the PR, including the appropriate context, background, goal, and rationale. If there is an issue with this information, please provide a tl;dr and link the issue. --> ## Checklist <!-- Please complete the checklist to ensure that the PR is ready to be reviewed. IMPORTANT: PRs should be left in Draft until the below checklist is completed. --> - [ ] New and updated code has appropriate documentation - [ ] New and updated code has new and/or updated testing - [ ] Required CI checks are passing - [ ] Visual proof for any user facing features like CLI or documentation updates - [ ] Linked issues closed with keywords <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Documentation** - Introduced a new document titled "Rollkit RPC Equivalency" that provides comprehensive information about the Rollkit RPC service, including supported endpoints, message structure, assumptions, and implementation details. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 42e3e55 commit 24dd73b

1 file changed

Lines changed: 68 additions & 0 deletions

File tree

rpc/rpc-equivalency-coverage.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Rollkit RPC Equivalency
2+
3+
## Abstract
4+
5+
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.
6+
7+
## Protocol/Component Description
8+
9+
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].
10+
11+
## Rollkit RPC Functionality Coverage
12+
13+
Routes | Full Node | Test Coverage |
14+
--------------------------------------- | --------- | ------------- |
15+
[Health][health] | ✅ | ❌ |
16+
[Status][status] | ✅ | 🚧 |
17+
[NetInfo][netinfo] | ✅ | ❌ |
18+
[Blockchain][blockchain] | ✅ | 🚧 |
19+
[Block][block] | ✅ | 🚧 |
20+
[BlockByHash][blockbyhash] | ✅ | 🚧 |
21+
[BlockResults][blockresults] | ✅ | 🚧 |
22+
[Commit][commit] | ✅ | 🚧 |
23+
[Validators][validators] | ✅ | 🚧 |
24+
[Genesis][genesis] | ✅ | 🚧 |
25+
[GenesisChunked][genesischunked] | ✅ | 🚧 |
26+
[ConsensusParams][consensusparams] | ✅ | 🚧 |
27+
[UnconfirmedTxs][unconfirmedtxs] | ✅ | 🚧 |
28+
[NumUnconfirmedTxs][numunconfirmedtxs] | ✅ | 🚧 |
29+
[Tx][tx] | ✅ | 🚧 |
30+
[BroadCastTxSync][broadcasttxsync] | ✅ | 🚧 |
31+
[BroadCastTxAsync][broadcasttxasync] | ✅ | 🚧 |
32+
33+
## Message Structure/Communication Format
34+
35+
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.
36+
37+
## Assumptions and Considerations
38+
39+
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.
40+
41+
## Implementation
42+
43+
The implementation of the Rollkit RPC service can be found in the [`rpc/json/service.go`] file in the Rollkit repository.
44+
45+
## References
46+
47+
[1] [CometBFT RPC Specification][specification]
48+
[2] [RPC Service Implementation][`rpc/json/service.go`]
49+
50+
[specification]: https://docs.cometbft.com/v0.38/spec/rpc/
51+
[`rpc/json/service.go`]: https://github.com/rollkit/rollkit/blob/main/rpc/json/service.go
52+
[health]: https://docs.cometbft.com/v0.38/spec/rpc/#health
53+
[status]: https://docs.cometbft.com/v0.38/spec/rpc/#status
54+
[netinfo]: https://docs.cometbft.com/v0.38/spec/rpc/#netinfo
55+
[blockchain]: https://docs.cometbft.com/v0.38/spec/rpc/#blockchain
56+
[block]: https://docs.cometbft.com/v0.38/spec/rpc/#block
57+
[blockbyhash]: https://docs.cometbft.com/v0.38/spec/rpc/#blockbyhash
58+
[blockresults]: https://docs.cometbft.com/v0.38/spec/rpc/#blockresults
59+
[commit]: https://docs.cometbft.com/v0.38/spec/rpc/#commit
60+
[validators]: https://docs.cometbft.com/v0.38/spec/rpc/#validators
61+
[genesis]: https://docs.cometbft.com/v0.38/spec/rpc/#genesis
62+
[genesischunked]: https://docs.cometbft.com/v0.38/spec/rpc/#genesischunked
63+
[consensusparams]: https://docs.cometbft.com/v0.38/spec/rpc/#consensusparams
64+
[unconfirmedtxs]: https://docs.cometbft.com/v0.38/spec/rpc/#unconfirmedtxs
65+
[numunconfirmedtxs]: https://docs.cometbft.com/v0.38/spec/rpc/#numunconfirmedtxs
66+
[tx]: https://docs.cometbft.com/v0.38/spec/rpc/#tx
67+
[broadcasttxsync]: https://docs.cometbft.com/v0.38/spec/rpc/#broadcasttxsync
68+
[broadcasttxasync]: https://docs.cometbft.com/v0.38/spec/rpc/#broadcasttxasync

0 commit comments

Comments
 (0)