Documentation ¶
Overview ¶
Package tendermint implements a concrete `ConsensusState`, `Header`, `Misbehaviour` and `Equivocation` types for the Tendermint consensus light client.
Index ¶
- func CheckMisbehaviourAndUpdateState(clientState clientexported.ClientState, ...) (clientexported.ClientState, error)
- func CheckValidityAndUpdateState(clientState clientexported.ClientState, header clientexported.Header, ...) (clientexported.ClientState, clientexported.ConsensusState, error)
- func GetTxCmd() *cobra.Command
- func Name() string
- func RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Router)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckMisbehaviourAndUpdateState ¶
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 ¶
func CheckValidityAndUpdateState( clientState clientexported.ClientState, header clientexported.Header, currentTimestamp time.Time, ) (clientexported.ClientState, clientexported.ConsensusState, error)
CheckValidityAndUpdateState checks if the provided header is valid and updates the consensus state if appropriate. It returns an error if: - the client or header provided are not parseable to tendermint types - the header is invalid - header height is lower than the latest client height - header valset commit verification fails
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).
Types ¶
This section is empty.