Documentation
¶
Index ¶
- Variables
- func ComposeUrl(ip, port, path string) string
- func EthFetchBlockReceiptStatus(url string, height uint64) (map[string]bool, error)
- func EthFetchTxReceiptStatus(url string, txHash string) (uint64, error)
- func IsValidatorJailed(url string) (bool, error)
- func Monitor(config Config)
- func MustMonitorFromViper()
- type BlockInfo
- type BlockTxInfo
- type Config
- type Consensus
- type GrowChecker
- type MempoolMonitorConfig
- type Node
- func (node *Node) CheckFork(recordor map[uint64]string)
- func (node *Node) CheckHeight(height, threshold uint64, config health.TimedCounterConfig)
- func (node *Node) FetchBlockReceiptStatus(config health.TimedCounterConfig, height uint64) (map[string]bool, error)
- func (node *Node) FetchTxReceiptStatus(config health.TimedCounterConfig, txHash string) (bool, error)
- func (node *Node) UpdateHeight(maxGap uint64, commonCfg, criticalCfg health.TimedCounterConfig)
- type Validator
- type ValidatorMonitorConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var ( EthRpcPort = "8545" CosmosRpcPort = "26657" CosmosRestPort = "1317" CometbftRpcPort = "26657" )
View Source
var (
ErrorNotSuccess = errors.New("Error: Not success")
)
Functions ¶
func ComposeUrl ¶
func EthFetchTxReceiptStatus ¶
func IsValidatorJailed ¶
func MustMonitorFromViper ¶
func MustMonitorFromViper()
Types ¶
type BlockInfo ¶
func EthGetLatestBlockInfo ¶
type BlockTxInfo ¶
type Config ¶
type Config struct { Nodes map[string]string MempoolInterval int `default:"1"` NodeInterval int `default:"3"` ValidatorInterval int `default:"15"` BlockBehindThreshold uint64 `default:"10"` BlockGapThreshold uint64 `default:"30"` Validators map[string]string MempoolCfg MempoolMonitorConfig ValidatorCfg ValidatorMonitorConfig CosmosRPC string `default:"https://127.0.0.1:26657"` CosmosRest string `default:"http://127.0.0.1:1317"` CometbftRPC string `default:"http://127.0.0.1:26657"` BlockTxCntLimit int `default:"100"` FailedTxCntAlarmThreshold int `default:"2"` Mode string `default:"localtest"` CommonEvtReportCfg health.TimedCounterConfig CriticalEvtReportCfg health.TimedCounterConfig }
type Consensus ¶
type Consensus struct {
// contains filtered or unexported fields
}
func MustNewConsensus ¶
func MustNewConsensus(urlstr string, commonCfg health.TimedCounterConfig) *Consensus
func (*Consensus) GetBlockValidatorCnt ¶
func (*Consensus) UpdateUncommitTxCnt ¶
type GrowChecker ¶
type GrowChecker struct {
// contains filtered or unexported fields
}
func MustNewGrowChecker ¶
func MustNewGrowChecker(healthCfg health.TimedCounterConfig) *GrowChecker
func (*GrowChecker) Check ¶
func (hc *GrowChecker) Check(height uint64)
type MempoolMonitorConfig ¶
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
func FindMaxBlockHeight ¶
func MustNewNode ¶
func (*Node) CheckHeight ¶
func (node *Node) CheckHeight(height, threshold uint64, config health.TimedCounterConfig)
func (*Node) FetchBlockReceiptStatus ¶
func (*Node) FetchTxReceiptStatus ¶
func (*Node) UpdateHeight ¶
func (node *Node) UpdateHeight(maxGap uint64, commonCfg, criticalCfg health.TimedCounterConfig)
type Validator ¶
type Validator struct {
// contains filtered or unexported fields
}
func MustNewValidator ¶
func NewValidator ¶
func (*Validator) CheckStatusSilence ¶
func (validator *Validator) CheckStatusSilence()
type ValidatorMonitorConfig ¶
Click to show internal directories.
Click to hide internal directories.