Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make dapp RPC connection logic more resilient #56

Closed
otoole-brendan opened this issue Nov 6, 2023 · 0 comments
Closed

Make dapp RPC connection logic more resilient #56

otoole-brendan opened this issue Nov 6, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@otoole-brendan
Copy link

otoole-brendan commented Nov 6, 2023

What is the Problem Being Solved?

When users navigate to https://app.inter.trade/ they are redirected to dapp-inter-jumper which checks for latest IPFS hash ands loads the UI.
Currently, the way it works is we randomly fetch 1 of 2 RPC nodes listed in network-config and if no connection within 10seconds, we give up, throw a non-descriptive error. If you keep refreshing you might eventually hit an active RPC node. It's a poor user experience that has no resiliency and doesn't provide enough context/information to the user for them to understand what happened or what to do next.

Description of the Design

(make changes in @agoric/rpc)

  1. We try every available node once (in predetermined order).
  2. Once we’ve cycled through all RPC nodes we retry them each once.
  3. Regardless of what’s happening with node connection attempt logic, if no connection made after 5 seconds - we show ‘Connection is taking longer than expected. Please wait.’ message to user (worth giving RPC node context i.e. ‘attempting connection to Polkachu node’?)
  4. Console log messages should show error messaging
  5. Upon second retry fail - we show ‘Problem connecting to chain - this may be due to RPC connection issues. See or for more information’ please try again later.’ message to user
  6. For any other connection-related issue (i.e. all nodes not working) not defined above, use message from 5 for catch-all user error message

Security Considerations

TBD

Scaling Considerations

TBD

Test Plan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants