user6834: 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).

user5926: 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.

6834: <p>I was trying to find a way to get raw block/transaction data and came across <a href="https://cardano.stackexchange.com/questions/8063/how-to-read-data-from-a-cardano-node-directly">this question</a>. 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).</p>
 5926: <p>The answer to that other question is only partly correct ie the <code>node</code> does make this data available, but not in an easy to digest manner.</p>
<p>The <code>node</code> 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).</p>
<p>The local chain sync protocol <strong>only</strong> supports on-chain data. Data that is part of ledger state like epoch rewards and epoch stake distribution are not included.</p>
