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

Claims Broken #205

Closed
0x4007 opened this issue Mar 17, 2024 · 22 comments · Fixed by #209 or #212
Closed

Claims Broken #205

0x4007 opened this issue Mar 17, 2024 · 22 comments · Fixed by #209 or #212

Comments

@0x4007
Copy link
Member

0x4007 commented Mar 17, 2024

When starting from Ethereum mainnet, and having to switch, the RPC stays broken until localStorage is cleared.

  • On the production instance da14f1b claims don't work with the following error:
erc20-permit.ts:259 Error in nonceBitmap method:  Error: could not detect network (event="noNetwork", code=NETWORK_ERROR, version=providers/5.7.2)
    at _Logger.makeError (index.ts:269:28)
    at _Logger.throwError (index.ts:281:20)
    at JsonRpcProvider.<anonymous> (json-rpc-provider.ts:483:23)
    at Generator.throw (<anonymous>)
    at rejected (index.ts:373:5)
(anonymous) @ erc20-permit.ts:259
Promise.catch (async)
isNonceClaimed @ erc20-permit.ts:258
checkPermitClaimable @ erc20-permit.ts:134
checkPermitClaimability @ erc20-permit.ts:49
claimErc20PermitHandler @ erc20-permit.ts:109
erc20-permit.ts:136 Error in isNonceClaimed:  Error: could not detect network (event="noNetwork", code=NETWORK_ERROR, version=providers/5.7.2)
    at _Logger.makeError (index.ts:269:28)
    at _Logger.throwError (index.ts:281:20)
    at JsonRpcProvider.<anonymous> (json-rpc-provider.ts:483:23)
    at Generator.throw (<anonymous>)
    at rejected (index.ts:373:5)
@0x4007
Copy link
Member Author

0x4007 commented Mar 17, 2024

Update: cleared my RPC cache and its fine. It must have selected a bad RPC. Perhaps the new module by Keyrxng handles this? Can you confirm @Keyrxng?

@0x4007 0x4007 closed this as not planned Won't fix, can't repro, duplicate, stale Mar 17, 2024
Copy link

ubiquibot bot commented Mar 17, 2024

# Issue was not closed as completed. Skipping.

@0x4007
Copy link
Member Author

0x4007 commented Mar 17, 2024

Update again: when starting from Ethereum mainnet, and having to switch, the RPC stays broken until localStorage is cleared.

@Keyrxng
Copy link
Contributor

Keyrxng commented Mar 17, 2024

I'm pretty sure that #204 resolves this, I'll add specific QA into the PR shortly

@Keyrxng
Copy link
Contributor

Keyrxng commented Mar 18, 2024

I've linked the because it relates to it but 204 resolves it, should I update 204 body and link this issue?

@0x4007
Copy link
Member Author

0x4007 commented Mar 18, 2024

We can make an exception but I left a comment in my review explaining my preference.

@0x4007
Copy link
Member Author

0x4007 commented Mar 22, 2024

@gentlementlegen do you think you can push a fix for this before the conference?

@gentlementlegen
Copy link
Member

gentlementlegen commented Mar 22, 2024

@pavlovcik Can have a look for sure. It was mentioned just above that another PR might solve it? How is this going?

@0x4007
Copy link
Member Author

0x4007 commented Mar 22, 2024

Its with another untested dependency thats not used currently in this repository.

@gentlementlegen
Copy link
Member

/start

Copy link

ubiquibot bot commented Mar 24, 2024

DeadlineSun, Mar 24, 6:25 AM UTC
Registered Wallet 0x0fC1b909ba9265A846b82CF4CE352fc3e7EeB2ED
Tips:
  • Use /wallet 0x0000...0000 if you want to update your registered payment wallet address.
  • Be sure to open a draft pull request as soon as possible to communicate updates on your progress.
  • Be sure to provide timely updates to us when requested, or you will be automatically unassigned from the task.

@gentlementlegen
Copy link
Member

@pavlovcik So far what I found it that it happens with only one specific RPC which is https://gnosis.api.onfinality.io/public . So it is actually not necessarily linked to switching networks but just happens if this specific one gets selected. It works fine with others like https://gnosis-mainnet.public.blastapi.io or https://rpc.ankr.com/gnosis

I am not sure of the fix yet, maybe retry with other networks if it happens, or there is a way to check that prior to sending the requests. I'll test @Keyrxng PR just in case to see if it is resolved that way, otherwise will investigate for a fix.

@Keyrxng
Copy link
Contributor

Keyrxng commented Mar 24, 2024

Before I made rpc-handlerpackage, I had implemented a very rudimentary solution which was a manual blacklist filtering bad RPCS pre-build because like you say, there are few that need removed, I'm pretty sure there was at least 2 RPCs that would fail consistently from the list if I remember right

It got hastily removed without being replaced with another solution immediately, so yeah if you don't want to involve another package then could always use this approach considering the urgency and band-aid style solve that's needed

const blacklist = ["https://xdai-archive.blockscout.com", "https://gnosis.api.onfinality.io/public"];

Are the two I had, reverting the below commit will solve the issue without trying to over-engineer something that'll be replaced by the rpc-handler package when that goes live

https://github.com/ubiquity/pay.ubq.fi/pull/179/files

Copy link

ubiquibot bot commented Mar 25, 2024

+ Evaluating results. Please wait...

Copy link

ubiquibot bot commented Mar 25, 2024

[ 85 WXDAI ]

@pavlovcik
Contributions Overview
ViewContributionCountReward
IssueSpecification137
IssueComment517.6
ReviewComment330.4
Conversation Incentives
CommentFormattingRelevanceReward
When starting from Ethereum mainnet, and having to switch, the R...
37
li:
  count: 1
  score: "1"
  words: 21
code:
  count: 1
  score: "1"
  words: 0
137
Update: cleared my RPC cache and its fine. It must have selected...
5.40.85.4
Update again: when starting from Ethereum mainnet, and having to...
3.80.993.8
We can make an exception but I left a comment in my review expla...
3.20.6053.2
@gentlementlegen do you think you can push a fix for this before...
2.80.792.8
Its with another untested dependency thats not used currently in...
2.40.7852.4
> I sadly can only get a screenshot for the QA since there is no...
100.8510
I'm not sure if there are any pitfalls with the built in RPC pro...
9.20.89.2
I think the api is standardized. It's like `window.ethereum.sign...
11.2
code:
  count: 2
  score: "4"
  words: 7
0.80511.2

[ 170.3 WXDAI ]

@gentlementlegen
Contributions Overview
ViewContributionCountReward
IssueTask1125
IssueComment20
IssueComment213.3
ReviewComment216
ReviewComment216
Conversation Incentives
CommentFormattingRelevanceReward
@pavlovcik Can have a look for sure. It was mentioned just above...
-0.825-
@pavlovcik So far what I found it that it happens with only one ...
-0.755-
@pavlovcik Can have a look for sure. It was mentioned just above...
2.20.8252.2
@pavlovcik So far what I found it that it happens with only one ...
11.10.75511.1
I sadly can only get a screenshot for the QA since there is no t...
6.60.746.6
> > I sadly can only get a screenshot for the QA since there is ...
9.40.799.4
I sadly can only get a screenshot for the QA since there is no t...
6.60.746.6
> > I sadly can only get a screenshot for the QA since there is ...
9.40.799.4

[ 19.85 WXDAI ]

@Keyrxng
Contributions Overview
ViewContributionCountReward
IssueComment319.85
Conversation Incentives
CommentFormattingRelevanceReward
I'm pretty sure that #204 resolves this, I'll add specific QA in...
1.70.8851.7
I've linked the because it relates to it but `204` resolves it, ...
2.7
code:
  count: 2
  score: "0.5"
  words: 2
0.6952.7
Before I made `rpc-handler`package, I had implemented a very rud...
15.45
code:
  count: 3
  score: "0.75"
  words: 4
0.8715.45

@Keyrxng
Copy link
Contributor

Keyrxng commented Mar 25, 2024

ty :))

The original blacklist was required because any failed rpc calls was spazzing the UI which I believe you caught @pavlovcik when you redone things, can't see it happening anymore the way it was before

@0x4007
Copy link
Member Author

0x4007 commented Mar 26, 2024

@gentlementlegen just wanted to update and say that this is not reliable. I can't claim from my phone anymore, and when I refresh from desktop it seems to be about 50% chance of working. Can you try manually testing some more?

@0x4007 0x4007 reopened this Mar 26, 2024
@0x4007
Copy link
Member Author

0x4007 commented Mar 26, 2024

image

@gentlementlegen
Copy link
Member

@pavlovcik thanks for the logs. It seems that it keeps retrying with that network that was failing all the time somehow. Maybe a case where this network is always the quickest one and gets put back in the list first always, very annoying use case that I most likely didn't happen. Will fix.

Copy link

ubiquibot bot commented Mar 26, 2024

+ Evaluating results. Please wait...

Copy link

ubiquibot bot commented Mar 26, 2024

[ 102.4 WXDAI ]

@pavlovcik
Contributions Overview
ViewContributionCountReward
IssueSpecification137
IssueComment730
ReviewComment435.4
Conversation Incentives
CommentFormattingRelevanceReward
When starting from Ethereum mainnet, and having to switch, the R...
37
li:
  count: 1
  score: "1"
  words: 21
code:
  count: 1
  score: "1"
  words: 0
137
Update: cleared my RPC cache and its fine. It must have selected...
5.40.815.4
Update again: when starting from Ethereum mainnet, and having to...
3.80.8853.8
We can make an exception but I left a comment in my review expla...
3.20.6153.2
@gentlementlegen do you think you can push a fix for this before...
2.80.692.8
Its with another untested dependency thats not used currently in...
2.40.7252.4
@gentlementlegen just wanted to update and say that this is not ...
8.40.738.4
image> I sadly can only get a screenshot for the QA since there is no...
100.8610
I'm not sure if there are any pitfalls with the built in RPC pro...
9.20.799.2
I think the api is standardized. It's like `window.ethereum.sign...
11.2
code:
  count: 2
  score: "4"
  words: 7
0.78511.2
@gentlementlegen just wanted to confirm that this fix works and ...
50.9155

[ 175.7 WXDAI ]

@gentlementlegen
Contributions Overview
ViewContributionCountReward
IssueTask1125
IssueComment30
IssueComment318.7
ReviewComment216
ReviewComment216
Conversation Incentives
CommentFormattingRelevanceReward
@pavlovcik Can have a look for sure. It was mentioned just above...
-0.72-
@pavlovcik So far what I found it that it happens with only one ...
-0.82-
@pavlovcik thanks for the logs. It seems that it keeps retrying ...
-0.775-
@pavlovcik Can have a look for sure. It was mentioned just above...
2.20.722.2
@pavlovcik So far what I found it that it happens with only one ...
11.10.8211.1
@pavlovcik thanks for the logs. It seems that it keeps retrying ...
5.40.7755.4
I sadly can only get a screenshot for the QA since there is no t...
6.60.756.6
> > I sadly can only get a screenshot for the QA since there is ...
9.40.7559.4
I sadly can only get a screenshot for the QA since there is no t...
6.60.756.6
> > I sadly can only get a screenshot for the QA since there is ...
9.40.7559.4

[ 33.5 WXDAI ]

@Keyrxng
Contributions Overview
ViewContributionCountReward
IssueComment423.45
ReviewComment110.05
Conversation Incentives
CommentFormattingRelevanceReward
I'm pretty sure that #204 resolves this, I'll add specific QA in...
1.70.8351.7
I've linked the because it relates to it but `204` resolves it, ...
2.7
code:
  count: 2
  score: "0.5"
  words: 2
0.712.7
Before I made `rpc-handler`package, I had implemented a very rud...
15.45
code:
  count: 3
  score: "0.75"
  words: 4
0.65515.45
ty :))

The original blacklist was required because any faile...

3.60.6653.6
it's standardized across providers and if multiple are used then...
10.05

code:
  count: 1
  score: "0.25"
  words: 1
0.84510.05

@0x4007
Copy link
Member Author

0x4007 commented Mar 26, 2024

@rndquu the deploys seem to have an issue again https://github.com/ubiquity/pay.ubq.fi/actions/runs/8439604631/job/23114576421#step:2:142

I re-ran it and its okay so this seems to be some intermittent issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment