Package tendermint implements a concrete `ConsensusState`, `Header`, `Misbehaviour` and `Equivocation` types for the Tendermint consensus light client.
func CheckMisbehaviourAndUpdateState( clientState clientexported.ClientState, consensusState clientexported.ConsensusState, misbehaviour clientexported.Misbehaviour, height uint64, currentTimestamp time.Time, consensusParams *abci.ConsensusParams, ) (clientexported.ClientState, error)
CheckMisbehaviourAndUpdateState determines whether or not two conflicting headers at the same height would have convinced the light client.
NOTE: assumes provided height is the height at which the consensusState is stored.
func CheckValidityAndUpdateState( clientState clientexported.ClientState, consState clientexported.ConsensusState, header clientexported.Header, currentTimestamp time.Time, ) (clientexported.ClientState, clientexported.ConsensusState, error)
CheckValidityAndUpdateState checks if the provided header is valid, and if valid it will: create the consensus state for the header.Height and update the client state if the header height is greater than the latest client state height It returns an error if: - the client or header provided are not parseable to tendermint types - the header is invalid - header height is less than or equal to the consensus state height - header valset commit verification fails - header timestamp is past the trusting period in relation to the consensus state - header timestamp is less than or equal to the consensus state timestamp
UpdateClient may be used to either create a consensus state for: - a future height greater than the latest client state height - a past height that was skipped during bisection If we are updating to a past height, a consensus state is created for that height to be persisted in client store If we are updating to a future height, the consensus state is created and the client state is updated to reflect the new latest height Tendermint client validity checking uses the bisection algorithm described in the [Tendermint spec](https://github.com/tendermint/spec/blob/master/spec/consensus/light-client.md).
GetTxCmd returns the root tx command for the IBC client
Name returns the IBC client name
RegisterRESTRoutes registers the REST routes for the IBC client