mithril icon indicating copy to clipboard operation
mithril copied to clipboard

Retrieves Cardano blocks with `chainsync` in `pallas` PoC

Open jpraynaud opened this issue 11 months ago • 1 comments

Why

We want to retrieve blocks from the Cardano node by using the chainsync mini protocol instead of reading the immutable files: this will allow us to get data closer to the tip of the chain (e.g. volatile data). In order to get a better understanding of the constraints of finality of the chain (e.g. handling rollbacks), we want to experiment in a PoC the usage of this mini protocol.

See

  • Oura: worker thread writing to a queue in the background https://github.com/txpipe/oura/blob/29fed274e8dd46948bccf05ca1ed50705d60adf0/src/sources/n2c.rs#L92
  • https://ouroboros-network.cardano.intersectmbo.org/pdfs/network-spec/network-spec.pdf

What

Create a PoC PallasBlockReader that can interact with Cardano chainsync mini protocol and provide a clear interface so that we can integrate it in the core developments of Mithril. This PR will not be merged in the main branch.

How

  • [ ] Implement a prototype PallasBlockReader
  • [ ] Create a lightweight documentation

jpraynaud avatar Mar 26 '24 09:03 jpraynaud

FYI, @falcucci is working on the issue :+1:

jpraynaud avatar Apr 11 '24 16:04 jpraynaud

@jpraynaud 🫡

falcucci avatar Apr 12 '24 15:04 falcucci