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

Non-whitelisted methods: Treat them as unsupported. #4796

Open
andrewpeters9 opened this issue Aug 1, 2024 · 2 comments
Open

Non-whitelisted methods: Treat them as unsupported. #4796

andrewpeters9 opened this issue Aug 1, 2024 · 2 comments
Assignees
Labels
enhancement New feature or improvement. next-patch Issues scheduled for the next arch release. on-deck This Enhancement or Bug is currently being worked on. v6 Issues regarding v6

Comments

@andrewpeters9
Copy link

andrewpeters9 commented Aug 1, 2024

Ethers Version

6.13.1

Describe the Problem

  • Some networks do not support eth_newFilter, this issue was addressed here:
  • However, some networks support the method, but an individual RPC (particularly public) can choose to not whitelist it
  • When sending eth_newFilter to some public Abitrum RPCs, such as https://sepolia.optimism.io/ instead of returning:
    • the {{method}} method does not exist
    • they instead return rpc method is not whitelisted

The quick fix for this would be allowing this line to also match for rpc method is not whitelisted

1dc8986#diff-864f267214cf0d0dd7bdcf86d9da9cb2fd4f4df51f75d17351f26594adc7d6b0R964

Errors

could not coalesce error (error={ "code": -32001, "message": "rpc method is not whitelisted" }, payload={ "id": 5, "jsonrpc": "2.0", "method": "eth_newFilter", "params": [ { "address": [ "{{OMMITTED}}" ], "topics": [ "{{OMMITTED}}", null, "{{OMMITTED}}" ] } ] }, code=UNKNOWN_ERROR, version=6.13.2)

Environment

node.js (v12 or newer)

Environment (Other)

No response

@andrewpeters9 andrewpeters9 added investigate Under investigation and may be a bug. v6 Issues regarding v6 labels Aug 1, 2024
@andrewpeters9
Copy link
Author

@ricmoo let me know if you'd like an MR

@ricmoo
Copy link
Member

ricmoo commented Aug 31, 2024

Yes, this makes sense. A lot of error handling has to be string-matching based, since there isn't a cohesive error standard all nodes follow.

I can certainly add the additional string to match.

@ricmoo ricmoo added enhancement New feature or improvement. on-deck This Enhancement or Bug is currently being worked on. next-patch Issues scheduled for the next arch release. and removed investigate Under investigation and may be a bug. labels Aug 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improvement. next-patch Issues scheduled for the next arch release. on-deck This Enhancement or Bug is currently being worked on. v6 Issues regarding v6
Projects
None yet
Development

No branches or pull requests

2 participants