pub struct ProdPredicates;
Expand description
Production predicates, using the default implementation
of the VerificationPredicates
trait.
Trait Implementations§
source§impl Clone for ProdPredicates
impl Clone for ProdPredicates
source§fn clone(&self) -> ProdPredicates
fn clone(&self) -> ProdPredicates
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ProdPredicates
impl Debug for ProdPredicates
source§impl Default for ProdPredicates
impl Default for ProdPredicates
source§fn default() -> ProdPredicates
fn default() -> ProdPredicates
Returns the “default value” for a type. Read more
source§impl PartialEq for ProdPredicates
impl PartialEq for ProdPredicates
source§fn eq(&self, other: &ProdPredicates) -> bool
fn eq(&self, other: &ProdPredicates) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl VerificationPredicates for ProdPredicates
impl VerificationPredicates for ProdPredicates
§type Sha256 = CoreWrapper<CtVariableCoreWrapper<Sha256VarCore, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, OidSha256>>
type Sha256 = CoreWrapper<CtVariableCoreWrapper<Sha256VarCore, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, OidSha256>>
The implementation of SHA256 digest
source§fn validator_sets_match(
&self,
validators: &Set,
header_validators_hash: Hash
) -> Result<(), VerificationError>
fn validator_sets_match( &self, validators: &Set, header_validators_hash: Hash ) -> Result<(), VerificationError>
Compare the provided validator_set_hash against the hash produced from hashing the validator
set.
source§fn next_validators_match(
&self,
next_validators: &Set,
header_next_validators_hash: Hash
) -> Result<(), VerificationError>
fn next_validators_match( &self, next_validators: &Set, header_next_validators_hash: Hash ) -> Result<(), VerificationError>
Check that the hash of the next validator set in the header match the actual one.
source§fn header_matches_commit(
&self,
header: &Header,
commit_hash: Hash
) -> Result<(), VerificationError>
fn header_matches_commit( &self, header: &Header, commit_hash: Hash ) -> Result<(), VerificationError>
Check that the hash of the header in the commit matches the actual one.
source§fn valid_commit(
&self,
signed_header: &SignedHeader,
validators: &Set,
commit_validator: &dyn CommitValidator
) -> Result<(), VerificationError>
fn valid_commit( &self, signed_header: &SignedHeader, validators: &Set, commit_validator: &dyn CommitValidator ) -> Result<(), VerificationError>
Validate the commit using the given commit validator.
source§fn is_within_trust_period(
&self,
trusted_header_time: Time,
trusting_period: Duration,
now: Time
) -> Result<(), VerificationError>
fn is_within_trust_period( &self, trusted_header_time: Time, trusting_period: Duration, now: Time ) -> Result<(), VerificationError>
Check that the trusted header is within the trusting period, adjusting for clock drift.
source§fn is_header_from_past(
&self,
untrusted_header_time: Time,
clock_drift: Duration,
now: Time
) -> Result<(), VerificationError>
fn is_header_from_past( &self, untrusted_header_time: Time, clock_drift: Duration, now: Time ) -> Result<(), VerificationError>
Check that the untrusted header is from past.
source§fn is_monotonic_bft_time(
&self,
untrusted_header_time: Time,
trusted_header_time: Time
) -> Result<(), VerificationError>
fn is_monotonic_bft_time( &self, untrusted_header_time: Time, trusted_header_time: Time ) -> Result<(), VerificationError>
Check that time passed monotonically between the trusted header and the untrusted one.
source§fn is_monotonic_height(
&self,
untrusted_height: Height,
trusted_height: Height
) -> Result<(), VerificationError>
fn is_monotonic_height( &self, untrusted_height: Height, trusted_height: Height ) -> Result<(), VerificationError>
Check that the height increased between the trusted header and the untrusted one.
source§fn is_matching_chain_id(
&self,
untrusted_chain_id: &Id,
trusted_chain_id: &Id
) -> Result<(), VerificationError>
fn is_matching_chain_id( &self, untrusted_chain_id: &Id, trusted_chain_id: &Id ) -> Result<(), VerificationError>
Check that the chain-ids of the trusted header and the untrusted one are the same
source§fn has_sufficient_validators_and_signers_overlap(
&self,
untrusted_sh: &SignedHeader,
trusted_validators: &Set,
trust_threshold: &TrustThresholdFraction,
untrusted_validators: &Set,
calculator: &dyn VotingPowerCalculator
) -> Result<(), VerificationError>
fn has_sufficient_validators_and_signers_overlap( &self, untrusted_sh: &SignedHeader, trusted_validators: &Set, trust_threshold: &TrustThresholdFraction, untrusted_validators: &Set, calculator: &dyn VotingPowerCalculator ) -> Result<(), VerificationError>
Checks that there is enough overlap between validators and the untrusted
signed header. Read more
source§fn has_sufficient_signers_overlap(
&self,
untrusted_sh: &SignedHeader,
untrusted_validators: &Set,
calculator: &dyn VotingPowerCalculator
) -> Result<(), VerificationError>
fn has_sufficient_signers_overlap( &self, untrusted_sh: &SignedHeader, untrusted_validators: &Set, calculator: &dyn VotingPowerCalculator ) -> Result<(), VerificationError>
Check that there is enough signers overlap between the given, untrusted
validator set and the untrusted signed header.
source§fn valid_next_validator_set(
&self,
untrusted_validators_hash: Hash,
trusted_next_validators_hash: Hash
) -> Result<(), VerificationError>
fn valid_next_validator_set( &self, untrusted_validators_hash: Hash, trusted_next_validators_hash: Hash ) -> Result<(), VerificationError>
Check that the hash of the next validator set in the trusted block matches
the hash of the validator set in the untrusted one.
impl Copy for ProdPredicates
impl Eq for ProdPredicates
impl StructuralPartialEq for ProdPredicates
Auto Trait Implementations§
impl Freeze for ProdPredicates
impl RefUnwindSafe for ProdPredicates
impl Send for ProdPredicates
impl Sync for ProdPredicates
impl Unpin for ProdPredicates
impl UnwindSafe for ProdPredicates
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.