Documentation ¶
Overview ¶
Package updaters is a generated GoMock package.
Package updaters is a generated GoMock package.
Index ¶
- Constants
- Variables
- type ConsumerSessionManagerInf
- type ConsumerStateQuery
- func (csq *ConsumerStateQuery) GetEffectivePolicy(ctx context.Context, consumerAddress, specID string) (*plantypes.Policy, error)
- 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, nextBlockForUpdate uint64, ...)
- type ConsumerStateQueryInf
- type DowntimeParamsStateQuery
- type DowntimeParamsUpdatable
- type DowntimeParamsUpdater
- func (dpu *DowntimeParamsUpdater) RegisterDowntimeParamsUpdatable(ctx context.Context, downtimeParamsUpdatable *DowntimeParamsUpdatable) error
- func (dpu *DowntimeParamsUpdater) Reset(latestBlock int64)
- func (dpu *DowntimeParamsUpdater) Update(latestBlock int64)
- func (dpu *DowntimeParamsUpdater) UpdaterKey() string
- type EpochStateQuery
- type EpochStateQueryInterface
- type EpochUpdatable
- type EpochUpdatableWithBlockDelay
- type EpochUpdater
- type EventTracker
- type FinalizationConsensusUpdater
- func (fcu *FinalizationConsensusUpdater) RegisterFinalizationConsensus(finalizationConsensus *finalizationconsensus.FinalizationConsensus)
- func (fcu *FinalizationConsensusUpdater) Reset(latestBlock int64)
- func (fcu *FinalizationConsensusUpdater) Update(latestBlock int64)
- func (fcu *FinalizationConsensusUpdater) UpdaterKey() string
- type FrozenStatus
- type MetricsManagerInf
- type MetricsUpdater
- type MockConsumerSessionManagerInf
- func (m *MockConsumerSessionManagerInf) EXPECT() *MockConsumerSessionManagerInfMockRecorder
- func (m *MockConsumerSessionManagerInf) RPCEndpoint() lavasession.RPCEndpoint
- func (m *MockConsumerSessionManagerInf) UpdateAllProviders(epoch uint64, pairingList map[uint64]*lavasession.ConsumerSessionsWithProvider) error
- type MockConsumerSessionManagerInfMockRecorder
- type MockConsumerStateQueryInf
- func (m *MockConsumerStateQueryInf) EXPECT() *MockConsumerStateQueryInfMockRecorder
- func (m *MockConsumerStateQueryInf) GetMaxCUForUser(ctx context.Context, chainID string, epoch uint64) (uint64, error)
- func (m *MockConsumerStateQueryInf) GetPairing(ctx context.Context, chainID string, blockHeight int64) ([]types.StakeEntry, uint64, uint64, error)
- type MockConsumerStateQueryInfMockRecorder
- type MockPairingUpdatable
- type MockPairingUpdatableMockRecorder
- type MockProviderMetricsManagerInf
- func (m *MockProviderMetricsManagerInf) EXPECT() *MockProviderMetricsManagerInfMockRecorder
- func (m *MockProviderMetricsManagerInf) SetFrozenStatus(arg0 string, arg1 bool)
- func (m *MockProviderMetricsManagerInf) SetJailStatus(arg0 string, arg1 bool)
- func (m *MockProviderMetricsManagerInf) SetJailedCount(arg0 string, arg1 uint64)
- type MockProviderMetricsManagerInfMockRecorder
- type MockProviderPairingStatusStateQueryInf
- func (m *MockProviderPairingStatusStateQueryInf) EXPECT() *MockProviderPairingStatusStateQueryInfMockRecorder
- func (m *MockProviderPairingStatusStateQueryInf) GetPairingQueryClient() ProviderPairingStatusStateQueryInf
- func (m *MockProviderPairingStatusStateQueryInf) Provider(ctx context.Context, in *types.QueryProviderRequest, opts ...grpc.CallOption) (*types.QueryProviderResponse, error)
- type MockProviderPairingStatusStateQueryInfMockRecorder
- type PairingUpdatable
- type PairingUpdater
- func (pu *PairingUpdater) RegisterPairing(ctx context.Context, consumerSessionManager ConsumerSessionManagerInf, ...) error
- func (pu *PairingUpdater) RegisterPairingUpdatable(ctx context.Context, pairingUpdatable *PairingUpdatable) error
- func (pu *PairingUpdater) Reset(latestBlock int64)
- func (pu *PairingUpdater) Update(latestBlock int64)
- func (pu *PairingUpdater) UpdaterKey() string
- type PaymentUpdatable
- type PaymentUpdater
- type PolicyFetcher
- type PolicySetter
- type PolicyUpdater
- type ProtocolVersionResponse
- type ProviderFreezeJailUpdater
- type ProviderMetricsManagerInf
- type ProviderPairingStatusStateQueryInf
- type ProviderQueryGetter
- type ProviderStateQuery
- func (psq *ProviderStateQuery) EarliestBlockInMemory(ctx context.Context) (uint64, error)
- func (psq *ProviderStateQuery) GetEpochSize(ctx context.Context) (uint64, error)
- func (psq *ProviderStateQuery) GetEpochSizeMultipliedByRecommendedEpochNumToCollectPayment(ctx context.Context) (uint64, error)
- func (psq *ProviderStateQuery) GetMaxCuForUser(ctx context.Context, consumerAddress, chainID string, epoch uint64) (maxCu uint64, err error)
- func (psq *ProviderStateQuery) GetRecommendedEpochNumToCollectPayment(ctx context.Context) (uint64, error)
- func (psq *ProviderStateQuery) VerifyPairing(ctx context.Context, consumerAddress, providerAddress string, epoch uint64, ...) (valid bool, total int64, projectId string, err error)
- func (psq *ProviderStateQuery) VoteEvents(ctx context.Context, latestBlock int64) (votes []*reliabilitymanager.VoteParams, err error)
- type SpecGetter
- type SpecUpdatable
- type SpecUpdater
- func (su *SpecUpdater) RegisterSpecUpdatable(ctx context.Context, specUpdatable *SpecUpdatable, ...) error
- func (su *SpecUpdater) RegisterSpecVerifier(ctx context.Context, specVerifier *SpecVerifier, chainId string) error
- func (su *SpecUpdater) Reset(latestBlock int64)
- func (su *SpecUpdater) Update(latestBlock int64)
- func (su *SpecUpdater) UpdaterKey() string
- type SpecVerifier
- type StateQuery
- func (csq *StateQuery) GetDowntimeParams(ctx context.Context) (*downtimev1.Params, error)
- func (csq *StateQuery) GetProtocolVersion(ctx context.Context) (*ProtocolVersionResponse, error)
- func (csq *StateQuery) GetSpec(ctx context.Context, chainID string) (*spectypes.Spec, error)
- func (sq *StateQuery) GetSpecQueryClient() spectypes.QueryClient
- func (sq *StateQuery) Provider(ctx context.Context, in *pairingtypes.QueryProviderRequest, ...) (*pairingtypes.QueryProviderResponse, error)
- func (sq *StateQuery) UpdateAccess(accessInf StateQueryAccessInf)
- type StateQueryAccessInf
- type StateQueryAccessInst
- type VersionStateQuery
- type VersionUpdater
- type VersionValidationInf
- type VoteUpdatable
- type VoteUpdater
Constants ¶
const ( CacheMaxCost = 10 * 1024 // 10K cost CacheNumCounters = 10 * 1025 // expect 10K items DefaultTimeToLiveExpiration = 30 * time.Minute PairingRespKey = "pairing-resp" VerifyPairingRespKey = "verify-pairing-resp" MaxCuResponseKey = "max-cu-resp" EffectivePolicyRespKey = "effective-policy-resp" )
const (
BlockResultRetry = 20
)
const (
CallbackKeyForDowntimeParamsUpdate = "downtime-params-update"
)
const (
CallbackKeyForEpochUpdate = "epoch-update"
)
const (
CallbackKeyForFinalizationConsensusUpdate = "finalization-consensus-update"
)
const (
CallbackKeyForFreezeUpdate = "freeze-update"
)
const (
CallbackKeyForMetricUpdate = "metric-update"
)
const (
CallbackKeyForPairingUpdate = "pairing-update"
)
const (
CallbackKeyForPaymentUpdate = "payment-update"
)
const (
CallbackKeyForPolicyUpdate = "policy-update"
)
const (
CallbackKeyForSpecUpdate = "spec-update"
)
const (
CallbackKeyForVersionUpdate = "version-update"
)
const (
CallbackKeyForVoteUpdate = "vote-update"
)
Variables ¶
var TimeOutForFetchingLavaBlocks = time.Second * 5
Functions ¶
This section is empty.
Types ¶
type ConsumerSessionManagerInf ¶
type ConsumerSessionManagerInf interface { RPCEndpoint() lavasession.RPCEndpoint UpdateAllProviders(epoch uint64, pairingList map[uint64]*lavasession.ConsumerSessionsWithProvider) error }
type ConsumerStateQuery ¶
type ConsumerStateQuery struct { *StateQuery // contains filtered or unexported fields }
func NewConsumerStateQuery ¶
func NewConsumerStateQuery(ctx context.Context, clientCtx client.Context) *ConsumerStateQuery
func (*ConsumerStateQuery) GetEffectivePolicy ¶
func (*ConsumerStateQuery) GetMaxCUForUser ¶
func (*ConsumerStateQuery) GetPairing ¶
func (csq *ConsumerStateQuery) GetPairing(ctx context.Context, chainID string, latestBlock int64) (pairingList []epochstoragetypes.StakeEntry, epoch, nextBlockForUpdate uint64, errRet error)
type ConsumerStateQueryInf ¶
type DowntimeParamsStateQuery ¶
type DowntimeParamsStateQuery interface {
GetDowntimeParams(ctx context.Context) (*downtimev1.Params, error)
}
type DowntimeParamsUpdatable ¶
type DowntimeParamsUpdatable interface {
SetDowntimeParams(downtimev1.Params)
}
type DowntimeParamsUpdater ¶
type DowntimeParamsUpdater struct {
// contains filtered or unexported fields
}
DowntimeParamsUpdater update downtime params for registered updatables after params change proposals
func NewDowntimeParamsUpdater ¶
func NewDowntimeParamsUpdater(downtimeParamsStateQuery DowntimeParamsStateQuery, eventTracker *EventTracker) *DowntimeParamsUpdater
func (*DowntimeParamsUpdater) RegisterDowntimeParamsUpdatable ¶
func (dpu *DowntimeParamsUpdater) RegisterDowntimeParamsUpdatable(ctx context.Context, downtimeParamsUpdatable *DowntimeParamsUpdatable) error
func (*DowntimeParamsUpdater) Reset ¶
func (dpu *DowntimeParamsUpdater) Reset(latestBlock int64)
func (*DowntimeParamsUpdater) Update ¶
func (dpu *DowntimeParamsUpdater) Update(latestBlock int64)
func (*DowntimeParamsUpdater) UpdaterKey ¶
func (dpu *DowntimeParamsUpdater) UpdaterKey() string
type EpochStateQuery ¶
type EpochStateQuery struct {
StateQuery
}
func NewEpochStateQuery ¶
func NewEpochStateQuery(stateQuery *StateQuery) *EpochStateQuery
func (*EpochStateQuery) CurrentEpochStart ¶
func (esq *EpochStateQuery) CurrentEpochStart(ctx context.Context) (uint64, error)
type EpochUpdatable ¶
type EpochUpdatable interface {
UpdateEpoch(epoch uint64)
}
type EpochUpdatableWithBlockDelay ¶
type EpochUpdatableWithBlockDelay struct { EpochUpdatable // contains filtered or unexported fields }
func (*EpochUpdatableWithBlockDelay) UpdateOnBlock ¶
func (euwbd *EpochUpdatableWithBlockDelay) UpdateOnBlock(currentEpoch uint64, latestBlock int64)
Add a method to EpochUpdatableWithBlockDelay to update based on block delay.
type EpochUpdater ¶
type EpochUpdater struct {
// contains filtered or unexported fields
}
func NewEpochUpdater ¶
func NewEpochUpdater(stateQuery EpochStateQueryInterface) *EpochUpdater
func (*EpochUpdater) RegisterEpochUpdatable ¶
func (eu *EpochUpdater) RegisterEpochUpdatable(ctx context.Context, epochUpdatable EpochUpdatable, blocksUpdateDelay int64)
func (*EpochUpdater) Reset ¶
func (eu *EpochUpdater) Reset(latestBlock int64)
func (*EpochUpdater) Update ¶
func (eu *EpochUpdater) Update(latestBlock int64)
func (*EpochUpdater) UpdaterKey ¶
func (eu *EpochUpdater) UpdaterKey() string
type EventTracker ¶
type EventTracker struct { *StateQuery // contains filtered or unexported fields }
func (*EventTracker) UpdateBlockResults ¶
func (et *EventTracker) UpdateBlockResults(latestBlock int64) (err error)
type FinalizationConsensusUpdater ¶
type FinalizationConsensusUpdater struct {
// contains filtered or unexported fields
}
func NewFinalizationConsensusUpdater ¶
func NewFinalizationConsensusUpdater(stateQuery *ConsumerStateQuery, specId string) *FinalizationConsensusUpdater
func (*FinalizationConsensusUpdater) RegisterFinalizationConsensus ¶
func (fcu *FinalizationConsensusUpdater) RegisterFinalizationConsensus(finalizationConsensus *finalizationconsensus.FinalizationConsensus)
func (*FinalizationConsensusUpdater) Reset ¶
func (fcu *FinalizationConsensusUpdater) Reset(latestBlock int64)
func (*FinalizationConsensusUpdater) Update ¶
func (fcu *FinalizationConsensusUpdater) Update(latestBlock int64)
func (*FinalizationConsensusUpdater) UpdaterKey ¶
func (fcu *FinalizationConsensusUpdater) UpdaterKey() string
type FrozenStatus ¶ added in v4.1.0
type FrozenStatus uint64
const ( AVAILABLE FrozenStatus = iota FROZEN )
type MetricsManagerInf ¶
type MetricsManagerInf interface {
SetBlock(int64)
}
type MetricsUpdater ¶
type MetricsUpdater struct {
// contains filtered or unexported fields
}
func NewMetricsUpdater ¶
func NewMetricsUpdater(consumerMetricsManager MetricsManagerInf) *MetricsUpdater
func (*MetricsUpdater) Reset ¶
func (mu *MetricsUpdater) Reset(latestBlock int64)
func (*MetricsUpdater) Update ¶
func (mu *MetricsUpdater) Update(latestBlock int64)
func (*MetricsUpdater) UpdaterKey ¶
func (mu *MetricsUpdater) UpdaterKey() string
type MockConsumerSessionManagerInf ¶
type MockConsumerSessionManagerInf struct {
// contains filtered or unexported fields
}
MockConsumerSessionManagerInf is a mock of ConsumerSessionManagerInf interface.
func NewMockConsumerSessionManagerInf ¶
func NewMockConsumerSessionManagerInf(ctrl *gomock.Controller) *MockConsumerSessionManagerInf
NewMockConsumerSessionManagerInf creates a new mock instance.
func (*MockConsumerSessionManagerInf) EXPECT ¶
func (m *MockConsumerSessionManagerInf) EXPECT() *MockConsumerSessionManagerInfMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockConsumerSessionManagerInf) RPCEndpoint ¶
func (m *MockConsumerSessionManagerInf) RPCEndpoint() lavasession.RPCEndpoint
RPCEndpoint mocks base method.
func (*MockConsumerSessionManagerInf) UpdateAllProviders ¶
func (m *MockConsumerSessionManagerInf) UpdateAllProviders(epoch uint64, pairingList map[uint64]*lavasession.ConsumerSessionsWithProvider) error
UpdateAllProviders mocks base method.
type MockConsumerSessionManagerInfMockRecorder ¶
type MockConsumerSessionManagerInfMockRecorder struct {
// contains filtered or unexported fields
}
MockConsumerSessionManagerInfMockRecorder is the mock recorder for MockConsumerSessionManagerInf.
func (*MockConsumerSessionManagerInfMockRecorder) RPCEndpoint ¶
func (mr *MockConsumerSessionManagerInfMockRecorder) RPCEndpoint() *gomock.Call
RPCEndpoint indicates an expected call of RPCEndpoint.
func (*MockConsumerSessionManagerInfMockRecorder) UpdateAllProviders ¶
func (mr *MockConsumerSessionManagerInfMockRecorder) UpdateAllProviders(epoch, pairingList interface{}) *gomock.Call
UpdateAllProviders indicates an expected call of UpdateAllProviders.
type MockConsumerStateQueryInf ¶
type MockConsumerStateQueryInf struct {
// contains filtered or unexported fields
}
MockConsumerStateQueryInf is a mock of ConsumerStateQueryInf interface.
func NewMockConsumerStateQueryInf ¶
func NewMockConsumerStateQueryInf(ctrl *gomock.Controller) *MockConsumerStateQueryInf
NewMockConsumerStateQueryInf creates a new mock instance.
func (*MockConsumerStateQueryInf) EXPECT ¶
func (m *MockConsumerStateQueryInf) EXPECT() *MockConsumerStateQueryInfMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockConsumerStateQueryInf) GetMaxCUForUser ¶
func (m *MockConsumerStateQueryInf) GetMaxCUForUser(ctx context.Context, chainID string, epoch uint64) (uint64, error)
GetMaxCUForUser mocks base method.
func (*MockConsumerStateQueryInf) GetPairing ¶
func (m *MockConsumerStateQueryInf) GetPairing(ctx context.Context, chainID string, blockHeight int64) ([]types.StakeEntry, uint64, uint64, error)
GetPairing mocks base method.
type MockConsumerStateQueryInfMockRecorder ¶
type MockConsumerStateQueryInfMockRecorder struct {
// contains filtered or unexported fields
}
MockConsumerStateQueryInfMockRecorder is the mock recorder for MockConsumerStateQueryInf.
func (*MockConsumerStateQueryInfMockRecorder) GetMaxCUForUser ¶
func (mr *MockConsumerStateQueryInfMockRecorder) GetMaxCUForUser(ctx, chainID, epoch interface{}) *gomock.Call
GetMaxCUForUser indicates an expected call of GetMaxCUForUser.
func (*MockConsumerStateQueryInfMockRecorder) GetPairing ¶
func (mr *MockConsumerStateQueryInfMockRecorder) GetPairing(ctx, chainID, blockHeight interface{}) *gomock.Call
GetPairing indicates an expected call of GetPairing.
type MockPairingUpdatable ¶
type MockPairingUpdatable struct {
// contains filtered or unexported fields
}
MockPairingUpdatable is a mock of PairingUpdatable interface.
func NewMockPairingUpdatable ¶
func NewMockPairingUpdatable(ctrl *gomock.Controller) *MockPairingUpdatable
NewMockPairingUpdatable creates a new mock instance.
func (*MockPairingUpdatable) EXPECT ¶
func (m *MockPairingUpdatable) EXPECT() *MockPairingUpdatableMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockPairingUpdatable) UpdateEpoch ¶
func (m *MockPairingUpdatable) UpdateEpoch(epoch uint64)
UpdateEpoch mocks base method.
type MockPairingUpdatableMockRecorder ¶
type MockPairingUpdatableMockRecorder struct {
// contains filtered or unexported fields
}
MockPairingUpdatableMockRecorder is the mock recorder for MockPairingUpdatable.
func (*MockPairingUpdatableMockRecorder) UpdateEpoch ¶
func (mr *MockPairingUpdatableMockRecorder) UpdateEpoch(epoch interface{}) *gomock.Call
UpdateEpoch indicates an expected call of UpdateEpoch.
type MockProviderMetricsManagerInf ¶ added in v4.1.0
type MockProviderMetricsManagerInf struct {
// contains filtered or unexported fields
}
MockProviderMetricsManagerInf is a mock of ProviderMetricsManagerInf interface.
func NewMockProviderMetricsManagerInf ¶ added in v4.1.0
func NewMockProviderMetricsManagerInf(ctrl *gomock.Controller) *MockProviderMetricsManagerInf
NewMockProviderMetricsManagerInf creates a new mock instance.
func (*MockProviderMetricsManagerInf) EXPECT ¶ added in v4.1.0
func (m *MockProviderMetricsManagerInf) EXPECT() *MockProviderMetricsManagerInfMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockProviderMetricsManagerInf) SetFrozenStatus ¶ added in v4.1.0
func (m *MockProviderMetricsManagerInf) SetFrozenStatus(arg0 string, arg1 bool)
SetFrozenStatus mocks base method.
func (*MockProviderMetricsManagerInf) SetJailStatus ¶ added in v4.1.0
func (m *MockProviderMetricsManagerInf) SetJailStatus(arg0 string, arg1 bool)
SetJailStatus mocks base method.
func (*MockProviderMetricsManagerInf) SetJailedCount ¶ added in v4.1.0
func (m *MockProviderMetricsManagerInf) SetJailedCount(arg0 string, arg1 uint64)
SetJailedCount mocks base method.
type MockProviderMetricsManagerInfMockRecorder ¶ added in v4.1.0
type MockProviderMetricsManagerInfMockRecorder struct {
// contains filtered or unexported fields
}
MockProviderMetricsManagerInfMockRecorder is the mock recorder for MockProviderMetricsManagerInf.
func (*MockProviderMetricsManagerInfMockRecorder) SetFrozenStatus ¶ added in v4.1.0
func (mr *MockProviderMetricsManagerInfMockRecorder) SetFrozenStatus(arg0, arg1 any) *gomock.Call
SetFrozenStatus indicates an expected call of SetFrozenStatus.
func (*MockProviderMetricsManagerInfMockRecorder) SetJailStatus ¶ added in v4.1.0
func (mr *MockProviderMetricsManagerInfMockRecorder) SetJailStatus(arg0, arg1 any) *gomock.Call
SetJailStatus indicates an expected call of SetJailStatus.
func (*MockProviderMetricsManagerInfMockRecorder) SetJailedCount ¶ added in v4.1.0
func (mr *MockProviderMetricsManagerInfMockRecorder) SetJailedCount(arg0, arg1 any) *gomock.Call
SetJailedCount indicates an expected call of SetJailedCount.
type MockProviderPairingStatusStateQueryInf ¶ added in v4.1.0
type MockProviderPairingStatusStateQueryInf struct {
// contains filtered or unexported fields
}
MockProviderPairingStatusStateQueryInf is a mock of ProviderPairingStatusStateQueryInf interface.
func NewMockProviderPairingStatusStateQueryInf ¶ added in v4.1.0
func NewMockProviderPairingStatusStateQueryInf(ctrl *gomock.Controller) *MockProviderPairingStatusStateQueryInf
NewMockProviderPairingStatusStateQueryInf creates a new mock instance.
func (*MockProviderPairingStatusStateQueryInf) EXPECT ¶ added in v4.1.0
func (m *MockProviderPairingStatusStateQueryInf) EXPECT() *MockProviderPairingStatusStateQueryInfMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockProviderPairingStatusStateQueryInf) GetPairingQueryClient ¶ added in v4.1.4
func (m *MockProviderPairingStatusStateQueryInf) GetPairingQueryClient() ProviderPairingStatusStateQueryInf
func (*MockProviderPairingStatusStateQueryInf) Provider ¶ added in v4.1.0
func (m *MockProviderPairingStatusStateQueryInf) Provider(ctx context.Context, in *types.QueryProviderRequest, opts ...grpc.CallOption) (*types.QueryProviderResponse, error)
Provider mocks base method.
type MockProviderPairingStatusStateQueryInfMockRecorder ¶ added in v4.1.0
type MockProviderPairingStatusStateQueryInfMockRecorder struct {
// contains filtered or unexported fields
}
MockProviderPairingStatusStateQueryInfMockRecorder is the mock recorder for MockProviderPairingStatusStateQueryInf.
type PairingUpdatable ¶
type PairingUpdatable interface {
UpdateEpoch(epoch uint64)
}
type PairingUpdater ¶
type PairingUpdater struct {
// contains filtered or unexported fields
}
func NewPairingUpdater ¶
func NewPairingUpdater(stateQuery ConsumerStateQueryInf, specId string) *PairingUpdater
func (*PairingUpdater) RegisterPairing ¶
func (pu *PairingUpdater) RegisterPairing(ctx context.Context, consumerSessionManager ConsumerSessionManagerInf, staticProviders []*lavasession.RPCProviderEndpoint) error
func (*PairingUpdater) RegisterPairingUpdatable ¶
func (pu *PairingUpdater) RegisterPairingUpdatable(ctx context.Context, pairingUpdatable *PairingUpdatable) error
func (*PairingUpdater) Reset ¶
func (pu *PairingUpdater) Reset(latestBlock int64)
func (*PairingUpdater) Update ¶
func (pu *PairingUpdater) Update(latestBlock int64)
func (*PairingUpdater) UpdaterKey ¶
func (pu *PairingUpdater) UpdaterKey() string
type PaymentUpdatable ¶
type PaymentUpdatable interface { PaymentHandler(*rewardserver.PaymentRequest) Description() string }
type PaymentUpdater ¶
type PaymentUpdater struct {
// contains filtered or unexported fields
}
func NewPaymentUpdater ¶
func NewPaymentUpdater(eventTracker *EventTracker) *PaymentUpdater
func (*PaymentUpdater) RegisterPaymentUpdatable ¶
func (pu *PaymentUpdater) RegisterPaymentUpdatable(ctx context.Context, paymentUpdatable *PaymentUpdatable)
func (*PaymentUpdater) Reset ¶
func (pu *PaymentUpdater) Reset(latestBlock int64)
func (*PaymentUpdater) Update ¶
func (pu *PaymentUpdater) Update(latestBlock int64)
func (*PaymentUpdater) UpdaterKey ¶
func (pu *PaymentUpdater) UpdaterKey() string
type PolicyFetcher ¶
type PolicySetter ¶
type PolicyUpdater ¶
type PolicyUpdater struct {
// contains filtered or unexported fields
}
func NewPolicyUpdater ¶
func NewPolicyUpdater(chainId string, policyFetcher PolicyFetcher, consumerAddress string, policyUpdatable PolicySetter, endpoint lavasession.RPCEndpoint) *PolicyUpdater
func (*PolicyUpdater) AddPolicySetter ¶
func (pu *PolicyUpdater) AddPolicySetter(policyUpdatable PolicySetter, endpoint lavasession.RPCEndpoint) error
func (*PolicyUpdater) UpdateEpoch ¶
func (pu *PolicyUpdater) UpdateEpoch(epoch uint64)
func (*PolicyUpdater) UpdaterKey ¶
func (pu *PolicyUpdater) UpdaterKey() string
type ProtocolVersionResponse ¶
type ProtocolVersionResponse struct { Version *protocoltypes.Version BlockNumber string }
type ProviderFreezeJailUpdater ¶ added in v4.1.0
type ProviderFreezeJailUpdater struct {
// contains filtered or unexported fields
}
func NewProviderFreezeJailUpdater ¶ added in v4.1.0
func NewProviderFreezeJailUpdater( querier ProviderPairingStatusStateQueryInf, publicAddress string, metricsManager ProviderMetricsManagerInf, ) *ProviderFreezeJailUpdater
func (*ProviderFreezeJailUpdater) UpdateEpoch ¶ added in v4.1.0
func (pfu *ProviderFreezeJailUpdater) UpdateEpoch(epoch uint64)
type ProviderMetricsManagerInf ¶ added in v4.1.0
type ProviderPairingStatusStateQueryInf ¶ added in v4.1.0
type ProviderPairingStatusStateQueryInf interface {
Provider(ctx context.Context, in *pairingtypes.QueryProviderRequest, opts ...grpc.CallOption) (*pairingtypes.QueryProviderResponse, error)
}
type ProviderQueryGetter ¶ added in v4.1.4
type ProviderQueryGetter interface {
GetPairingQueryClient() pairingtypes.QueryClient
}
type ProviderStateQuery ¶
type ProviderStateQuery struct { *StateQuery EpochStateQuery }
func NewProviderStateQuery ¶
func NewProviderStateQuery(ctx context.Context, stateQueryAccess StateQueryAccessInf) *ProviderStateQuery
func (*ProviderStateQuery) EarliestBlockInMemory ¶
func (psq *ProviderStateQuery) EarliestBlockInMemory(ctx context.Context) (uint64, error)
func (*ProviderStateQuery) GetEpochSize ¶
func (psq *ProviderStateQuery) GetEpochSize(ctx context.Context) (uint64, error)
func (*ProviderStateQuery) GetEpochSizeMultipliedByRecommendedEpochNumToCollectPayment ¶
func (psq *ProviderStateQuery) GetEpochSizeMultipliedByRecommendedEpochNumToCollectPayment(ctx context.Context) (uint64, error)
func (*ProviderStateQuery) GetMaxCuForUser ¶
func (*ProviderStateQuery) GetRecommendedEpochNumToCollectPayment ¶
func (psq *ProviderStateQuery) GetRecommendedEpochNumToCollectPayment(ctx context.Context) (uint64, error)
func (*ProviderStateQuery) VerifyPairing ¶
func (*ProviderStateQuery) VoteEvents ¶
func (psq *ProviderStateQuery) VoteEvents(ctx context.Context, latestBlock int64) (votes []*reliabilitymanager.VoteParams, err error)
type SpecGetter ¶
type SpecUpdatable ¶
type SpecUpdater ¶
type SpecUpdater struct {
// contains filtered or unexported fields
}
func NewSpecUpdater ¶
func NewSpecUpdater(chainId string, specGetter SpecGetter, eventTracker *EventTracker) *SpecUpdater
func (*SpecUpdater) RegisterSpecUpdatable ¶
func (su *SpecUpdater) RegisterSpecUpdatable(ctx context.Context, specUpdatable *SpecUpdatable, endpoint lavasession.RPCEndpoint) error
func (*SpecUpdater) RegisterSpecVerifier ¶
func (su *SpecUpdater) RegisterSpecVerifier(ctx context.Context, specVerifier *SpecVerifier, chainId string) error
func (*SpecUpdater) Reset ¶
func (su *SpecUpdater) Reset(latestBlock int64)
func (*SpecUpdater) Update ¶
func (su *SpecUpdater) Update(latestBlock int64)
func (*SpecUpdater) UpdaterKey ¶
func (su *SpecUpdater) UpdaterKey() string
type SpecVerifier ¶
type StateQuery ¶
type StateQuery struct { ResponsesCache *ristretto.Cache client.TendermintRPC // contains filtered or unexported fields }
func NewStateQuery ¶
func NewStateQuery(ctx context.Context, accessInf StateQueryAccessInf) *StateQuery
func (*StateQuery) GetDowntimeParams ¶
func (csq *StateQuery) GetDowntimeParams(ctx context.Context) (*downtimev1.Params, error)
func (*StateQuery) GetProtocolVersion ¶
func (csq *StateQuery) GetProtocolVersion(ctx context.Context) (*ProtocolVersionResponse, error)
func (*StateQuery) GetSpecQueryClient ¶ added in v4.1.4
func (sq *StateQuery) GetSpecQueryClient() spectypes.QueryClient
func (*StateQuery) Provider ¶ added in v4.1.4
func (sq *StateQuery) Provider(ctx context.Context, in *pairingtypes.QueryProviderRequest, opts ...grpc.CallOption) (*pairingtypes.QueryProviderResponse, error)
func (*StateQuery) UpdateAccess ¶ added in v4.1.4
func (sq *StateQuery) UpdateAccess(accessInf StateQueryAccessInf)
type StateQueryAccessInf ¶ added in v4.1.4
type StateQueryAccessInf interface { grpc1.ClientConn client.TendermintRPC // contains filtered or unexported methods }
type StateQueryAccessInst ¶ added in v4.1.4
type StateQueryAccessInst struct { grpc1.ClientConn client.TendermintRPC // contains filtered or unexported fields }
func NewStateQueryAccessInst ¶ added in v4.1.4
func NewStateQueryAccessInst(clientCtx client.Context) *StateQueryAccessInst
type VersionStateQuery ¶
type VersionStateQuery interface {
GetProtocolVersion(ctx context.Context) (*ProtocolVersionResponse, error)
}
type VersionUpdater ¶
type VersionUpdater struct { Lock sync.RWMutex VersionStateQuery VersionStateQuery LastKnownVersion *ProtocolVersionResponse VersionValidationInf // embedding the interface, this tells: VersionUpdater has ValidateProtocolVersion method // contains filtered or unexported fields }
func NewVersionUpdater ¶
func NewVersionUpdater(versionStateQuery VersionStateQuery, eventTracker *EventTracker, version *protocoltypes.Version, versionValidator VersionValidationInf) *VersionUpdater
func (*VersionUpdater) RegisterVersionUpdatable ¶
func (vu *VersionUpdater) RegisterVersionUpdatable()
func (*VersionUpdater) Reset ¶
func (vu *VersionUpdater) Reset(latestBlock int64)
func (*VersionUpdater) Update ¶
func (vu *VersionUpdater) Update(latestBlock int64)
func (*VersionUpdater) UpdaterKey ¶
func (vu *VersionUpdater) UpdaterKey() string
type VersionValidationInf ¶
type VersionValidationInf interface {
ValidateProtocolVersion(lastKnownVersion *ProtocolVersionResponse) error
}
type VoteUpdatable ¶
type VoteUpdatable interface {
VoteHandler(*reliabilitymanager.VoteParams, uint64) error
}
type VoteUpdater ¶
type VoteUpdater struct {
// contains filtered or unexported fields
}
func NewVoteUpdater ¶
func NewVoteUpdater(eventTracker *EventTracker) *VoteUpdater
func (*VoteUpdater) RegisterVoteUpdatable ¶
func (vu *VoteUpdater) RegisterVoteUpdatable(ctx context.Context, voteUpdatable *VoteUpdatable, endpoint lavasession.RPCEndpoint)
func (*VoteUpdater) Reset ¶
func (vu *VoteUpdater) Reset(latestBlock int64)
func (*VoteUpdater) Update ¶
func (vu *VoteUpdater) Update(latestBlock int64)
func (*VoteUpdater) UpdaterKey ¶
func (vu *VoteUpdater) UpdaterKey() string
Source Files ¶
- downtime_params_updater.go
- epoch_updater.go
- event_tracker.go
- finalization_consensus_updater.go
- metrics_updater.go
- pairing_updater.go
- payment_updater.go
- policy_updater.go
- provider_freeze_jail_updater.go
- provider_freeze_jail_updater_mocks.go
- spec_updater.go
- state_query.go
- updaters_mock.go
- version_updater.go
- vote_updater.go