Skip to content
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

Valid TrustThresholdFraction and further simplify tests code #142

Merged
merged 15 commits into from
Feb 19, 2020

Conversation

liamsi
Copy link
Member

@liamsi liamsi commented Feb 3, 2020

ref: #141 (comment) and #132 (comment)
Also added check for increasing time and a few more tests.

  • Referenced an issue explaining the need for the change
  • Updated all relevant documentation in docs
  • Updated all code comments where relevant
  • Wrote tests
  • Updated CHANGES.md

@codecov-io
Copy link

codecov-io commented Feb 3, 2020

Codecov Report

Merging #142 into master will increase coverage by 0.06%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #142      +/-   ##
==========================================
+ Coverage   36.95%   37.01%   +0.06%     
==========================================
  Files          91       91              
  Lines        3277     3277              
  Branches      510      510              
==========================================
+ Hits         1211     1213       +2     
+ Misses       1777     1775       -2     
  Partials      289      289
Impacted Files Coverage Δ
tendermint/src/lite/types.rs 48.08% <100%> (ø) ⬆️
tendermint/src/block/height.rs 26.19% <0%> (+4.76%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0cdc1d5...0b75eee. Read the comment docs.

@liamsi liamsi marked this pull request as ready for review February 3, 2020 17:57
@liamsi liamsi requested review from ebuchman and xla February 3, 2020 17:58
@liamsi
Copy link
Member Author

liamsi commented Feb 3, 2020

@ebuchman when can I start adding @Shivani912 as a reviewer? :-)

tendermint/src/lite/types.rs Outdated Show resolved Hide resolved
// these are (signed) headers and validators will be returned by the Requester.
fn init_requester(vals_for_height: Vec<Vec<usize>>) -> MockRequester {
fn init_requester(vals_for_height: Vec<Vec<usize>>, final_state: &MockState) -> MockRequester {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I meant make vals_for_height one height longer here, which would make this fn simpler, and would also decouple the expected final_state from the last thing the requester reports, since they can be different if the requester is faulty.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The way we currently init the requester would mean, the vector vals_for_height needs to be 2 heights longer (e.g. if we want to bisect to height 5, we need vals up-to 6, and to write those into the requester, we need the next_vals for them, i.e. 7 here). Does that make sense?

@ebuchman ebuchman mentioned this pull request Feb 10, 2020
2 tasks
* added bisection test for insufficient commits

* refactored init_requester, TODO: update tests

* fixed tests

* Added bisection test for insufficient commits

* fixed failures

* cargo fmt

* Changed tests to use ValsAndCommit struct

* satisfy clippy
@liamsi
Copy link
Member Author

liamsi commented Feb 11, 2020

I'll merge in master shortly to resolve merge conflicts. @Shivani912 do you feel comfortable to take over the remaining test related issues?

…141_followup

# Conflicts:
#	tendermint/src/lite/types.rs
#	tendermint/src/lite/verifier.rs
@liamsi
Copy link
Member Author

liamsi commented Feb 11, 2020

Actually, I think we should merge #151 first, as it touches upon error handling and then resolve merge conflicts.

@Shivani912 Shivani912 closed this Feb 11, 2020
@Shivani912 Shivani912 reopened this Feb 11, 2020
@liamsi liamsi mentioned this pull request Feb 12, 2020
5 tasks
@liamsi liamsi requested a review from ebuchman February 12, 2020 16:58
@liamsi
Copy link
Member Author

liamsi commented Feb 12, 2020

resolved all merge conflicts

@liamsi liamsi mentioned this pull request Feb 12, 2020
5 tasks
Copy link
Contributor

@Shivani912 Shivani912 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After talking with @liamsi, let's merge this PR as is and other test related issues/code can come up as separate PRs.

@Shivani912 Shivani912 merged commit afcf99a into master Feb 19, 2020
@Shivani912 Shivani912 deleted the ismail/132_141_followup branch February 19, 2020 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants