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

Replace Multicall with Balancer pool data queries #476

Merged
merged 12 commits into from
Jul 7, 2023

Conversation

johngrantuk
Copy link
Member

In support issue here, Luiz discovered that Alchemy/Infura sometimes timeout when doing multicall because there is so much data being fetched. We should be able to solve this by using the recently deployed more efficient custom query method.

See Contract here and deployments here

  • Remove old multicall method in favour of helper
  • Added new balancer pool data queries to config and typechain
  • GyroE V2 still needs multicall for tokenRates as not currently supported in helper
  • Tests needed more recent block number to match after deployment.
    • Added global block numbers for testing
    • Helper not deployed on Goerli so skipping those tests
    • Some tests were broken due to more recent pool info so fixed
    • One test was still using Vault method, so changed to Static

Copy link
Member

@brunoguerios brunoguerios left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added just some small comments, but overall the PR looks pretty good!! 👏
Just out of curiosity, do we have a an idea on how much more efficient this solution is compared to the previous multicall solution?

@johngrantuk
Copy link
Member Author

I added just some small comments, but overall the PR looks pretty good!! 👏 Just out of curiosity, do we have a an idea on how much more efficient this solution is compared to the previous multicall solution?

I'm not actually sure how to test the efficiency as it seems to depend on internet connection and RPC provider. I was thinking the best test would be to get @lgahdl to run locally at his end and see if he still sees the RPC failures he was seeing previously (doesn't really seem an issue for me).

@lgahdl
Copy link
Contributor

lgahdl commented Jun 23, 2023

I added just some small comments, but overall the PR looks pretty good!! clap Just out of curiosity, do we have a an idea on how much more efficient this solution is compared to the previous multicall solution?

I'm not actually sure how to test the efficiency as it seems to depend on internet connection and RPC provider. I was thinking the best test would be to get @lgahdl to run locally at his end and see if he still sees the RPC failures he was seeing previously (doesn't really seem an issue for me).

I was using VM inside Windows before, but now I formatted my PC and I'm using Ubuntu directly, I'm not sure if the RPC will still fail, but I can test it

@brunoguerios brunoguerios merged commit 414cdba into develop Jul 7, 2023
3 checks passed
@brunoguerios brunoguerios deleted the balancer-pool-data-queries branch July 7, 2023 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants