# Packages

Package mbt provides a test runner for model-based tests Model-based tests are generated by https://github.com/informalsystems/tendermint-rs/tree/master/testgen, which first turns TLA+ specifications into test scenarios.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Functions

HeaderExpired return true if the given header expired.
Logger option can be used to set a logger for the client.
MaxBlockLag represents the maximum time difference between the realtime that a block is received and the timestamp of that block.
MaxClockDrift defines how much new header's time can drift into the future relative to the light clients local time.
Creates a block provider which implements the light client Provider interface.
NewClient returns a new light client.
NewClientFromTrustedStore initializes an existing client from the trusted store.
No description provided by the author
NewHTTPClient initiates an instance of a light client using HTTP addresses for both the primary provider and witnesses of the light client.
NewP2PStateProvider creates a light client state provider but uses a dispatcher connected to the P2P layer.
No description provided by the author
NewRPCStateProvider creates a new StateProvider using a light client and RPC clients.
PruningSize option sets the maximum amount of light blocks that the light client stores.
SequentialVerification option configures the light client to sequentially check the blocks (every block, in ascending height order).
SkippingVerification option configures the light client to skip blocks as long as {trustLevel} of the old validator set signed the new header.
ValidateTrustLevel checks that trustLevel is within the allowed range [1/3, 1].
Verify combines both VerifyAdjacent and VerifyNonAdjacent functions.
VerifyAdjacent verifies directly adjacent untrustedHeader against trustedHeader.
VerifyBackwards verifies an untrusted header with a height one less than that of an adjacent trusted header.
VerifyNonAdjacent verifies non-adjacent untrustedHeader against trustedHeader.

# Variables

DefaultTrustLevel - new header can be trusted if at least one correct validator signed it.
No description provided by the author
ErrFailedHeaderCrossReferencing is returned when the detector was not able to cross reference the header with any of the connected witnesses.
ErrLightClientAttack is returned when the light client has detected an attempt to verify a false header and has sent the evidence to either a witness or primary.
No description provided by the author
ErrNoWitnesses means that there are not enough witnesses connected to continue running the light client.
No description provided by the author
No description provided by the author

# Structs

BlockProvider is a p2p based light provider which uses a dispatcher connected to the state sync reactor to serve light blocks to the light client TODO: This should probably be moved over to the light package but as we're not yet officially supporting p2p light clients we'll leave this here for now.
Client represents a light client, connected to a single chain, which gets light blocks from a primary provider, verifies them either sequentially or by skipping some and stores them in a trusted store (usually, a local FS).
A Dispatcher multiplexes concurrent requests by multiple peers for light blocks.
ErrInvalidHeader means the header either failed the basic validation or commit is not signed by 2/3+.
ErrNewValSetCantBeTrusted means the new validator set cannot be trusted because < 1/3rd (+trustLevel+) of the old validator set has signed.
ErrOldHeaderExpired means the old (trusted) header has expired according to the given trustingPeriod and current time.
ErrVerificationFailed means either sequential or skipping verification has failed to verify from header #1 to header #2 due to some reason.
peerList is a rolling list of peers.
No description provided by the author
TrustOptions are the trust parameters needed when a new light client connects to the network or when an existing light client that has been offline for longer than the trusting period connects to the network.

# Interfaces

StateProvider is a provider of trusted state data for bootstrapping a node.

# Type aliases

Option sets a parameter for the light client.