Documentation ¶
Index ¶
- Constants
- type ConsumerStateQuery
- func (csq *ConsumerStateQuery) GetMaxCUForUser(ctx context.Context, chainID string, epoch uint64) (maxCu uint64, err error)
- func (csq *ConsumerStateQuery) GetPairing(ctx context.Context, chainID string, latestBlock int64) (pairingList []epochstoragetypes.StakeEntry, epoch uint64, ...)
- func (csq *ConsumerStateQuery) GetSpec(ctx context.Context, chainID string) (*spectypes.Spec, error)
- type ConsumerStateTracker
- func (cst *ConsumerStateTracker) RegisterChainParserForSpecUpdates(ctx context.Context, chainParser chainlib.ChainParser, chainID string) error
- func (cst *ConsumerStateTracker) RegisterConsumerSessionManagerForPairingUpdates(ctx context.Context, ...)
- func (cst *ConsumerStateTracker) RegisterFinalizationConsensusForUpdates(ctx context.Context, finalizationConsensus *lavaprotocol.FinalizationConsensus)
- func (cst *ConsumerStateTracker) TxConflictDetection(ctx context.Context, finalizationConflict *conflicttypes.FinalizationConflict, ...) error
- type ConsumerTxSender
- type EpochUpdatable
- type FinalizationConsensusUpdater
- type PairingUpdater
- type ProviderStateTracker
- func (pst *ProviderStateTracker) New(ctx context.Context, txFactory tx.Factory, clientCtx client.Context) (ret *ProviderStateTracker, err error)
- func (pst *ProviderStateTracker) QueryVerifyPairing(ctx context.Context, consumer string, blockHeight uint64)
- func (pst *ProviderStateTracker) RegisterChainParserForSpecUpdates(ctx context.Context, chainParser chainlib.ChainParser)
- func (pst *ProviderStateTracker) RegisterForEpochUpdates(ctx context.Context, epochUpdatable EpochUpdatable)
- func (pst *ProviderStateTracker) RegisterReliabilityManagerForVoteUpdates(ctx context.Context, reliabilityManager *reliabilitymanager.ReliabilityManager)
- func (pst *ProviderStateTracker) TxRelayPayment(ctx context.Context, relayRequests []*pairingtypes.RelayRequest)
- type StateQuery
- type StateTracker
- type TxSender
- type Updater
Constants ¶
const ( BlocksToSaveLavaChainTracker = 1 // we only need the latest block TendermintConsensusParamsQuery = "consensus_params" )
const (
CallbackKeyForFinalizationConsensusUpdate = "finalization-consensus-update"
)
const (
CallbackKeyForPairingUpdate = "pairing-update"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConsumerStateQuery ¶ added in v0.5.1
type ConsumerStateQuery struct { StateQuery // contains filtered or unexported fields }
func NewConsumerStateQuery ¶ added in v0.5.1
func NewConsumerStateQuery(ctx context.Context, clientCtx client.Context) *ConsumerStateQuery
func (*ConsumerStateQuery) GetMaxCUForUser ¶ added in v0.5.1
func (*ConsumerStateQuery) GetPairing ¶ added in v0.5.1
func (csq *ConsumerStateQuery) GetPairing(ctx context.Context, chainID string, latestBlock int64) (pairingList []epochstoragetypes.StakeEntry, epoch uint64, nextBlockForUpdate uint64, errRet error)
type ConsumerStateTracker ¶
type ConsumerStateTracker struct { *StateTracker // 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 NewConsumerStateTracker ¶
func NewConsumerStateTracker(ctx context.Context, txFactory tx.Factory, clientCtx client.Context, chainFetcher chaintracker.ChainFetcher) (ret *ConsumerStateTracker, err error)
func (*ConsumerStateTracker) RegisterChainParserForSpecUpdates ¶ added in v0.5.0
func (cst *ConsumerStateTracker) RegisterChainParserForSpecUpdates(ctx context.Context, chainParser chainlib.ChainParser, chainID string) error
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) error
type ConsumerTxSender ¶
type ConsumerTxSender struct {
*TxSender
}
func NewConsumerTxSender ¶
func (*ConsumerTxSender) TxConflictDetection ¶ added in v0.5.1
func (ts *ConsumerTxSender) TxConflictDetection(ctx context.Context, finalizationConflict *conflicttypes.FinalizationConflict, responseConflict *conflicttypes.ResponseConflict, sameProviderConflict *conflicttypes.FinalizationConflict) error
type EpochUpdatable ¶ added in v0.5.0
type EpochUpdatable interface {
UpdateEpoch(epoch uint64)
}
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 *ConsumerStateQuery) *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 *ConsumerStateQuery) *PairingUpdater
func (*PairingUpdater) RegisterPairing ¶ added in v0.4.5
func (pu *PairingUpdater) RegisterPairing(ctx context.Context, consumerSessionManager *lavasession.ConsumerSessionManager) error
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 ProviderStateTracker ¶
type ProviderStateTracker struct { }
ProviderStateTracker PST is a class for tracking provider 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 (*ProviderStateTracker) New ¶ added in v0.5.0
func (pst *ProviderStateTracker) New(ctx context.Context, txFactory tx.Factory, clientCtx client.Context) (ret *ProviderStateTracker, err error)
func (*ProviderStateTracker) QueryVerifyPairing ¶ added in v0.5.0
func (pst *ProviderStateTracker) QueryVerifyPairing(ctx context.Context, consumer string, blockHeight uint64)
func (*ProviderStateTracker) RegisterChainParserForSpecUpdates ¶ added in v0.5.0
func (pst *ProviderStateTracker) RegisterChainParserForSpecUpdates(ctx context.Context, chainParser chainlib.ChainParser)
func (*ProviderStateTracker) RegisterForEpochUpdates ¶
func (pst *ProviderStateTracker) RegisterForEpochUpdates(ctx context.Context, epochUpdatable EpochUpdatable)
func (*ProviderStateTracker) RegisterReliabilityManagerForVoteUpdates ¶
func (pst *ProviderStateTracker) RegisterReliabilityManagerForVoteUpdates(ctx context.Context, reliabilityManager *reliabilitymanager.ReliabilityManager)
func (*ProviderStateTracker) TxRelayPayment ¶
func (pst *ProviderStateTracker) TxRelayPayment(ctx context.Context, relayRequests []*pairingtypes.RelayRequest)
type StateQuery ¶ added in v0.4.5
type StateQuery struct { SpecQueryClient spectypes.QueryClient PairingQueryClient pairingtypes.QueryClient EpochStorageQueryClient epochstoragetypes.QueryClient }
func NewStateQuery ¶ added in v0.5.1
func NewStateQuery(ctx context.Context, clientCtx client.Context) *StateQuery
type StateTracker ¶
type StateTracker 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 NewStateTracker ¶
func NewStateTracker(ctx context.Context, txFactory tx.Factory, clientCtx client.Context, chainFetcher chaintracker.ChainFetcher) (ret *StateTracker, err error)
func (*StateTracker) RegisterForUpdates ¶
func (cst *StateTracker) RegisterForUpdates(ctx context.Context, updater Updater) Updater
type TxSender ¶
type TxSender struct {
// contains filtered or unexported fields
}