Closed telezhnaya closed 3 years ago
Are we sure that we want the service only for calculating circulating supply? Maybe it's better to take into account that it could calculate other values as well?
Here is what I am thinking:
There are various approaches we can use:
(1) feels like we implement a monolith and to implement a tiny change to the analytics we will need to roll out the whole indexer.
(2) and (3) have the overhead of being independent projects, gits, deployments, etc, but at the same time, they can have their out release iteration. So it is good and bad at the same time.
(1) has a benefit that we already have the setup (migrations, database access, models), and can even have direct access to the archival blockchain data (not all the information is stored into Postgres, and sometimes you may even want to do view-calls to the contracts)
Today I lean towards the pragmatic approach of re-using the setup we already have, so go with the first approach and just make sure we have a clean separation on the modules level inside the Indexer for Explorer implementation.
NOTE: I want us to keep in mind that we run several Indexer for Explorer instances for redundancy, so we should make sure our analytics don't produce duplicates.
I need to create a separate project in Near organization (uuuh, awesome feeling). Let's discuss the name. It fully depends on p.1, so I am waiting for your opinion.
It is not that day, yet :smile:
I understood that it's better to clarify how it should look like.
General idea: I see it as a CLI utility that
block_height
as an input (or taking latest)block_height
for the previous day (read: rounds it) to remove the dependency on the exact time of invoking (could be switched off)block_height
It could be invoked by cron to calculate it once a day. I will also provide it with a list of historical
block_height
s to fill the table at the very beginning.near-indexer-for-explorer
since we have all the migrations there. It's better not to shuffle it up between several projects.circulating_supply
with columnsblock_height
(primary key and foreign key toblocks
table),total_supply
,circulating_supply
,locked_supply_on_lockups
,locked_foundation_supply
. There will be one line for one day.I need to create a separate project in Near organization (uuuh, awesome feeling). Let's discuss the name. It fully depends on p.1, so I am waiting for your opinion.
@frol @khorolets