light

package
v0.20.9 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2020 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package light provides a light Tendermint consensus backend implementation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	consensus.LightClientBackend

	// GetVerifiedSignedHeader returns a verified signed header.
	GetVerifiedSignedHeader(ctx context.Context, height int64) (*tmtypes.SignedHeader, error)

	// GetVerifiedValidatorSet returns a verified validator set.
	GetVerifiedValidatorSet(ctx context.Context, height int64) (*tmtypes.ValidatorSet, int64, error)

	// GetVerifiedParameters returns verified consensus parameters.
	GetVerifiedParameters(ctx context.Context, height int64) (*tmproto.ConsensusParams, error)
}

Client is a Tendermint consensus light client that talks with a remote oasis-node that is using the Tendermint consensus backend and verifies responses.

func NewClient

func NewClient(ctx context.Context, cfg ClientConfig) (Client, error)

NewClient creates a new light client.

type ClientConfig

type ClientConfig struct {
	// GenesisDocument is the Tendermint genesis document.
	GenesisDocument *tmtypes.GenesisDoc

	// ConsensusNodes is a list of nodes exposing the Oasis Core public consensus services that are
	// used to fetch data required for syncing light clients. The first node is considered the
	// primary and at least two nodes must be specified.
	ConsensusNodes []node.TLSAddress

	// TrustOptions are Tendermint light client trust options.
	TrustOptions tmlight.TrustOptions
}

ClientConfig is the configuration for the light client.

Jump to

Keyboard shortcuts

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