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: avoid checking signatures multiple times #1410

Merged
merged 11 commits into from
Apr 22, 2024
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
- `[light-client-verifier]` Rework VerificationPredicates and VotingPowerCalculator
by introducing methods which check validators and signers overlap at once.
The motivation of this is to avoid checking the same signature multiple
times.

Consider a validator is in old and new set. Previously their signature would
be verified twice. Once by call to `has_sufficient_validators_overlap`
method and second time by call to `has_sufficient_signers_overlap` method.

With the new interface, `has_sufficient_validators_and_signers_overlap` is
called and it can be implemented to remember which signatures have been
verified.

As a side effect of those changes, signatures are now verified in the order
of validator’s power which may further reduce number of signatures which
need to be verified.

([\#1410](https://github.com/informalsystems/tendermint-rs/pull/1410))
Loading
Loading