[][src]Module tendermint::lite::types

All traits that are necessary and need to be implemented to use the main verification logic in super::verifier for a light client.

Enums

Error

Traits

Commit

Commit is proof a Header is valid. It has an underlying Vote type with the relevant vote data for verification.

Header

Header contains meta data about the block - the height, the time, the hash of the validator set that should sign this header, and the hash of the validator set that should sign the next header.

Requester

Requester can be used to request SignedHeaders and ValidatorSets for a given height, e.g., by talking to a tendermint fullnode through RPC.

SignedHeader

SignedHeader bundles a Header and a Commit for convenience.

Store

This store can be used to store all the headers that have passed basic verification and that are within the light client's trust period.

TrustThreshold

TrustThreshold defines what fraction of the total voting power of a known and trusted validator set is sufficient for a commit to be accepted going forward. The default implementation returns true, iff at least a third of the trusted voting power signed (in other words at least one honest validator signed). Some clients might require more than +1/3 and can implement their own TrustLevel which can be passed into all relevant methods.

TrustedState

TrustedState stores the latest state trusted by a lite client, including the last header (at height h-1) and the validator set (at height h) to use to verify the next header.

ValidatorSet

ValidatorSet is the full validator set. It exposes its hash, which should match whats in a header, and its total power. It also has an underlying Validator type which can be used for verifying signatures. It also provides a lookup method to fetch a validator by its identifier.