-
Notifications
You must be signed in to change notification settings - Fork 228
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
Enable MBT on master #686
Enable MBT on master #686
Conversation
Codecov Report
@@ Coverage Diff @@
## master #686 +/- ##
========================================
+ Coverage 39.2% 42.1% +2.8%
========================================
Files 190 191 +1
Lines 12552 12600 +48
Branches 3237 3232 -5
========================================
+ Hits 4927 5305 +378
+ Misses 7381 6949 -432
- Partials 244 346 +102
Continue to review full report at Codecov.
|
@@ -446,18 +447,33 @@ fn single_step_test( | |||
let trusting_period: Duration = tc.initial.trusting_period.into(); | |||
for (i, input) in tc.input.iter().enumerate() { | |||
output_env.logln(&format!(" > step {}, expecting {:?}", i, input.verdict)); | |||
|
|||
// -------------------> | |||
// Below is a temporary work around to get rid of bug-gy validator sorting |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there an issue for this sorting bug? Could you point us to any specific line where the bug occurs or you don't know?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, but yes there should be one. I think the problem is somewhere with ser/de, it somehow changes the sequence of validators in the set which then produces a wrong valset hash. I'm not sure how this is happening. But I'm sure this is not coming from Testgen at least. Currently, these tests were disabled on master because of this and re-sorting seemed to be a quick solution. I need to dig further to know where this problem is coming from.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue for this: #687
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I think I know what is happening here. When we transform tests from Apalache counterexamples, the validators are in no particular order. At the same time new deserialization requires them to be sorted according to the power, and then lexicographically. Therefore the validation fails. One more point for implementing #665.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Thanks for reviewing @melekes :) I'll wait for one more approval from @romac or @andrey-kuprianov before merging! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! Thanks, @Shivani912 for fixing the tests!
We need to rethink the model-based testing for Tendermint-rs in general, besides fixing the current issues, and automate it further, to reduce such manual work as much as possible. Let's address this in the near future.
Awesome, that's exactly where my thoughts were going! |
This PR enables model based testing on master. Some tests had to be disabled as they fail to parse because of more restrictive data structure construction and this will be addressed in a follow up PR. All of the other tests were fixed simply by adding the new
total_voting_power
field to validator set in testing :)And with this, I think we're in good shape to close issue #567
(closes #567 )