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

types: simplify VerifyCommitTrusting #4798

Merged
merged 4 commits into from May 7, 2020

Conversation

melekes
Copy link
Contributor

@melekes melekes commented May 6, 2020

Closes #4783

It looks like we're validating Commit twice. Also, height and blockID params were coming from the commit, so no need to pass them separately.

@melekes melekes requested a review from tessr as a code owner May 6, 2020 08:36
@auto-comment
Copy link

auto-comment bot commented May 6, 2020

👋 Thanks for creating a PR!

Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Wrote tests
  • Updated CHANGELOG_PENDING.md
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Updated relevant documentation (docs/) and code comments
  • Re-reviewed Files changed in the Github PR explorer
  • Applied Appropriate Labels

Thank you for your contribution to Tendermint! 🚀

@melekes melekes self-assigned this May 6, 2020
@melekes melekes added the R:minor Release: Minor label May 6, 2020
@@ -632,9 +632,17 @@ func (vals *ValidatorSet) VerifyCommit(chainID string, blockID BlockID,
if vals.Size() != len(commit.Signatures) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

VerifyCommit should probably be renamed to ValidateAndVerifyCommit

@codecov-io
Copy link

Codecov Report

Merging #4798 into master will decrease coverage by 0.04%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #4798      +/-   ##
==========================================
- Coverage   64.24%   64.19%   -0.05%     
==========================================
  Files         220      220              
  Lines       20344    20342       -2     
==========================================
- Hits        13069    13059      -10     
- Misses       6236     6241       +5     
- Partials     1039     1042       +3     
Impacted Files Coverage Δ
lite2/client.go 72.62% <100.00%> (-0.06%) ⬇️
lite2/verifier.go 81.91% <100.00%> (-0.20%) ⬇️
privval/signer_endpoint.go 75.67% <0.00%> (-8.11%) ⬇️
privval/signer_server.go 95.65% <0.00%> (-4.35%) ⬇️
privval/signer_listener_endpoint.go 86.95% <0.00%> (-2.18%) ⬇️
p2p/pex/pex_reactor.go 81.56% <0.00%> (-1.68%) ⬇️
consensus/replay.go 71.72% <0.00%> (-0.85%) ⬇️
p2p/pex/addrbook.go 70.16% <0.00%> (-0.47%) ⬇️
consensus/reactor.go 72.52% <0.00%> (+0.34%) ⬆️
consensus/state.go 74.26% <0.00%> (+0.39%) ⬆️
... and 1 more

@melekes melekes added the S:automerge Automatically merge PR when requirements pass label May 6, 2020
@mergify mergify bot merged commit d202fab into master May 7, 2020
@mergify mergify bot deleted the anton/4783-trust-level-validation branch May 7, 2020 09:24
@tessr tessr removed the R:minor Release: Minor label May 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S:automerge Automatically merge PR when requirements pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Limited and Potentially Repeated TrustLevel Validation
5 participants