Skip to content
This repository was archived by the owner on Jul 9, 2024. It is now read-only.

Check sponsor wallet balances initially and omit the ones that are not funded #309

Closed
bbenligiray opened this issue Nov 10, 2022 · 0 comments · Fixed by #400
Closed

Check sponsor wallet balances initially and omit the ones that are not funded #309

bbenligiray opened this issue Nov 10, 2022 · 0 comments · Fixed by #400
Assignees

Comments

@bbenligiray
Copy link
Member

In the case that a sponsor wallet is not funded, Airseeker still goes through the entire flow until it attempts to make a transaction, which will fail. This is very wasteful for a bring-your-own-gas kind of scenario, where most sponsor wallets will be unfunded and you don't want to make unnecessary API calls for them. The suggested solution:

Keep a isFunded flag for each sponsor wallet. When Airseeker encounters a "trigger" for a sponsor wallet, it first checks if it has already checked if it is funded. If it has and it was funded, continue. If it has and it wasn't funded, skip. If it hasn't, check if the sponsor wallet is funded, set the flag and proceed accordingly.

@bdrhn9 has implemented a solution that checks all sponsor wallets at the start. However, the suggested solution would also work well with staggering.

Note that this feature can/should be adapted to RRP in the single-Lambda Airnode.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants