-
Notifications
You must be signed in to change notification settings - Fork 683
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
Fuzzing the entire runtime #4374
Comments
Closed
Regarding fuzz testing function calls, I think we should focus on the following:
|
Merged
posvyatokum
added a commit
that referenced
this issue
Nov 8, 2021
change epoch_length and gas_limit #4374
pmnoxx
pushed a commit
that referenced
this issue
Nov 20, 2021
change epoch_length and gas_limit #4374
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
[OKR 2021Q4] At a high level, our runtime is a pure function which takes some state, a bunch of actions, interprets those actions and returns a new state. We also care a lot about runtime being correct even in the phase of adversary inputs. So it behooves us to implement fuzzing of the runtime. This article (and it's bibliography) give a good overview of state of the art fuzzing in Rust: https://fitzgeraldnick.com/2020/08/24/writing-a-test-case-generator.html.
The TL;DR is that the best approach is structured, coverage guided fuzzing. We use something like
libfuzzer
to generate random inputs&[u8]
, then we use this input as a seed to generate a random sequence of valid actions, then we feed this input into the runtime. The fuzzer then observes code coverage as the runtime executes the input, and uses that info to generate better seeds to cover more of the branches, and to minimize failures for free.Practically, that means that we should:
wasm-smith
forDeployContract
action.cargo-fuzz
The text was updated successfully, but these errors were encountered: