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

provider proxy #236

Closed
wants to merge 4 commits into from
Closed

Conversation

Keyrxng
Copy link
Member

@Keyrxng Keyrxng commented Jun 1, 2024

Resolves #235

Wrapped app.provider in a Proxy to catch any failed call across the app

QA:

You see two page loads that require the proxy to select a new provider and retry, the third requires no retry.

You see two sets of logged failures because the app makes a call on page load, this cannot be effectively removed as a successful RPC will not need changed as seen on the 3rd page load. The proxy uses the first stored RPC and then loops the latencies retrying until successful.

0601.mp4

@Keyrxng Keyrxng requested a review from pavlovcik as a code owner June 1, 2024 18:34
@ubiquity-os-deployer
Copy link

ubiquity-os-deployer bot commented Jun 1, 2024

Copy link
Contributor

github-actions bot commented Jun 1, 2024

@Keyrxng
Copy link
Member Author

Keyrxng commented Jun 1, 2024

I wasn't able to really understand why they were failing in the first place but in manual testing this approach resolved the issue every time.

I will add some tests to cover it, I'm unsure how well Cypress will be able to test it so it may have to be with Jest


I was thinking maybe to just use the ethers.providers.FallbackProvider and have each latency entry as a node but that has it's own array of potential errors to handle

@Keyrxng Keyrxng requested a review from rndquu as a code owner June 1, 2024 21:04
@Keyrxng
Copy link
Member Author

Keyrxng commented Jun 4, 2024

@rndquu should this be closed or used as a stop gap until rpc-handler has been updated?

@rndquu
Copy link
Member

rndquu commented Jun 6, 2024

@rndquu should this be closed or used as a stop gap until rpc-handler has been updated?

I think it makes sense to close this PR, wait for ubiquity/rpc-handler#23 and then update the code in this repo accordingly

@Keyrxng Keyrxng closed this Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RPC does not support eth_call method
2 participants