-
Notifications
You must be signed in to change notification settings - Fork 6
fix debug tab cache #1727
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: 2025-04-07-deployment-debug-tab
Are you sure you want to change the base?
fix debug tab cache #1727
Conversation
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
- added `FuzzRunnerContext`
Motivation
Fixes the cache issue mentioned in #1599
There were several bugs and issues with the logic/implementation of the debug tab to correctly use and hit foundry cache, this PR fixes that.
Solution
FuzzRunner
instances, and sinceFuzzRunner
has a fresh instance ofForker
, we never actually reused any forks as a result never using any cache, it now keeps a singleFuzzRunner
instance which is alive during program.make_debug_data()
method ofFuzzRunner
, the forker property was getting cloned for each debug loop iteration, and those forker instances that cache the calls all go out of scope once the method execution ends, We needed to operate on&mut self
so only oneForker
instance is used and caches everything for all the networks and block numbers and never goes out of scope during the program since on tauri it is kept underArc<Mutex>
shared state.Forker
that manages all the forks, and we wanna keep the cache during the program execution, we can't do parallel execution becauseForker
only works on one active fork at a time. (make_chart_data()
method still operates in parallel because it doesn't need the cache and clones the forker instance for each fuzz run)FuzzRunner
abstraction, which are removing the dotrain, settings and seed from its properties and moving them on to a new struct calledFuzzRunnerContext
with anew()
method andFuzzRunnerContext
is now a context argument for all the methods ofFuzzRunner
, this way a singleFuzzRunner
instance is able to operate on manyFuzzRunnerContext
instances (i.e. many detrains, settings and seeds).GUI Test
debug-test.mov
Checks
By submitting this for review, I'm confirming I've done the following:
unit-tested any new functionality