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

Unreliable #54

Closed
0x4007 opened this issue Oct 10, 2024 · 7 comments
Closed

Unreliable #54

0x4007 opened this issue Oct 10, 2024 · 7 comments

Comments

@0x4007
Copy link
Member

0x4007 commented Oct 10, 2024

pay.ubq.fi has not been working the last few days. rpc manager is not handling errors

telegram-cloud-photo-size-1-4918431621091274969-y

telegram-cloud-photo-size-1-4918431621091274966-y

telegram-cloud-photo-size-1-4918431621091274963-y

@rndquu
Copy link
Member

rndquu commented Oct 22, 2024

This line suddenly started throwing ✘ [ERROR] [RPCService] Failed to find fastest RPC TypeError: Reduce of empty array with no initial value

@Keyrxng
Copy link
Member

Keyrxng commented Oct 23, 2024

This line suddenly started throwing ✘ [ERROR] [RPCService] Failed to find fastest RPC TypeError: Reduce of empty array with no initial value

where was this @rndquu in production or local testing?

Local requires you pass in localhost:8545 in my exp testing in pay.ubq.fi

@rndquu
Copy link
Member

rndquu commented Oct 24, 2024

where was this @rndquu in production or local testing?

Local testing with reloadly production credentials

Local requires you pass in localhost:8545 in my exp testing in pay.ubq.fi

I don't understand where to pass it and why we should even pass anything for handler.getFastestRpcProvider() to work

@Keyrxng
Copy link
Member

Keyrxng commented Oct 24, 2024

image

image

https://github.com/ubiquity/pay.ubq.fi/pull/345/files#diff-f74ca1939008bb970e16b2333f4ce8d95a939ba8a409737479a3e9b19515dffbR10

The PR in pay.ubq.fi is ready for review, contains the change and does not present undefined or your error.

@Keyrxng
Copy link
Member

Keyrxng commented Oct 24, 2024

If your testing locally you are likely using networkID 31337 and if that's true then that's your rpc-handler response from that network as 31337 is a real network so you must manually add your local anvil instance to runtime rpcs

rpc-handler could receive a slight update to address this and we can insert the local anvil urls from here but host and port are customizable so I figured best to enforce the consumer of the pkg injects their own local provider

const networkIds: Record<NetworkId, NetworkName> = {
...{ ...CHAINS_IDS }, // removing readonly
31337: "anvil",
1337: "hardhat",
};
const networkNames = Object.fromEntries(
Object.entries(networkIds).map(([key, value]) => {
return [value, key];
})
) as Record<NetworkName, NetworkId>;
Reflect.deleteProperty(networkNames, "geth-testnet"); // 1337
Reflect.deleteProperty(networkNames, "gochain-testnet"); // 31337
- There is logic (which I just noticed is slightly incorrect) to handle this in the package already, it needs fixed by deleting the entry first and then replacing it with anvil, I'm doing the reverse it seems so the delete call doesn't remove it.

@Keyrxng
Copy link
Member

Keyrxng commented Oct 25, 2024

I'm pretty sure this can be closed as unplanned.

  1. permit-generation was the cause of the down time due to invalid permits.
  2. local testing just needs the user to inject their anvil instance.
  3. Update rpc-handler and fix tests following beta merge pay.ubq.fi#345 (comment), feat: use reloadly production proxy pay.ubq.fi#352, have been merged without error and things appear to be working.

@Keyrxng Keyrxng mentioned this issue Oct 25, 2024
@rndquu
Copy link
Member

rndquu commented Oct 25, 2024

ok, let's see how it goes

@rndquu rndquu closed this as not planned Won't fix, can't repro, duplicate, stale Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants