Skip to content

light-client-verifier: 🌱 restore verify_commit() interface#1423

Merged
romac merged 3 commits intocometbft:mainfrom
cratelyn:kate/restore-verifier-commit-interfaces
May 22, 2024
Merged

light-client-verifier: 🌱 restore verify_commit() interface#1423
romac merged 3 commits intocometbft:mainfrom
cratelyn:kate/restore-verifier-commit-interfaces

Conversation

@cratelyn
Copy link
Contributor

@cratelyn cratelyn commented May 21, 2024

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 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.

@cratelyn

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.
@cratelyn cratelyn force-pushed the kate/restore-verifier-commit-interfaces branch from 79ae26f to 6136a20 Compare May 21, 2024 22:03
@romac
Copy link
Contributor

romac commented May 22, 2024

Looks good me, agree we should have been careful not to break the existing API.

@mina86 How does that sound to you?

@romac
Copy link
Contributor

romac commented May 22, 2024

@cratelyn Can you please add a ch age log entry while you're at it? 🙏

@cratelyn
Copy link
Contributor Author

@cratelyn Can you please add a ch age log entry while you're at it? 🙏

@romac sure thing. c0e0f65 📜

@romac
Copy link
Contributor

romac commented May 22, 2024

Thanks! Will wait for @mina86 to take a look before merging.

@mina86
Copy link
Contributor

mina86 commented May 22, 2024

LGTM

@romac romac merged commit c00441f into cometbft:main May 22, 2024
@romac
Copy link
Contributor

romac commented May 22, 2024

Thanks! Will release this next week.

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.

3 participants