-
Notifications
You must be signed in to change notification settings - Fork 565
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
crypto/merkle: Add error handling #558
Conversation
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.
I think the "problematic" method ComputeRootHash
should be made private.
It seems we have to backport all the way back to v0.34, right? |
Co-authored-by: Thane Thomson <[email protected]>
Since this involves a Go API change, can it be safely backported without potentially breaking something in the code of users? |
We can leave the renaming of the function to avoid the breaking on back ports. |
@adizere I've wrapped the private function into a public one, that panics in the case of error. So there is a change of behavior, but not of interface. In a future PR I will remove the public one. |
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.
Excellent, thanks @lasarojc!
Co-authored-by: Thane Thomson <[email protected]>
* porting pr * Disallow nil root hashes * linting * making computeRootHash private * Update release notes. * Update .changelog/unreleased/breaking-changes/558-tm10011.md Co-authored-by: Thane Thomson <[email protected]> * Wrapping the private function into a public one with the old signature. * update comment * remove dependency on amino * Update .changelog/unreleased/breaking-changes/558-tm10011.md Co-authored-by: Thane Thomson <[email protected]> --------- Co-authored-by: Thane Thomson <[email protected]> (cherry picked from commit d067b74)
* porting pr * Disallow nil root hashes * linting * making computeRootHash private * Update release notes. * Update .changelog/unreleased/breaking-changes/558-tm10011.md Co-authored-by: Thane Thomson <[email protected]> * Wrapping the private function into a public one with the old signature. * update comment * remove dependency on amino * Update .changelog/unreleased/breaking-changes/558-tm10011.md Co-authored-by: Thane Thomson <[email protected]> --------- Co-authored-by: Thane Thomson <[email protected]> (cherry picked from commit d067b74) # Conflicts: # crypto/merkle/proof.go
* porting pr * Disallow nil root hashes * linting * making computeRootHash private * Update release notes. * Update .changelog/unreleased/breaking-changes/558-tm10011.md Co-authored-by: Thane Thomson <[email protected]> * Wrapping the private function into a public one with the old signature. * update comment * remove dependency on amino * Update .changelog/unreleased/breaking-changes/558-tm10011.md Co-authored-by: Thane Thomson <[email protected]> --------- Co-authored-by: Thane Thomson <[email protected]> (cherry picked from commit d067b74) # Conflicts: # crypto/merkle/proof.go # crypto/merkle/proof_test.go
* porting pr * Disallow nil root hashes * linting * making computeRootHash private * Update release notes. * Update .changelog/unreleased/breaking-changes/558-tm10011.md Co-authored-by: Thane Thomson <[email protected]> * Wrapping the private function into a public one with the old signature. * update comment * remove dependency on amino * Update .changelog/unreleased/breaking-changes/558-tm10011.md Co-authored-by: Thane Thomson <[email protected]> --------- Co-authored-by: Thane Thomson <[email protected]> (cherry picked from commit d067b74) Co-authored-by: Lasaro <[email protected]>
* crypto/merkle: Add error handling (#558) * porting pr * Disallow nil root hashes * linting * making computeRootHash private * Update release notes. * Update .changelog/unreleased/breaking-changes/558-tm10011.md Co-authored-by: Thane Thomson <[email protected]> * Wrapping the private function into a public one with the old signature. * update comment * remove dependency on amino * Update .changelog/unreleased/breaking-changes/558-tm10011.md Co-authored-by: Thane Thomson <[email protected]> --------- Co-authored-by: Thane Thomson <[email protected]> (cherry picked from commit d067b74) # Conflicts: # crypto/merkle/proof.go # crypto/merkle/proof_test.go * fix conflicts --------- Co-authored-by: Lasaro <[email protected]>
* crypto/merkle: Add error handling (#558) * porting pr * Disallow nil root hashes * linting * making computeRootHash private * Update release notes. * Update .changelog/unreleased/breaking-changes/558-tm10011.md Co-authored-by: Thane Thomson <[email protected]> * Wrapping the private function into a public one with the old signature. * update comment * remove dependency on amino * Update .changelog/unreleased/breaking-changes/558-tm10011.md Co-authored-by: Thane Thomson <[email protected]> --------- Co-authored-by: Thane Thomson <[email protected]> (cherry picked from commit d067b74) # Conflicts: # crypto/merkle/proof.go * fix conflict --------- Co-authored-by: Lasaro <[email protected]>
* porting pr * Disallow nil root hashes * linting * making computeRootHash private * Update release notes. * Update .changelog/unreleased/breaking-changes/558-tm10011.md Co-authored-by: Thane Thomson <[email protected]> * Wrapping the private function into a public one with the old signature. * update comment * remove dependency on amino * Update .changelog/unreleased/breaking-changes/558-tm10011.md Co-authored-by: Thane Thomson <[email protected]> --------- Co-authored-by: Thane Thomson <[email protected]>
* crypto/merkle: Add error handling (cometbft#558) * porting pr * Disallow nil root hashes * linting * making computeRootHash private * Update release notes. * Update .changelog/unreleased/breaking-changes/558-tm10011.md Co-authored-by: Thane Thomson <[email protected]> * Wrapping the private function into a public one with the old signature. * update comment * remove dependency on amino * Update .changelog/unreleased/breaking-changes/558-tm10011.md Co-authored-by: Thane Thomson <[email protected]> --------- Co-authored-by: Thane Thomson <[email protected]> (cherry picked from commit d067b74) # Conflicts: # crypto/merkle/proof.go * fix conflict --------- Co-authored-by: Lasaro <[email protected]>
Contributes to #557
PR checklist
.changelog
(we use unclog to manage our changelog)docs/
orspec/
) and code comments