relaymonitor

package
v1.0.24 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: GPL-3.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	LoggingLevel string  `yaml:"logging" default:"info"`
	MetricsAddr  string  `yaml:"metricsAddr" default:":9090"`
	PProfAddr    *string `yaml:"pprofAddr"`
	ProbeAddr    *string `yaml:"probeAddr"`

	// The name of the mimicry
	Name string `yaml:"name"`

	// Ethereum configuration
	Ethereum ethereum.Config `yaml:"ethereum"`

	// Outputs configuration
	Outputs []output.Config `yaml:"outputs"`

	// Labels configures the mimicry with labels
	Labels map[string]string `yaml:"labels"`

	// NTP Server to use for clock drift correction
	NTPServer string `yaml:"ntpServer" default:"time.google.com"`

	Schedule Schedule `yaml:"schedule"`

	Relays []relay.Config `yaml:"relays"`

	FetchProposerPayloadDelivered bool `yaml:"fetchProposerPayloadDelivered" default:"true"`

	ValidatorRegistrations registrations.Config `yaml:"validatorRegistrations"`
}

func (*Config) ApplyOverrides added in v1.0.15

func (c *Config) ApplyOverrides(o *Override, log logrus.FieldLogger) error

ApplyOverrides applies any overrides to the config.

func (*Config) CreateSinks

func (c *Config) CreateSinks(log logrus.FieldLogger) ([]output.Sink, error)

func (*Config) Validate

func (c *Config) Validate() error

type DuplicateBidCache

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

DuplicateBidCache is a cache to store information about whether a relay has seen a block for a specific slot and block hash

func NewDuplicateBidCache

func NewDuplicateBidCache(ttl time.Duration) *DuplicateBidCache

NewDuplicateBidCache creates a new DuplicateBidCache with a specified TTL

func (*DuplicateBidCache) Has

func (dc *DuplicateBidCache) Has(relay string, slot phase0.Slot, blockHash string) bool

Has checks if a block hash has been seen for a specific relay and slot

func (*DuplicateBidCache) Set

func (dc *DuplicateBidCache) Set(relay string, slot phase0.Slot, blockHash string)

Set marks a block hash as seen for a specific relay and slot

type Metrics

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

func NewMetrics

func NewMetrics(namespace, networkName string) *Metrics

func (*Metrics) AddDecoratedEvent

func (m *Metrics) AddDecoratedEvent(count int, eventType string)

type Override added in v1.0.15

type Override struct {
	MetricsAddr struct {
		Enabled bool
		Value   string
	}
}

Override is the set of overrides for the relay monitor command.

type RelayMonitor

type RelayMonitor struct {
	Config *Config
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, log logrus.FieldLogger, config *Config, overrides *Override) (*RelayMonitor, error)

func (*RelayMonitor) ServeMetrics

func (r *RelayMonitor) ServeMetrics(ctx context.Context) error

func (*RelayMonitor) ServePProf

func (r *RelayMonitor) ServePProf(ctx context.Context) error

func (*RelayMonitor) ServeProbe

func (r *RelayMonitor) ServeProbe(ctx context.Context) error

func (*RelayMonitor) Start

func (r *RelayMonitor) Start(ctx context.Context) error

type Schedule

type Schedule struct {
	AtSlotTimes []human.Duration `yaml:"atSlotTimes"`
}

func (*Schedule) Validate

func (s *Schedule) Validate() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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