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

07-tendermint: safety fixes in Tendermint light client API usage #7913

Closed
cwgoes opened this issue Nov 12, 2020 · 0 comments · Fixed by #7936
Closed

07-tendermint: safety fixes in Tendermint light client API usage #7913

cwgoes opened this issue Nov 12, 2020 · 0 comments · Fixed by #7936
Assignees

Comments

@cwgoes
Copy link
Contributor

cwgoes commented Nov 12, 2020

  1. func parseFraction(fraction string) (types.Fraction, error) {
    there's tmfraction.ParseFraction
  2. voteSet := tmtypes.CommitToVoteSet(chainID, tmCommit, tmValset)
    it might be a better idea to use VerifyCommit or VerifyCommitLight (depending on whenever you need to verify all the signatures or not). CommitToVoteSet panics if it encounters any errors (as stated in the func docs). For example, I don't see where you check that the number of signatures in the commit matches the number of validators. If it's possible to pass such a commit & vals, CommitToVoteSet will panic NOTE: haven't verified it

(thanks to @melekes)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants