pinax-network / substreams-sink-clickhouse

Substreams ClickHouse Sink
MIT License
3 stars 0 forks source link

`/blocks` using per chain & per map module in DB #107

Closed DenisCarriere closed 9 months ago

DenisCarriere commented 9 months ago

@Krow10 """ I was looking at the metrics available from the Clickhouse sink, I see we have the useful /blocks endpoints to get information about min, max, deltas, etc. """

But wouldn't it make more sense to have that information per-chain stored in the DB ?

Example from the sink running in the dev cluster right now:

{
  "max": 357548026,
  "min": 223589552,
  "distinctCount": 355781,
  "delta": 133958474,
  "missing": 133602693,
  "count": 355790
}

I think the lowest and max blocks are referring to different blockchains (EOS for max, UX for min I believe) since we only started the webhooks yesterday (using -1 as start block so only data from yesterday to now is present).