provider

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2024 License: GPL-3.0 Imports: 42 Imported by: 0

Documentation

Overview

Package provider implements the cchain.Provider interface.

Index

Constants

This section is empty.

Variables

View Source
var ErrHistoryPruned = errors.New("no commit info found (history pruned)")

ErrHistoryPruned indicates that the necessary state for the requested height isn't found in the store.

Functions

func IsErrHistoryPruned added in v0.2.0

func IsErrHistoryPruned(err error) bool

IsErrHistoryPruned reports whether the input error matches the CosmosSDK errors returned when the state for the requested height isn't found in the store.

Types

type Provider

type Provider struct {
	// contains filtered or unexported fields
}

Provider implements cchain.Provider.

func Dial added in v0.6.0

func Dial(network netconf.ID) (Provider, error)

func NewABCIProvider

func NewABCIProvider(cmtCl rpcclient.Client, network netconf.ID, chainNamer func(xchain.ChainVersion) string) Provider

func NewProviderForT

func NewProviderForT(_ *testing.T, fetch fetchFunc, latest latestFunc, window windowFunc,
	backoffFunc func(context.Context) func(),
) Provider

NewProviderForT creates a new provider for testing.

func (Provider) AttestationsFrom

func (p Provider) AttestationsFrom(ctx context.Context, chainVer xchain.ChainVersion, attestOffset uint64,
) ([]xchain.Attestation, error)

func (Provider) CometClient added in v0.3.0

func (p Provider) CometClient() rpcclient.Client

func (Provider) CurrentUpgradePlan added in v0.4.0

func (p Provider) CurrentUpgradePlan(ctx context.Context) (upgradetypes.Plan, bool, error)

func (Provider) GenesisFiles added in v0.3.0

func (p Provider) GenesisFiles(ctx context.Context) (execution []byte, consensus []byte, err error)

func (Provider) LatestAttestation

func (p Provider) LatestAttestation(ctx context.Context, chainVer xchain.ChainVersion,
) (xchain.Attestation, bool, error)

func (Provider) PortalValidatorSet added in v0.7.0

func (p Provider) PortalValidatorSet(ctx context.Context, valSetID uint64) ([]cchain.PortalValidator, bool, error)

func (Provider) Portals added in v0.4.0

func (p Provider) Portals(ctx context.Context) ([]*rtypes.Portal, bool, error)

func (Provider) SDKRewards added in v0.7.0

func (p Provider) SDKRewards(ctx context.Context, operator common.Address) (float64, bool, error)

func (Provider) SDKSigningInfos added in v0.7.0

func (p Provider) SDKSigningInfos(ctx context.Context) ([]cchain.SDKSigningInfo, error)

func (Provider) SDKValidator added in v0.7.0

func (p Provider) SDKValidator(ctx context.Context, operator common.Address) (cchain.SDKValidator, bool, error)

func (Provider) SDKValidators added in v0.7.0

func (p Provider) SDKValidators(ctx context.Context) ([]cchain.SDKValidator, error)

func (Provider) StreamAsync added in v0.4.0

func (p Provider) StreamAsync(
	ctx context.Context,
	chainVer xchain.ChainVersion,
	attestOffset uint64,
	workerName string,
	callback cchain.ProviderCallback,
)

func (Provider) StreamAttestations added in v0.4.0

func (p Provider) StreamAttestations(
	ctx context.Context,
	chainVer xchain.ChainVersion,
	attestOffset uint64,
	workerName string,
	callback cchain.ProviderCallback,
) error

func (Provider) WindowCompare

func (p Provider) WindowCompare(ctx context.Context, chainVer xchain.ChainVersion, attestOffset uint64) (int, error)

func (Provider) XBlock added in v0.1.2

func (p Provider) XBlock(ctx context.Context, height uint64, latest bool) (xchain.Block, bool, error)

XBlock returns the consensus XBlock at the given height/offset or latest, or false if not available, or an error.

Jump to

Keyboard shortcuts

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