informalsystems / tendermint-rs

Client libraries for Tendermint/CometBFT in Rust!
Apache License 2.0
587 stars 213 forks source link

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

Closed cratelyn closed 1 month ago

cratelyn commented 1 month ago

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.