pub struct ProdPredicates;
Expand description

Production predicates, using the default implementation of the VerificationPredicates trait.

Trait Implementations§

source§

impl Clone for ProdPredicates

source§

fn clone(&self) -> ProdPredicates

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ProdPredicates

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Default for ProdPredicates

source§

fn default() -> ProdPredicates

Returns the “default value” for a type. Read more
source§

impl PartialEq for ProdPredicates

source§

fn eq(&self, other: &ProdPredicates) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl VerificationPredicates for ProdPredicates

§

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>

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>

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>

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>

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>

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>

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>

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>

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>

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>

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>

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>

Check that the hash of the next validator set in the trusted block matches the hash of the validator set in the untrusted one.
source§

impl Copy for ProdPredicates

source§

impl Eq for ProdPredicates

source§

impl StructuralPartialEq for ProdPredicates

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more