blockchain

package
v0.0.0-...-134943b Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const BlockChainRpc = "https://evmrpc-test-us.0g.ai"
View Source
const ValidatorFile = "data/validator_rpcs.csv"

Variables

This section is empty.

Functions

func FindMaxBlockHeight

func FindMaxBlockHeight(nodes []*Node) uint64

func Monitor

func Monitor(config Config)

func MustMonitorFromViper

func MustMonitorFromViper()

Types

type BlockchainHeightHealth

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

func (*BlockchainHeightHealth) Update

func (bhh *BlockchainHeightHealth) Update(config health.TimedCounterConfig, height uint64)

type Config

type Config struct {
	Nodes                  map[string]string
	Interval               time.Duration `default:"60s"`
	AvailabilityReport     health.TimedCounterConfig
	NodeHeightReport       HeightReportConfig
	BlockchainHeightReport health.TimedCounterConfig
	Validators             map[string]string
	ValidatorReport        health.TimedCounterConfig
	PrivateKey             string
	CosmosRPC              string `default:"https://cosmosrpc-test.0g.ai/"`
}

type HeightReportConfig

type HeightReportConfig struct {
	health.TimedCounterConfig

	MaxGap uint64 `default:"30"`
}

type Node

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

func MustNewNode

func MustNewNode(name, urlstr string) *Node

func (*Node) CheckHeight

func (node *Node) CheckHeight(config *HeightReportConfig, target uint64)

func (*Node) UpdateHeight

func (node *Node) UpdateHeight(config health.TimedCounterConfig)

type Validator

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

func MustNewValidator

func MustNewValidator(url *url.URL, name, address string) *Validator

func NewValidator

func NewValidator(url *url.URL, name, address string) (*Validator, error)

func (*Validator) CheckStatusSilence

func (validator *Validator) CheckStatusSilence()

func (Validator) String

func (validator Validator) String() string

func (*Validator) Update

func (validator *Validator) Update(config health.TimedCounterConfig)

Jump to

Keyboard shortcuts

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