collector

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2020 License: LGPL-3.0 Imports: 5 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddActivationTxBalanceTransfer

func AddActivationTxBalanceTransfer(c StatsCollector, tx *types.Transaction, amount *big.Int)

func AddBurnTxBurntCoins

func AddBurnTxBurntCoins(c StatsCollector, addr common.Address, tx *types.Transaction)

func AddFeeBurntCoins

func AddFeeBurntCoins(c StatsCollector, addr common.Address, feeAmount *big.Int, burntRate float32,
	tx *types.Transaction)

func AddFinalCommitteeReward

func AddFinalCommitteeReward(c StatsCollector, addr common.Address, balance *big.Int, stake *big.Int)

func AddFlipsReward

func AddFlipsReward(c StatsCollector, addr common.Address, balance *big.Int, stake *big.Int,
	rewardedStrongFlipCids [][]byte, rewardedWeakFlipCids [][]byte)

func AddFoundationPayout

func AddFoundationPayout(c StatsCollector, addr common.Address, balance *big.Int)

func AddInvitationsReward

func AddInvitationsReward(c StatsCollector, addr common.Address, balance *big.Int, stake *big.Int, age uint16,
	txHash *common.Hash, isSavedInviteWinner bool)

func AddInviteBurntCoins

func AddInviteBurntCoins(c StatsCollector, addr common.Address, amount *big.Int, tx *types.Transaction)

func AddKillInviteeTxStakeTransfer

func AddKillInviteeTxStakeTransfer(c StatsCollector, tx *types.Transaction, amount *big.Int)

func AddKillTxStakeTransfer

func AddKillTxStakeTransfer(c StatsCollector, tx *types.Transaction, amount *big.Int)

func AddKilledBurntCoins

func AddKilledBurntCoins(c StatsCollector, addr common.Address, amount *big.Int)

func AddMintedCoins

func AddMintedCoins(c StatsCollector, amount *big.Int)

func AddPenaltyBurntCoins

func AddPenaltyBurntCoins(c StatsCollector, addr common.Address, amount *big.Int)

func AddProposerReward

func AddProposerReward(c StatsCollector, addr common.Address, balance *big.Int, stake *big.Int)

func AddValidationReward

func AddValidationReward(c StatsCollector, addr common.Address, age uint16, balance *big.Int, stake *big.Int)

func AddZeroWalletFund

func AddZeroWalletFund(c StatsCollector, addr common.Address, balance *big.Int)

func AfterAddStake

func AfterAddStake(c StatsCollector, addr common.Address, amount *big.Int, appState *appstate.AppState)

func AfterSubPenalty

func AfterSubPenalty(c StatsCollector, addr common.Address, amount *big.Int, appState *appstate.AppState)

func BeforeClearPenalty

func BeforeClearPenalty(c StatsCollector, addr common.Address, appState *appstate.AppState)

func BeforeSetPenalty

func BeforeSetPenalty(c StatsCollector, addr common.Address, appState *appstate.AppState)

func BeginCommitteeRewardBalanceUpdate added in v0.20.0

func BeginCommitteeRewardBalanceUpdate(c StatsCollector, addr common.Address, appState *appstate.AppState)

func BeginDustClearingBalanceUpdate added in v0.20.0

func BeginDustClearingBalanceUpdate(c StatsCollector, addr common.Address, appState *appstate.AppState)

func BeginEpochPenaltyResetBalanceUpdate added in v0.20.0

func BeginEpochPenaltyResetBalanceUpdate(c StatsCollector, addr common.Address, appState *appstate.AppState)

func BeginEpochRewardBalanceUpdate added in v0.20.0

func BeginEpochRewardBalanceUpdate(c StatsCollector, addr common.Address, appState *appstate.AppState)

func BeginFailedValidationBalanceUpdate added in v0.20.0

func BeginFailedValidationBalanceUpdate(c StatsCollector, addr common.Address, appState *appstate.AppState)

func BeginPenaltyBalanceUpdate added in v0.20.0

func BeginPenaltyBalanceUpdate(c StatsCollector, addr common.Address, appState *appstate.AppState)

func BeginProposerRewardBalanceUpdate added in v0.20.0

func BeginProposerRewardBalanceUpdate(c StatsCollector, addr common.Address, appState *appstate.AppState)

func BeginTxBalanceUpdate added in v0.20.0

func BeginTxBalanceUpdate(c StatsCollector, tx *types.Transaction, appState *appstate.AppState)

func BeginVerifiedStakeTransferBalanceUpdate added in v0.20.0

func BeginVerifiedStakeTransferBalanceUpdate(c StatsCollector, addr common.Address, appState *appstate.AppState)

func CompleteBalanceUpdate added in v0.20.0

func CompleteBalanceUpdate(c StatsCollector, appState *appstate.AppState)

func SetCommitteeRewardShare added in v0.20.0

func SetCommitteeRewardShare(c StatsCollector, amount *big.Int)

func SetMinScoreForInvite

func SetMinScoreForInvite(c StatsCollector, score float32)

func SetTotalFlipsReward

func SetTotalFlipsReward(c StatsCollector, amount *big.Int, share *big.Int)

func SetTotalFoundationPayouts

func SetTotalFoundationPayouts(c StatsCollector, amount *big.Int)

func SetTotalInvitationsReward

func SetTotalInvitationsReward(c StatsCollector, amount *big.Int, share *big.Int)

func SetTotalReward

func SetTotalReward(c StatsCollector, amount *big.Int)

func SetTotalValidationReward

func SetTotalValidationReward(c StatsCollector, amount *big.Int, share *big.Int)

func SetTotalZeroWalletFund

func SetTotalZeroWalletFund(c StatsCollector, amount *big.Int)

func SetValidation

func SetValidation(c StatsCollector, validation *statsTypes.ValidationStats)

func SetValidationResults added in v0.20.0

func SetValidationResults(c StatsCollector, validationResults *types.ValidationResults)

Types

type StatsCollector

type StatsCollector interface {
	EnableCollecting()
	CompleteCollecting()

	SetValidation(validation *statsTypes.ValidationStats)
	SetMinScoreForInvite(score float32)

	SetValidationResults(authors *types.ValidationResults)

	SetTotalReward(amount *big.Int)
	SetTotalValidationReward(amount *big.Int, share *big.Int)
	SetTotalFlipsReward(amount *big.Int, share *big.Int)
	SetTotalInvitationsReward(amount *big.Int, share *big.Int)
	SetTotalFoundationPayouts(amount *big.Int)
	SetTotalZeroWalletFund(amount *big.Int)
	AddValidationReward(addr common.Address, age uint16, balance *big.Int, stake *big.Int)
	AddFlipsReward(addr common.Address, balance *big.Int, stake *big.Int, rewardedStrongFlipCids [][]byte,
		rewardedWeakFlipCids [][]byte)
	AddInvitationsReward(addr common.Address, balance *big.Int, stake *big.Int, age uint16, txHash *common.Hash,
		isSavedInviteWinner bool)
	AddFoundationPayout(addr common.Address, balance *big.Int)
	AddZeroWalletFund(addr common.Address, balance *big.Int)

	AddProposerReward(addr common.Address, balance *big.Int, stake *big.Int)
	AddFinalCommitteeReward(addr common.Address, balance *big.Int, stake *big.Int)

	AfterSubPenalty(addr common.Address, amount *big.Int, appState *appstate.AppState)
	BeforeClearPenalty(addr common.Address, appState *appstate.AppState)
	BeforeSetPenalty(addr common.Address, appState *appstate.AppState)

	AddMintedCoins(amount *big.Int)
	AddPenaltyBurntCoins(addr common.Address, amount *big.Int)
	AddInviteBurntCoins(addr common.Address, amount *big.Int, tx *types.Transaction)
	AddFeeBurntCoins(addr common.Address, feeAmount *big.Int, burntRate float32, tx *types.Transaction)
	AddKilledBurntCoins(addr common.Address, amount *big.Int)
	AddBurnTxBurntCoins(addr common.Address, tx *types.Transaction)

	AfterAddStake(addr common.Address, amount *big.Int, appState *appstate.AppState)

	AddActivationTxBalanceTransfer(tx *types.Transaction, amount *big.Int)
	AddKillTxStakeTransfer(tx *types.Transaction, amount *big.Int)
	AddKillInviteeTxStakeTransfer(tx *types.Transaction, amount *big.Int)

	BeginVerifiedStakeTransferBalanceUpdate(addr common.Address, appState *appstate.AppState)
	BeginTxBalanceUpdate(tx *types.Transaction, appState *appstate.AppState)
	BeginProposerRewardBalanceUpdate(addr common.Address, appState *appstate.AppState)
	BeginCommitteeRewardBalanceUpdate(addr common.Address, appState *appstate.AppState)
	BeginEpochRewardBalanceUpdate(addr common.Address, appState *appstate.AppState)
	BeginFailedValidationBalanceUpdate(addr common.Address, appState *appstate.AppState)
	BeginPenaltyBalanceUpdate(addr common.Address, appState *appstate.AppState)
	BeginEpochPenaltyResetBalanceUpdate(addr common.Address, appState *appstate.AppState)
	BeginDustClearingBalanceUpdate(addr common.Address, appState *appstate.AppState)
	CompleteBalanceUpdate(appState *appstate.AppState)

	SetCommitteeRewardShare(amount *big.Int)
}

func NewStatsCollector

func NewStatsCollector() StatsCollector

Jump to

Keyboard shortcuts

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