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

V3 Init test improvement #288

Open
johngrantuk opened this issue Mar 15, 2024 · 1 comment
Open

V3 Init test improvement #288

johngrantuk opened this issue Mar 15, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@johngrantuk
Copy link
Member

johngrantuk commented Mar 15, 2024

Sometimes the test is timing out.
Init tests are likely the heaviest ones, they have on-chain calls to:

  • create a pool
  • fetch init pool data from the provider
  • initialize the pool

I’d say it makes sense that they are slow.
It would be nice to evaluate if some sort of multicall could improve the performance.
Specially within the init pool data provider.

@brunoguerios brunoguerios added the bug Something isn't working label Mar 18, 2024
@brunoguerios
Copy link
Member

I spent a few hours on this and found out that the issue is actually within createPool transaction.
It takes ~1min to complete locally on a cold start (i.e. running from a blockNumber that was not used by other tests before) and I was able to replicate the same issue within both init and create pool integration tests.
Since the issue relies on a single transaction (instead of being caused by aggregating multiple ones) it feels like we would be able to improve this only by some viem/anvil configuration.
As it impacts only dev experience while running tests and our tests are quite quick at the moment, I'd say it's not worth to spend more time improving this.
In other words, I'd leave this issue opened with low priority and get back to it only if it ever becomes a real issue.
Hopefully it will already be fixed on future dependency versions.
For now, I bumped the timeout to 2min so tests have enough time to complete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants