You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Context:is_within_trust_period predicate is intended to check if the latest trusted header is still within trusting period while we verify a new, untrusted header.
We also need to perform another check for header time that it's "header from future", that means, the untrusted header that we're verifying must not have a time that is beyond our current time (= now + clock_drift)
Problem: Code below for the is_within_trust_period predicate includes the "header from future" check.
This is a bug because the header we have there is the trusted one instead of the untrusted one and so the condition will always evaluate to true.
Context:
is_within_trust_period
predicate is intended to check if the latesttrusted
header is still within trusting period while we verify a new, untrusted header.We also need to perform another check for header time that it's "header from future", that means, the
untrusted
header that we're verifying must not have a time that is beyond our current time (= now + clock_drift)Problem: Code below for the
is_within_trust_period
predicate includes the "header from future" check.This is a bug because the header we have there is the
trusted
one instead of theuntrusted
one and so the condition will always evaluate totrue
.tendermint-rs/light-client/src/predicates.rs
Lines 99 to 121 in 548d76d
Fix: Will be clearer if we have a separate predicate for "header from future" check.
The text was updated successfully, but these errors were encountered: