light-client-verifier: 🌱 restore verify_commit() interface#1423
Merged
romac merged 3 commits intocometbft:mainfrom May 22, 2024
Merged
light-client-verifier: 🌱 restore verify_commit() interface#1423romac merged 3 commits intocometbft:mainfrom
verify_commit() interface#1423romac merged 3 commits intocometbft:mainfrom
Conversation
73480a1 to
79ae26f
Compare
This was referenced May 21, 2024
This comment was marked as resolved.
This comment was marked as resolved.
in cometbft#1410, alterations were made to the `PredicateVerifier<P, C, V>` to improve performance when verifying commits. specifically, a call to `verify_commit_against_trusted(untrusted, trusted, options)` will now make use of new internal interfaces that check validator signatures and signer overlap at the same time. this is a worthwhile performance improvement, but in the process, it made changes to the public interface of `PredicateVerifier<P, C, V>` that break some use cases. as i understand it, there is no strict need to remove the other public interface from the verifier. those that call `verify_commit_against_trusted` can still receive a performance boost, but calling `verify_commit` on just the untrusted state should still work after those changes. so, this commit restores `verify_commit(untrusted)`, and keeps `verify_commit_against_trusted(untrusted, trusted, options)` under its previous name.
79ae26f to
6136a20
Compare
Contributor
|
Looks good me, agree we should have been careful not to break the existing API. @mina86 How does that sound to you? |
Contributor
|
@cratelyn Can you please add a ch age log entry while you're at it? 🙏 |
Contributor
Author
Contributor
|
Thanks! Will wait for @mina86 to take a look before merging. |
Contributor
|
LGTM |
romac
approved these changes
May 22, 2024
Contributor
|
Thanks! Will release this next week. |
This was referenced Apr 28, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
in #1410, alterations were made to the
PredicateVerifier<P, C, V>to improve performance when verifying commits.specifically, a call to
verify_commit_against_trusted(untrusted, trusted, options)will now make use of new internal interfaces that check validator signatures and signer overlap at the same time.this is a worthwhile performance improvement, but in the process, it made changes to the public interface of
PredicateVerifier<P, C, V>that breaks some use cases. as i understand it, there is no strict need to remove the other public interface from the verifier. those that callverify_commit_against_trustedcan still receive a performance boost, but callingverify_commiton just the untrusted state should still work after those changes.so, this commit restores
verify_commit(untrusted), and keepsverify_commit_against_trusted(untrusted, trusted, options)under its previous name.