targets

package
v0.0.0-...-f6e75f2 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2021 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BlockProducer

func BlockProducer(ops types.HTTPOptions, cfg *config.Config, c client.Client)

BlockProducer is to get the proucer counts and checks validator is part of block producer or not and stores in db If the signer address is in result of selected producers then validator is part of it otheriwse no

func BlockTimeDifference

func BlockTimeDifference(ops types.HTTPOptions, cfg *config.Config, c client.Client)

BlockTimeDifference is to calcualte block time difference of prev block and current block and stores in db

func BorCurrentProposer

func BorCurrentProposer(ops types.HTTPOptions, cfg *config.Config, c client.Client)

BorCurrentProposer is to get current proposer and counts blocks proposed count and stores it in db Block proposed count will be calculated if the signer address exists in proposer result

func BorLatestSpan

func BorLatestSpan(ops types.HTTPOptions, cfg *config.Config, c client.Client)

BorLatestSpan is to get latest span id, also calcualtes span validator count and stores it in db Span validator count will be inceremented if the signer address is in validator set

func BorMissedBlocks

func BorMissedBlocks(ops types.HTTPOptions, cfg *config.Config, c client.Client)

BorMissedBlocks is to get the current block precommits and checks whether the validator is signed the block or not if not signed then it will be considered as missed block and stores it in db Alerter will notify when the missed blocks count reaches to the configured threshold

func BorNetworkHeight

func BorNetworkHeight(ops types.HTTPOptions, cfg *config.Config, c client.Client)

BorNetworkHeight is to get the network height of bor and stores in db Alerter will notify whenever bock diff of network and validator reaches configured threshold

func BorParams

func BorParams(ops types.HTTPOptions, cfg *config.Config, c client.Client)

BorParams is to get span duration, producer count and stores it in db

func BorPendingTransactions

func BorPendingTransactions(ops types.HTTPOptions, cfg *config.Config, c client.Client)

BorPendingTransactions is to get the pending transactions of bor and stores in db

func CheckValidatorDeposited

func CheckValidatorDeposited(proposalID string, cfg *config.Config, c client.Client) string

CheckValidatorDeposited is to check validator deposited for the proposal or not and returns the status

func CheckValidatorVoted

func CheckValidatorVoted(proposalID string, cfg *config.Config, c client.Client) string

CheckValidatorVoted is to check validator voted for the proposal or not and returns the status

func CheckpointsDuration

func CheckpointsDuration(ops types.HTTPOptions, cfg *config.Config, c client.Client)

CheckpointsDuration is to get checkpoints duration and stores in db

func ContractAddress

func ContractAddress(ops types.HTTPOptions, cfg *config.Config, c client.Client)

ContractAddress is to get the validator share contract address, self stake and stores it in db

func CurrentBlockNumber

func CurrentBlockNumber(ops types.HTTPOptions, cfg *config.Config, c client.Client)

CurrentBlockNumber is to get the bor current height and stores it in db

func CurrentEthBalance

func CurrentEthBalance(ops types.HTTPOptions, cfg *config.Config, c client.Client)

CurrentEthBalance is to query the eth_getBalance and stores the current balance in db Alerter will alerts if the current balance reaches the configure threshold

func DeleteDepoitEndProposals

func DeleteDepoitEndProposals(cfg *config.Config, c client.Client, p types.Proposals) error

DeleteDepoitEndProposals is to delete proposals from db which are not present in response anymore

func EthCall

func EthCall(ops types.HTTPOptions, cfg *config.Config, c client.Client, dataHash string, contractAddress string) (eth types.EthResult)

EthCall will returns the validator share contract method response

func GetAccountBal

func GetAccountBal(cfg *config.Config, c client.Client) string

GetAccountBal returns balance of the corresponding account

func GetAccountBalFromDb

func GetAccountBalFromDb(cfg *config.Config, c client.Client) string

GetAccountBalFromDb returns account balance from db

func GetAccountBalWithDenomFromdb

func GetAccountBalWithDenomFromdb(cfg *config.Config, c client.Client) string

GetAccountBalWithDenomFromdb returns account balance from db

func GetBlocksProducedCountFromDB

func GetBlocksProducedCountFromDB(cfg *config.Config, c client.Client) string

GetBlocksProducedCountFromDB returns the no of blocks produced from db

func GetBorBalanceFromDB

func GetBorBalanceFromDB(cfg *config.Config, c client.Client) string

GetBorBalanceFRomDB returns bor validator balance from db

func GetBorContinuousMissedBlock

func GetBorContinuousMissedBlock(cfg *config.Config, c client.Client) string

GetContinuousMissedBlock returns the latest missed block from db

func GetBorCurrentBlokHeight

func GetBorCurrentBlokHeight(cfg *config.Config, c client.Client) string

GetBorCurrentBlokHeight returns current block height of bor from db

func GetBorCurrentBlokHeightInHex

func GetBorCurrentBlokHeightInHex(cfg *config.Config, c client.Client) string

GetBorCurrentBlokHeightInHex returns current block height of bor from db

func GetBorSpanIDFromDb

func GetBorSpanIDFromDb(cfg *config.Config, c client.Client) string

GetBorSpanIDFromDb returns the span ID from db

func GetBorSpanValidatorCountFromDb

func GetBorSpanValidatorCountFromDb(cfg *config.Config, c client.Client) string

GetBorSpanValidatorCountFromDb returns the span val count from the db

func GetBorlatestCurrentHeightFromDB

func GetBorlatestCurrentHeightFromDB(cfg *config.Config, c client.Client) string

GetlatestCurrentHeightFromDB returns latest current height from db

func GetCommissionRate

func GetCommissionRate(ops types.HTTPOptions, cfg *config.Config, c client.Client)

GetCommissionRate is to get the commission rate by calling method commissionRate() of validator share contract

func GetContinuousMissedBlock

func GetContinuousMissedBlock(cfg *config.Config, c client.Client) string

GetContinuousMissedBlock returns the latest missed block from the db

func GetEncodedData

func GetEncodedData(ops types.HTTPOptions, cfg *config.Config, c client.Client, methodSignature string) string

GetEncodedData returns the sha3Hash which will be calculated for the partcular method signature and by making a call of web3_sha3

func GetHelp

func GetHelp() string

GetHelp returns the msg to show for /help

func GetLastProposedCheckpoint

func GetLastProposedCheckpoint(cfg *config.Config, c client.Client) string

GetLastProposedCheckpoint returns the last proposed checkpoint from db

func GetLatestCheckPoint

func GetLatestCheckPoint(cfg *config.Config, c client.Client) string

GetLatestCheckPoint returns the latest checkpoint from db

func GetNetworkBlock

func GetNetworkBlock(cfg *config.Config, c client.Client) string

GetNetworkBlock returns network current block height

func GetNodeSync

func GetNodeSync(cfg *config.Config, c client.Client) string

GetNodeSync returns the syncing status of a node from db

func GetPeersCount

func GetPeersCount(cfg *config.Config, c client.Client) string

GetPeersCount returns count of peer addresses from db

func GetPeersCountMsg

func GetPeersCountMsg(cfg *config.Config, c client.Client) string

GetPeersCountMsg returns the no of peers for /peers

func GetPrevBlockTime

func GetPrevBlockTime(cfg *config.Config, c client.Client, height string) string

GetPrevBlockTime returns time of the pevious block

func GetProposalsVotes

func GetProposalsVotes(proposalID string, cfg *config.Config) (types.ProposalVoters, error)

GetProposalsVotes which returns votes of a proposal

func GetProposedCount

func GetProposedCount(cfg *config.Config, c client.Client) string

GetProposedCount returns the count of proposed checkpoints from db

func GetStatus

func GetStatus(cfg *config.Config, c client.Client) string

GetStatus returns the status messages for /status

func GetValContractAddress

func GetValContractAddress(cfg *config.Config, c client.Client) string

GetValContractAddress returns validator share contract address from db

func GetValID

func GetValID(cfg *config.Config, c client.Client) string

GetValID returns ID of the validator from db

func GetValStatusFromDB

func GetValStatusFromDB(cfg *config.Config, c client.Client) string

GetValStatusFromDB returns latest current height from db

func GetValidatorBlock

func GetValidatorBlock(cfg *config.Config, c client.Client) string

GetValidatorBlock returns validator current block height from db

func GetValidatorRewards

func GetValidatorRewards(ops types.HTTPOptions, cfg *config.Config, c client.Client)

GetValidatorRewards is to get the rewards by calling method validatorRewards() of validator share contract

func GetVotesProposalAlertsCount

func GetVotesProposalAlertsCount(cfg *config.Config, c client.Client, proposalID string) string

GetVotesProposalAlertsCount returns the count of voting period alerts for particular proposal

func GetVotingPowerFromDb

func GetVotingPowerFromDb(cfg *config.Config, c client.Client) string

GetVotingPowerFromDb returns voting power of a validator from db

func GetlatestCurrentHeightFromDB

func GetlatestCurrentHeightFromDB(cfg *config.Config, c client.Client) string

GetlatestCurrentHeightFromDB returns latest current height from db

func HeimdallCurrentBal

func HeimdallCurrentBal(ops types.HTTPOptions, cfg *config.Config, c client.Client)

HeimdallCurrentBal is to get current balance information using signer address and stores it in db Alerter will alerts whenever there is a change in balance

func HitHTTPTarget

func HitHTTPTarget(ops types.HTTPOptions) (*types.PingResp, error)

HitHTTPTarget to hit the target and get response

func InitTargets

func InitTargets(cfg *config.Config) *types.Targets

InitTargets which returns the targets can write all the endpoints here

func LatestCheckpoints

func LatestCheckpoints(ops types.HTTPOptions, cfg *config.Config, c client.Client)

LatestCheckpoints is to get latest check point and stores in db

func LatestProposedBlockAndTime

func LatestProposedBlockAndTime(ops types.HTTPOptions, cfg *config.Config, c client.Client)

LatestProposedBlockAndTime is to get latest proposed block height, time and checks whether the validator hex address is equals to proposals address if yes then stores in it db Also stores latest block height and chain id in db

func MissedBlocks

func MissedBlocks(ops types.HTTPOptions, cfg *config.Config, c client.Client)

MissedBlocks is to get the current block precommits and checks whether the validator is signed the block or not if not signed then it will be considered as missed block and stores it in db Alerter will notify when the missed blocks count reaches to the configured threshold

func NetInfo

func NetInfo(ops types.HTTPOptions, cfg *config.Config, c client.Client)

NetInfo is to get no.of peers, addresses and also calculates it's alatency and stores it in db

func NetworkLatestBlock

func NetworkLatestBlock(ops types.HTTPOptions, cfg *config.Config, c client.Client)

NetworkLatestBlock is to get latest block height of a network Calcualtes height difference of validator and network height and stores it in db Alerter will alerts when the block diff thresholds meets the height diff

func NewRunner

func NewRunner() *targetRunner

NewRunner returns targetRunner

func NodeStatus

func NodeStatus(cfg *config.Config, c client.Client) string

NodeStatus returns the node caught up status /node

func NodeVersion

func NodeVersion(ops types.HTTPOptions, cfg *config.Config, c client.Client)

NodeVersion is to get application version and stores in db

func PeerLatency

func PeerLatency(_ types.HTTPOptions, cfg *config.Config, c client.Client) error

PeerLatency is to calculate latency of a peer address and stores it in db

func Proposals

func Proposals(ops types.HTTPOptions, cfg *config.Config, c client.Client)

Proposals is to get all the proposals and stores it in db Alerter will send alerts if there is any new proposal or any change in proposal status

func ProposedCheckpoints

func ProposedCheckpoints(ops types.HTTPOptions, cfg *config.Config, c client.Client)

ProposedCheckpoints is to get proposed checkpoint, counts no of proposed checkpoints by validator and stores in db

func SendBorSingleMissedBlockAlert

func SendBorSingleMissedBlockAlert(ops types.HTTPOptions, cfg *config.Config, c client.Client, cbh string) error

SendSingleMissedBlockAlert is to send signle missed block alerts and stores it in db

func SendSingleMissedBlockAlert

func SendSingleMissedBlockAlert(ops types.HTTPOptions, cfg *config.Config, c client.Client, cbh string) error

SendSingleMissedBlockAlert is to alert about single missed block if threshold value is 1 and also stores it in db

func SendVotingPeriodProposalAlerts

func SendVotingPeriodProposalAlerts(cfg *config.Config, c client.Client) error

SendVotingPeriodProposalAlerts which send alerts of voting period proposals

func Status

func Status(ops types.HTTPOptions, cfg *config.Config, c client.Client)

Status is to get response from rpc /status endpoint and stores node status block height and operator info Alerter will notify about the node status i.e., validator instance is running or not by checking status resonse

func TelegramAlerting

func TelegramAlerting(ops types.HTTPOptions, cfg *config.Config, c client.Client)

TelegramAlerting will check for the commands from the configured telegram account If any commands are given in the tg account then Alerter will send the response back according to the input

func TotalCheckPointsCount

func TotalCheckPointsCount(ops types.HTTPOptions, cfg *config.Config, c client.Client)

TotalCheckPointsCount is to get total no of check points and stores in db

func UnconfimedTxns

func UnconfimedTxns(ops types.HTTPOptions, cfg *config.Config, c client.Client)

UnconfimedTxns is to get the no of uncofirmed txns and stores it in db

func ValidatorCaughtUp

func ValidatorCaughtUp(ops types.HTTPOptions, cfg *config.Config, c client.Client)

ValidatorCaughtUp is to get validator syncing status and stores it in db Alerter will alerts when the node is not synced

func ValidatorGas

func ValidatorGas(ops types.HTTPOptions, cfg *config.Config, c client.Client)

ValidatorGas is to get validator max tx gas and stores in db

func ValidatorStatusAlert

func ValidatorStatusAlert(ops types.HTTPOptions, cfg *config.Config, c client.Client)

ValidatorStatusAlert will checks whether the validator is voting or jailed Alerter will send alerts according to the timings of regualr status alerting configured in config.toml

func ValidatorVotingPower

func ValidatorVotingPower(ops types.HTTPOptions, cfg *config.Config, c client.Client)

ValidatorVotingPower is to get voting power of a validator and stores it in db Alerter will notify if there is any change in voting power

Types

This section is empty.

Jump to

Keyboard shortcuts

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