-
Notifications
You must be signed in to change notification settings - Fork 16
proptest_state_machine
over PeerMessage
#512
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: master
Are you sure you want to change the base?
Conversation
I wonder if the state machine can be factored out such that:
If that's where this is headed, please point me to the location in the code where I can read it.
I don't know off the top of my head what the right weights are. Consider writing a patch for |
The state machine you're talking about should then be an implementation under testing, not the reference one. I'd be happy to convert something to this approach, but Current implementation indeed heading the way you described. It process the What do you think about not creating neptune-core/src/tests/shared.rs Line 365 in 73ec193
proptest! ? That feels more elegant since state machine brings benefits when there are actual state changes and we're checking it can't find itself in a wrong one. And as with PeerMessage it's by design looping in the single state that makes inevitable proptest-state-machine managing code just a boilerplate. =(
I don't see the point repeating the real freqs in |
This reverts commit f5f4b66.
Co-authored-by: aszepieniec <[email protected]>
fmt clean and order the strategy clean and order the strategy
fa768a9
to
0f2e21f
Compare
It's rough yet, and I'd appreciate review of the main approaches in it while I'm dealing with TODO and groom the whole contribution.
I understood @aszepieniec that the interactions are subject to change, so currently it's only outlined how an interaction outcome actually asserted (messages the peer-loop sends to the main, and checking
standing
). I can only repeat current behavior there, and if there's ideas to tune/amend that I guess it would be right place and time for that.Another decision pending is weighting
PeerMessage
variants. I guess it's important to add random "bad" once a while, but uniform distribution washes away valid interactions to the margin. I can only roughly guess the distribution you might see fit, so it's the other open question.