-
Notifications
You must be signed in to change notification settings - Fork 408
Replace e2e fork node with anvil #3781
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
base: main
Are you sure you want to change the base?
Conversation
Removes dependency on env vars and adds a script shortcut to run fork tests
This will come useful when we need a deterministic name for test assertions.
Previous approach would have missed updates if a price fetch was requested after detecting a new token balance. This also increases the frequency of price updates.
Since local nodes require higher gas to fulfill read only calls these would sometimes fail silently when done through multicall.
This updates fork tests to run on anvil instead of hardhat. The change significantly improves test speed and prevents hangups. Even for simple cases anvil performs better without a cache.
1c43fb9 to
089cc93
Compare
These should be consistent between local/ci
By sending sigint to the process this script will stall until anvil polled requests finish so it can flush the cache to disk before the job completes
These are meant to help identify price loading has completed for a given asset
Normalizes balances to ensure tests work when the CI account differs from the one used locallly
896beee to
402a6d9
Compare
|
You interested in help getting this over the line ser? Seems worthwhile |
Yes I agree, I was planning on bringing this back to life after the other PR since I have to spend some time syncing the CI cache... though perhaps I can find a way to do this faster now 😄 |
Helps reducing call i/o size, reducing the chance an rpc shrugs the final request due to payload limits
This fixes the problem with some tokens where calling BigInt directly over the response data resulted in an infinite balance being returned and displayed to the user.
This assertion changed with da31038, which fixed invalid balances being shown.
776fdba to
407632c
Compare
407632c to
a4acb02
Compare
Some minor changes were made to the format and url. One of the breaking changes includes solana token addresses in the list that now have to be filtered before validating the list.
This makes more sense for activity loading as balances and assets are loaded within the first 30 seconds of adding an account through alchemy and multicall.
Introduced explicit refresh intervals for token lists, active-account balances, and all-account balances. Added dedicated timers and a scheduling pattern.
These were buggy due to the duplicate transition elements in the popup. Additionally assertions for snackbars that don't appear immediately resolve as passed. Another issue is that even though it's technically not visible, elements with 0 opacity are still considered visible by playwright. This adds a testid to a span wrapper inside the snackbar, so the `toBeVisible` matcher works.
This appears to be running before the page has rendered
These broke with the playwright update, also removes a couple of timeouts
At most basic tests take as much as one minute each. For longer, bigger tests, an override can be set per test via `test.setTimeout`
These are enabled by default
Sets dump state interval to every 10s and a request retry backoff of .1s
If tracked assets change, queue price discovery for the new assets
Lookups for multiple assets were failing silently, specially on a forked node, with multicall succeeding at most with 2 queries.
a4acb02 to
2322167
Compare
This prevents custom assets discovered through alchemy from not being displayed until after the next balance refresh cycle.
|
I think this is good for a review. I'd prefer to pull a couple of changes into different PRs (e.g. #3826) so it gets lighter though. As it turns out a big part of the bottleneck on the e2e tests came from very generous timeout settings.. In any case, let me know if we should review this as a single piece or split it. (Tagging @mhluongo and @Shadowfiend for visibility). |
This updates fork tests to run on anvil instead of hardhat. The change significantly improves test speed and prevents hangups. Even for simple cases anvil performs better without a cache.
Latest build: extension-builds-3781 (as of Mon, 08 Dec 2025 04:45:46 GMT).