tendermint light client: check_{header,misbehaviour}_and_update_state()
missing trusted_validator_set
hash check
#583
Labels
Milestone
Bug Summary
Problem is here.
We need to add a check
hash(header.trusted_validator_set) == trusted_consensus_state.next_validators_hash
. This corresponds to ibc-go'scheckTrustedHeader()
function.Description
The light client only keeps the hash of validator sets on chain, as the full set would be too costly to store. Therefore, we rely on the relayer to supply the full validator sets for us when updating a client (in this particular case, stored in
Header.trusted_validator_set
).We should never blindly trust what a relayer gives us though. In this case, we should make sure that the relayer passed us the right validator by checking that its hash is the same as the hash we have stored on chain at
trusted_consensus_state.next_validators_hash
.Today, we are missing that check, so effectively we're blindly trusting the relayer for that field.
The text was updated successfully, but these errors were encountered: