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

Improve empty wallet filtering to handle malicious RPC providers #423

Open
bdrhn9 opened this issue Jun 13, 2023 · 1 comment
Open

Improve empty wallet filtering to handle malicious RPC providers #423

bdrhn9 opened this issue Jun 13, 2023 · 1 comment

Comments

@bdrhn9
Copy link
Contributor

bdrhn9 commented Jun 13, 2023

Currently, when filtering empty wallets, Airseeker attempts to retrieve balances using all providers simultaneously using Promise.any approach. This means that the response from the first successful RPC call is accepted, and the filtering is performed based on that response. However, in certain situations where there are malicious or out-of-sync RPC providers, they may incorrectly report non-empty wallets as empty. This can cause Airseeker to become blocked.

To address this issue, instead of using Promise.any, the responses from RPC providers can be logically combined using an OR operation. By doing this, Airseeker can avoid the problem of relying on a single potentially unreliable provider. It's important to note that the opposite scenario (reporting empty wallets as non-empty) is also possible, but it will result in behavior similar to Airseeker without the filteringEmptyWallet feature, which is not problematic.

@bbenligiray
Copy link
Member

Note that we don't necessarily need to wait for all promises to resolve to implement this. As soon as a provider reports that the sponsor wallet is funded, we should filter the wallet in and don't wait for the other providers. We filter a sponsor wallet out only if all providers time out or report that the wallet is not funded.

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

2 participants