aergoio / aergoscan

Aergo Blockchain Explorer

Home Page:http://aergoscan.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Better support for multiple chains

graup opened this issue · comments

The backend currently doesn't work with multiple blockchains. Since multi-chain is an important feature of Aergo, we need to improve this.

There are two approaches:

  • Have one instance of backend+frontend per chain (optionally reuse same db, with index prefix)
  • Have multiple chains in one instance (more flexible with UX, e.g. we can have a dropdown to switch between networks and also analyze cross-network traffic)

It would really help to have the indexer be part of the node (aergoio/aergo#14). That way it would be really easy to setup indexing multiple chains into one database and have just one unified backend and frontend.

Update: The indexer is now a standalone go program (https://github.com/aergoio/aergo-esindexer) which supports syncing multiple chains. The aergoscan backend is now only an API to access the data in the database.

We can still go both routes mentioned in the intro, it really is just a UX decision now.

Multi-chain support landed in the API server in c25d333

API URLs are now /:chainId/tx, /:chainId/bestBlock etc.

What's left here is a better way of configuration and using the new chainInfo API which will be released in aergosvr 0.11.