rewardserver

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsumerRewards

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

func (*ConsumerRewards) PrepareRewardsForClaim

func (csrw *ConsumerRewards) PrepareRewardsForClaim() (retProofs []*pairingtypes.RelaySession, retVRFs []*pairingtypes.VRFData, errRet error)

type EpochRewards

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

type PaymentRequest

type PaymentRequest struct {
	CU                  uint64
	BlockHeightDeadline int64
	Amount              sdk.Coin
	Client              sdk.AccAddress
	UniqueIdentifier    uint64
	Description         string
	ChainID             string
}

func BuildPaymentFromRelayPaymentEvent

func BuildPaymentFromRelayPaymentEvent(event terderminttypes.Event, block int64) (*PaymentRequest, error)

type RewardServer

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

func NewRewardServer

func NewRewardServer(rewardsTxSender RewardsTxSender) *RewardServer

func (*RewardServer) Description

func (rws *RewardServer) Description() string

func (*RewardServer) PaymentHandler

func (rws *RewardServer) PaymentHandler(payment *PaymentRequest)

func (*RewardServer) RemoveExpectedPayment

func (rws *RewardServer) RemoveExpectedPayment(paidCUToFInd uint64, expectedClient sdk.AccAddress, blockHeight int64, uniqueID uint64, chainID string) bool

func (*RewardServer) SendNewDataReliabilityProof added in v0.9.0

func (rws *RewardServer) SendNewDataReliabilityProof(ctx context.Context, dataReliability *pairingtypes.VRFData, epoch uint64, consumerAddr string) (updatedWithProof bool)

func (*RewardServer) SendNewProof

func (rws *RewardServer) SendNewProof(ctx context.Context, proof *pairingtypes.RelaySession, epoch uint64, consumerAddr string) (existingCU uint64, updatedWithProof bool)

func (*RewardServer) SubscribeEnded

func (rws *RewardServer) SubscribeEnded(consumer string, epoch uint64, subscribeID string)

func (*RewardServer) SubscribeStarted

func (rws *RewardServer) SubscribeStarted(consumer string, epoch uint64, subscribeID string)

func (*RewardServer) UpdateEpoch

func (rws *RewardServer) UpdateEpoch(epoch uint64)

type RewardsTxSender

type RewardsTxSender interface {
	TxRelayPayment(ctx context.Context, relayRequests []*pairingtypes.RelaySession, dataReliabilityProofs []*pairingtypes.VRFData, description string) error
	GetEpochSizeMultipliedByRecommendedEpochNumToCollectPayment(ctx context.Context) (uint64, error)
	EarliestBlockInMemory(ctx context.Context) (uint64, error)
}

Jump to

Keyboard shortcuts

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