ComposableFi/composable-ibc

BEEFY: Validation against two authority sets

blasrodri opened this issue · 3 comments

Looking at:

https://github.com/ComposableFi/centauri/blob/b2dfef9bee0d0c7205f20b568a789726d406957d/algorithms/beefy/verifier/src/lib.rs#L58

We are checking that the number signatures should be higher than any of the thresholds defined by the current or the next validator set. Shouldn't we change this to only verify against the current validator set?

WE want to exist early if the number of signatures does not meet the minimum threshold for either the current set or the next set

If it doesn't meet the threshold it doesn't make sense to continue in any case.
We also validate against the next_authority_set because the justification might be for the block where the authority set changed

Thanks