Since some information are not stored in blockchain state, it is mandatory to use an indexer. For example if you want to get an identity by its username, Duniter will not answer that because it only remembers the 128 bits of the username hash, not the maximum 336 bits (8 × 42) of the username.
But that means that some features of the clients (like for example getting an identity by username in
gcli) are only available if and indexer exists and match the targeted network. Therefore, when using these functions, we should check that:
- the indexer can be reached
- the duniter node can be reached
- the indexer is based on the same network as the duniter node (same genesis hash for example)
- the indexer is relatively up to date with the network (not too far from last finalized block)
We can implement this in two manners:
- the less trusty way where the clients performs the check himself
- the more convenient but also more trusty way where the clients asks the indexer if it is up to date on a given network
I’m adding this post in the #clients category since for now, this is not implemented in the indexer and has to be implemented in the client.