cometbft / rpc-companion

Experimental RPC companion
1 stars 1 forks source link

Proof of Concept (POC) for RPC Companion - `/block` #7

Closed andynog closed 1 year ago

andynog commented 1 year ago

This Proof of Concept (POC) for the RPC companion will implement the minimum code required to validate a end to end test focusing on the Block structure.

The POC will implement logic for a Ingest Service that when started fetches a few blocks from a full node using its JSONRPC endpoint and method /block. For each block retrieved the Ingest Service will insert the block information into a PostgreSQL database that has the proper schema definition to persist a block structure.

The POC will also implement an initial JSONRPC endpoint that returns a block with information retrieved from the database.

The final validation for the POC is to ensure the response for a block returned from a full node JSONRPC endpoint is compatible with the block returned from the RPC Companion service.

In order to implement the POC the following tasks will need to be implemented:

andynog commented 1 year ago

Implemented as part of PR #6, as described it there, this POC implementation implemented logic to persist data in a normalized way but that's not a good approach. Will refactored the persistence logic a bit to be more flexible and will normalized accordingly when use cases require that.