Closed relyt29 closed 1 week ago
using this you can do cool things like force testing of unstake and cancel operations over everything else:
fuzz_test.go:197: State Transitions Summary: {
createTopic: 2,
fundTopic: 2,
registerWorker: 10,
registerReputer: 8,
unregisterWorker: 2,
unregisterReputer: 1,
stakeAsReputer: 541
delegateStake: 559
unstakeAsReputer: 492
undelegateStake: 523
cancelStakeRemoval: 256
cancelDelegateStakeRemoval: 239
collectDelegatorRewards: 4
doInferenceAndReputation: 2
}
The latest Buf updates on your PR. Results from workflow Buf Linter / buf (pull_request).
Build | Format | Lint | Breaking | Updated (UTC) |
---|---|---|---|---|
✅ passed | ✅ passed | ✅ passed | ⏩ skipped | Oct 31, 2024, 4:47 PM |
Purpose of Changes and their Description
This PR does three things:
transitionWeights
configuration parameter, the fuzzer will now choose state transitions following the percentage likelihood for each transition. E.g. if you set the weight of createTopic to 20%, then the fuzzer will, on every iteration, have a 20% likelihood of picking a createTopic as the next state transition it will attempt. This allows the user to guide fuzzing to an extent to try to probe specific parts of the codebase more thoroughly.Link(s) to Ticket(s) or Issue(s) resolved by this PR
PROTO-2289
Are these changes tested and documented?
These changes have been tested manually by running the fuzzer on my local computer. Updates to the fuzzer documentation have been put in the README.md in the fuzzer folder. The changelog has been updated.