-
Notifications
You must be signed in to change notification settings - Fork 5
Refactor to allow for single sponsorWallet updates #296
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
Conversation
5411f65
to
6cf0255
Compare
…ying airseeker-v2 as fallback
6cf0255
to
6c7985d
Compare
Looks like you mean I dislike "
I thought we decided not to touch this on a recent call. Doesn't self-funded scheme update the same data feed (with ID) using multiple sponsor wallets belonging to different update parameters? |
Good catch. Updated comment
👍🏻
That is correct but Emanuel made a good suggestion where by doing this change, retries get mostly fixed for single wallet
🤔 that is a good question and it seems we could be scaling the gas price for wallets that might not need it when self-funded is set. @Siegrift any thoughts on this? Maybe we can use both as keys 🤔
|
…-configuration initialize-chain.ts
…ransactionsInfo object
Implemented that here I'll wait for comments 🙏🏻 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't self-funded scheme update the same data feed (with ID) using multiple sponsor wallets belonging to different update parameters?
🤔 that is a good question and it seems we could be scaling the gas price for wallets that might not need it when self-funded is set. @Siegrift any thoughts on this? Maybe we can use both as keys 🤔
Currently, Airseeker can update the same data feed using different wallets for self-funded (as @bbenligiray suggests in the question), but it can also happen when there are 2 active data feed using the same data feed ID (e.g. one identified by ID, one by dapiName). Airseeker now treats these separate and scales them independently. There is no case, where a single wallet updates multiple data feeds, so key-ing by both data feed ID and sponsor address solves the problem for "fixed" wallet derivation.
Another question is whether it doesn't make sense for this to only key this by data feed ID. In both managed/self-funded there we will be scaling unnecessarily (in the self-funded it depends on how often the deviation is triggered for multiple deviating feeds - but that seems probably enough). So I think it doesn't and we should do what you suggest.
I dislike "fallback", something like "fixed" would be semantically less restrictive
fwiw: I don't have a strong opinion about this.
…efore selecting the oldest one by firstUpdatableTimestamp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like this module copy-pastes a lot of existing functionality. Also, some changes are unnecessary and can be reverted.
…ing the async getPromise() method from Addresseable interface
…actionInfo from state
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI: I've edited the spec about the wallet derivation types here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you rebase please? I'll review then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Implementation looks good to me, but wait for @bdrhn9 's approve as well as this is a quite a significant change.
I think we already talked about this internally, but this should be tested on testnets before we attempt to roll it out for mainnets.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes looks clean and good to me 💪🏼
Co-authored-by: Bedirhan <[email protected]>
Thank you both for all the feedback! 🚀 |
Thank you both for all the feedback! 🚀 Should I just merge now? How should we test these changes? Do you guys deploy to a testnet to verify everything is still working as expected? |
I think changes looks good and mergeable. I will test these changes by deploying on one testnet. Maybe I'll remove actual deployment on that specific testnet to see whether our fallback airseeker gain control over. |
What does this change?
It basically applies suggestion made here to allow sending txs using a single sponsor wallet. This is meant to be used by a deployment used a fallback that should send txs whenever main airseeker deployments are down their sponsorWallets have run out of funds for some reason. This fallback deployment also makes our lives easier by not having to top-up the sponsorWallet of each dAPI.
fallback
walletDerivationScheme
config object calledsponsorAddress
. This property must be set to a valid address whenwalletDerivationScheme.type
isfallback
pendingTransactionsInfo
objects are now keyed bydataFeedId
instead ofsponsorWalletAddress
getRecommendedGasPrice()
nows receives an array ofdataFeedIds
instead of a singlesponsorWalletAddress
as argument and it only uses the oldestpendingTransactionsInfo
(when more than 1dataFeedId
is passed)submitBatchTransaction()
function that bundles all the calldatas required to update all data feeds in the batch and sends a singletryMulticall()
tx.