tendermint

package
v0.0.0-...-7c30539 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2020 License: Apache-2.0 Imports: 13 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,
	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).

func GetTxCmd

func GetTxCmd() *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(clientCtx client.Context, rtr *mux.Router)

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