tendermint

package
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

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

Index

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,
) (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).

func GetTxCmd

func GetTxCmd(cdc *codec.Codec, storeKey string) *cobra.Command

GetTxCmd returns the root tx command for the IBC client

func Name

func Name() string

Name returns the IBC client name

func RegisterRESTRoutes

func RegisterRESTRoutes(ctx context.CLIContext, rtr *mux.Router, queryRoute string)

RegisterRESTRoutes registers the REST routes for the IBC client

Types

This section is empty.

Directories

Path Synopsis
client
cli

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL