Endpoint discovery and filtering
#24 (closed) deals with adding custom endpoints.
In https://forum.duniter.org/t/liste-des-endpoints/12347 we discussed how to retrieve a list of endpoints automatically in the clients. While the server part is not finalized yet (only a hacky temporary solution using onchain remarks and indexer has been set up), the client part can be implemented from now on.
We have to implement some kind of network discovery and filtering since it's not part of the polkadot ecosystem which relies on trusted endpoints: https://wiki.polkadot.network/docs/maintain-endpoints. These are the steps we can implement:
- local format check of the URL (
wss
protocol, domain...) - genesis hash must match the selected network (to avoid interacting with test network)
- synchronisation state should be coherent (with an estimation of the acceptable range for latest head)
Once the list is filtered, we can use endpoints to establish connections with the blockchain.
The same can be done for indexer endpoints.