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

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

Merged

Conversation

cratelyn
Copy link
Collaborator

@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 informalsystems#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
Member

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
Member

romac commented May 22, 2024

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

@cratelyn
Copy link
Collaborator Author

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

@romac sure thing. c0e0f65 📜

@romac
Copy link
Member

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 informalsystems:main May 22, 2024
22 checks passed
@romac
Copy link
Member

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