2

I was trying to find a way to get raw block/transaction data and came across this question. The answer was that there is no way to do that currently but db-sync somehow does that. How does it do that? More specifically I was looking for some sort of documentation on how to do that myself (an API reference with the protocol specified).

1 Answer 1

2

The answer to that other question is only partly correct ie the node does make this data available, but not in an easy to digest manner.

The node does expose a local chain sync protocol. However this local chain sync protocol is written in Haskell and uses CBOR encoded data. It is theoretically possible to write code in another language that connects to this local chain sync protocol (I think there is Rust code somewhere to do this).

The local chain sync protocol only supports on-chain data. Data that is part of ledger state like epoch rewards and epoch stake distribution are not included.

1
  • 1
    Looking more into the chain-sync protocol, ogmios wraps it in a websocket API, so I think that's exactly what I am looking for, thanks!
    – alexk745
    Jul 20, 2022 at 9:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.