[−][src]Trait tendermint_light_client::predicates::VerificationPredicates
Defines the various predicates used to validate and verify light blocks.
A default, spec abiding implementation is provided for each method.
This enables test implementations to only override a single method rather than have to re-define every predicate.
Provided methods
fn validator_sets_match(
&self,
light_block: &LightBlock,
hasher: &dyn Hasher
) -> Result<(), VerificationError>
&self,
light_block: &LightBlock,
hasher: &dyn Hasher
) -> Result<(), VerificationError>
fn next_validators_match(
&self,
light_block: &LightBlock,
hasher: &dyn Hasher
) -> Result<(), VerificationError>
&self,
light_block: &LightBlock,
hasher: &dyn Hasher
) -> Result<(), VerificationError>
fn header_matches_commit(
&self,
signed_header: &SignedHeader,
hasher: &dyn Hasher
) -> Result<(), VerificationError>
&self,
signed_header: &SignedHeader,
hasher: &dyn Hasher
) -> Result<(), VerificationError>
fn valid_commit(
&self,
signed_header: &SignedHeader,
validators: &ValidatorSet,
commit_validator: &dyn CommitValidator
) -> Result<(), VerificationError>
&self,
signed_header: &SignedHeader,
validators: &ValidatorSet,
commit_validator: &dyn CommitValidator
) -> Result<(), VerificationError>
fn is_within_trust_period(
&self,
header: &Header,
trusting_period: Duration,
clock_drift: Duration,
now: Time
) -> Result<(), VerificationError>
&self,
header: &Header,
trusting_period: Duration,
clock_drift: Duration,
now: Time
) -> Result<(), VerificationError>
fn is_monotonic_bft_time(
&self,
untrusted_header: &Header,
trusted_header: &Header
) -> Result<(), VerificationError>
&self,
untrusted_header: &Header,
trusted_header: &Header
) -> Result<(), VerificationError>
fn is_monotonic_height(
&self,
untrusted_header: &Header,
trusted_header: &Header
) -> Result<(), VerificationError>
&self,
untrusted_header: &Header,
trusted_header: &Header
) -> Result<(), VerificationError>
fn has_sufficient_validators_overlap(
&self,
untrusted_sh: &SignedHeader,
trusted_validators: &ValidatorSet,
trust_threshold: &TrustThreshold,
calculator: &dyn VotingPowerCalculator
) -> Result<(), VerificationError>
&self,
untrusted_sh: &SignedHeader,
trusted_validators: &ValidatorSet,
trust_threshold: &TrustThreshold,
calculator: &dyn VotingPowerCalculator
) -> Result<(), VerificationError>
fn has_sufficient_signers_overlap(
&self,
untrusted_sh: &SignedHeader,
untrusted_validators: &ValidatorSet,
calculator: &dyn VotingPowerCalculator
) -> Result<(), VerificationError>
&self,
untrusted_sh: &SignedHeader,
untrusted_validators: &ValidatorSet,
calculator: &dyn VotingPowerCalculator
) -> Result<(), VerificationError>
fn valid_next_validator_set(
&self,
light_block: &LightBlock,
trusted_state: &LightBlock
) -> Result<(), VerificationError>
&self,
light_block: &LightBlock,
trusted_state: &LightBlock
) -> Result<(), VerificationError>