cosmos-sdk: Index | Files | Directories

package tendermint

import ""

Package tendermint implements a concrete `ConsensusState`, `Header`, `Misbehaviour` and `Equivocation` types for the Tendermint consensus light client.


Package Files

doc.go misbehaviour.go module.go update.go

func CheckMisbehaviourAndUpdateState Uses

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 Uses

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](

func GetTxCmd Uses

func GetTxCmd() *cobra.Command

GetTxCmd returns the root tx command for the IBC client

func Name Uses

func Name() string

Name returns the IBC client name

func RegisterRESTRoutes Uses

func RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Router)

RegisterRESTRoutes registers the REST routes for the IBC client



Package tendermint imports 14 packages (graph) and is imported by 3 packages. Updated 2020-08-04. Refresh now. Tools for package owners.