-
Notifications
You must be signed in to change notification settings - Fork 0
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
ci: route mollusk fixtures into fd conformance #29
Conversation
925ae01
to
32feda1
Compare
@lorisleiva @joncinque this is ready for review, just waiting on firedancer-io/solfuzz-agave#169 |
The change looks good to me, but I'm not sure I understand the motivation. What are the benefits to using multiple harnesses? And how are they different? |
Each harness handles configuration of the environment differently, albeit slightly. For example, Mollusk and SolFuzz-Agave populate sysvars differently, especially based on sysvar accounts provided in fixtures. Additionally, SolFuzz-Agave uses a different concept of a "result". It tracks "CUs remaining" instead of "CUs used" (not a huge deal), and also tracks only modified accounts versus just a list of all of the provided accounts including any changes. Particularly, the conformance tool - when run using |
Gotcha, thanks for the info. It sounds like there's a lot of duplication between the two tools, so it seems redundant to run them both, but we can do it for now, or until we feel confident enough that one of them is complete / easy to run / whatever else we care about. |
Would you rather I feed them into the earlier steps and run them against both programs? That way we are still testing conformance, just with more fixtures, rather than only invoking the BPF one. |
Like this ^ |
Sorry, I totally misunderstood what this is meant to do 😓 let me know if I have this right:
By running mollusk's fixtures through the fuzzer, what are we testing exactly? This is a legit question, not rhetorical. If I understand correctly, that can allow the fuzzer to eventually mutate those fixtures and test more cases, which would give more coverage. This new step also checks to make sure that mollusk is outputting correct fixtures. Do we assume that the existing test vectors don't contain these cases already? Originally, this PR was only going to test these fixtures against the BPF version of the program, and with the most recent commit, will instead run them through both BPF and native. Does that mean we get slightly more coverage through the most recent commit? If that's the case, I would just opt for that, but I might be missing something. |
Yeah, originally it was maybe a bit redundant because it can be considered akin to running the unit tests again with a different harness.
With the latest commit, we basically add our unit tests to the conformance vectors to ensure they do the exact same thing on both programs. The key here is, if we change any unit tests, we get new fixtures, and we can plug those in through CI. Firedancer may have our unit tests covered from the builtin suite, but if we change them, they wouldn't have those new tests. Furthermore, if we changed any tests porting the program over they wouldn't have those changes either.
Yes, we would get more fixture coverage in fuzzing as well as conformance, if we wanted to hook up solfuzz as well. Right now, it's just about my previous paragraph (builtin vs BPF on a fixed set of vectors). Also, you have the steps right except for this point of clarification:
We're not differential fuzzing with Without solfuzz, there is no mutation going on here at the moment. This would be a future step. |
Ok gotcha, thanks for the explanation! Either way, this looks good to me whenever you want to land it |
This change adds an additional step to the
fd-conformance.mjs
script (and CI job), which takes the Mollusk-generated Firedancer fuzzing fixtures and plugs them into the conformance harness.Interestingly, this tests all of the program's unit tests against both the Mollusk and SolFuzz-Agave entrypoints. Although similar, they are two separate harnesses on the program-runtime, which gives us a bit more diversity in testing.