Open DoubleOTheven opened 1 year ago
Love the motivation behind this, but wouldn't the UX suffer if the "default" is waiting for a Light Client to initialize ~10 seconds? 🤔 IMO, this should be more of a user-initiated switch or should be set by the developers proactively for very sensitive interactions.
This is good feedback @wottpal. I think you are right. I will update the issue
There is a grant from ink!ubator supporting this issue.
I think we want to allow either ApiPromise or Light Clients on a per chain basis. Then we could expose these to a developer:
setLightClient('astar')
- this would set only the client for astar to a light client, but other chain connections remain untouched. Takes a ChainId as an argument.setLightClients()
- this would change all clients to light clients.setTrustedApi('aleph')
- this would change the client to an apiPromise for only the Aleph Zero connection. Takes ChainId as an argument.setTrustedApi()
- this would change all clients to apiPromise instancesYou can imagine a UI where the user can choose how they want to connect on a per chain basis or globally.
Feature Request
Add light clients as an alternative to calling third party RPC nodes. Read more here
Suggestion
Implement this. The client takes about 10 seconds to initialize, so we should allow a user to opt in to this as @wottpal suggested. RPC nodes should be default.
Motivation
Decentralization. Cut out the middle man.
Use Cases