statetracker

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CallbackKeyForFinalizationConsensusUpdate = "finalization-consensus-update"
)
View Source
const (
	CallbackKeyForPairingUpdate = "pairing-update"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsumerStateTracker

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

ConsumerStateTracker CSTis a class for tracking consumer data from the lava blockchain, such as epoch changes. it allows also to query specific data form the blockchain and acts as a single place to send transactions

func (*ConsumerStateTracker) New added in v0.4.5

func (cst *ConsumerStateTracker) New(ctx context.Context, txFactory tx.Factory, clientCtx client.Context) (ret *ConsumerStateTracker, err error)

func (*ConsumerStateTracker) RegisterApiParserForSpecUpdates added in v0.4.5

func (cst *ConsumerStateTracker) RegisterApiParserForSpecUpdates(ctx context.Context, chainParser chainlib.ChainParser)

func (*ConsumerStateTracker) RegisterConsumerSessionManagerForPairingUpdates

func (cst *ConsumerStateTracker) RegisterConsumerSessionManagerForPairingUpdates(ctx context.Context, consumerSessionManager *lavasession.ConsumerSessionManager)

func (*ConsumerStateTracker) RegisterFinalizationConsensusForUpdates

func (cst *ConsumerStateTracker) RegisterFinalizationConsensusForUpdates(ctx context.Context, finalizationConsensus *lavaprotocol.FinalizationConsensus)

func (*ConsumerStateTracker) TxConflictDetection

func (cst *ConsumerStateTracker) TxConflictDetection(ctx context.Context, finalizationConflict *conflicttypes.FinalizationConflict, responseConflict *conflicttypes.ResponseConflict, sameProviderConflict *conflicttypes.FinalizationConflict)

type FinalizationConsensusUpdater added in v0.4.5

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

func NewFinalizationConsensusUpdater added in v0.4.5

func NewFinalizationConsensusUpdater(consumerAddress sdk.AccAddress, stateQuery *StateQuery) *FinalizationConsensusUpdater

func (*FinalizationConsensusUpdater) RegisterFinalizationConsensus added in v0.4.5

func (fcu *FinalizationConsensusUpdater) RegisterFinalizationConsensus(finalizationConsensus *lavaprotocol.FinalizationConsensus)

func (*FinalizationConsensusUpdater) Update added in v0.4.5

func (fcu *FinalizationConsensusUpdater) Update(latestBlock int64)

func (*FinalizationConsensusUpdater) UpdaterKey added in v0.4.5

func (fcu *FinalizationConsensusUpdater) UpdaterKey() string

type PairingUpdater added in v0.4.5

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

func NewPairingUpdater added in v0.4.5

func NewPairingUpdater(consumerAddress sdk.AccAddress, stateQuery *StateQuery) *PairingUpdater

func (*PairingUpdater) RegisterPairing added in v0.4.5

func (pu *PairingUpdater) RegisterPairing(consumerSessionManager *lavasession.ConsumerSessionManager)

func (*PairingUpdater) Update added in v0.4.5

func (pu *PairingUpdater) Update(latestBlock int64)

func (*PairingUpdater) UpdaterKey added in v0.4.5

func (pu *PairingUpdater) UpdaterKey() string

type StateQuery added in v0.4.5

type StateQuery struct{}

func (*StateQuery) GetPairing added in v0.4.5

func (sq *StateQuery) GetPairing(latestBlock int64) (pairingList []epochstoragetypes.StakeEntry, epoch uint64, nextBlockForUpdate uint64)

func (*StateQuery) New added in v0.4.5

func (sq *StateQuery) New(ctx context.Context, clientCtx client.Context) (ret *StateQuery, err error)

type TxSender

type TxSender struct{}

func (*TxSender) New added in v0.4.5

func (ts *TxSender) New(ctx context.Context, txFactory tx.Factory, clientCtx client.Context) (ret *TxSender, err error)

func (*TxSender) TxConflictDetection added in v0.4.5

func (ts *TxSender) TxConflictDetection(ctx context.Context, finalizationConflict *conflicttypes.FinalizationConflict, responseConflict *conflicttypes.ResponseConflict, sameProviderConflict *conflicttypes.FinalizationConflict)

type Updater

type Updater interface {
	Update(int64)
	UpdaterKey() string
}

Jump to

Keyboard shortcuts

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