Open Xenomega opened 1 year ago
Will try to pick this up starting tomorrow.
Looks like this is already being worked on
Ensure the corpus.UpdateCorpusAndCoverageMaps method checks if the last call was to a view method. If it was, do not record the call sequence in the corpus at that step, as it's not a coverage-increasing sequence we'd be interested in recording, as it was not state changing.
need clarification on this but https://github.com/crytic/medusa/pull/363 addresses the other points
I think view functions should be part of the coverage, in particular if they have or can contain assertions.
We'll want to periodically call view methods to increase coverage. Additionally, assertion testing supports config-driven options to enable assert testing of view methods, but the
FuzzerWorker
only producesCallSequence
s with calls targeting state changing methods right now, so it's never hit.Requirements:
stateChangingMethods
(see theupdateStateChangingMethods
method)stateChangingMethods
) at the top of thegenerateFuzzedCall
method.corpus.UpdateCorpusAndCoverageMaps
method checks if the last call was to a view method. If it was, do not record the call sequence in the corpus at that step, as it's not a coverage-increasing sequence we'd be interested in recording, as it was not state changing.