checkconsensusattestationstats

package
v0.0.12 Latest Latest
Warning

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

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

README

check_consensus_attestation_stats Task

Description

The check_consensus_attestation_stats task is designed to monitor attestation voting statistics on the consensus chain, ensuring that voting patterns align with specified criteria.

Configuration Parameters

  • minTargetPercent:
    The minimum percentage of correct target votes per checked epoch required for the task to succeed. The range is 0-100%.

  • maxTargetPercent:
    The maximum allowable percentage of correct target votes per checked epoch for the task to succeed. The range is 0-100%.

  • minHeadPercent:
    The minimum percentage of correct head votes per checked epoch needed for the task to succeed. The range is 0-100%.

  • maxHeadPercent:
    The maximum allowable percentage of correct head votes per checked epoch for the task to succeed. The range is 0-100%.

  • minTotalPercent:
    The minimum overall voting participation per checked epoch in percent needed for the task to succeed. The range is 0-100%.

  • maxTotalPercent:
    The maximum allowable overall voting participation per checked epoch for the task to succeed. The range is 0-100%.

  • failOnCheckMiss:
    Determines whether the task should stop with a failure result if a checked epoch does not meet the specified voting ranges.
    If false, the task continues checking subsequent epochs until it succeeds or times out.

  • minCheckedEpochs:
    The minimum number of consecutive epochs that must pass the check for the task to succeed.

Defaults

These are the default settings for the check_consensus_attestation_stats task:

- name: check_consensus_attestation_stats
  config:
    minTargetPercent: 0
    maxTargetPercent: 100
    minHeadPercent: 0
    maxHeadPercent: 100
    minTotalPercent: 0
    maxTotalPercent: 100
    failOnCheckMiss: false
    minCheckedEpochs: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TaskName       = "check_consensus_attestation_stats"
	TaskDescriptor = &types.TaskDescriptor{
		Name:        TaskName,
		Description: "Check attestation stats for consensus chain.",
		Config:      DefaultConfig(),
		NewTask:     NewTask,
	}
)

Functions

func NewTask

func NewTask(ctx *types.TaskContext, options *types.TaskOptions) (types.Task, error)

Types

type Config

type Config struct {
	MinTargetPercent uint64 `yaml:"minTargetPercent" json:"minTargetPercent"`
	MaxTargetPercent uint64 `yaml:"maxTargetPercent" json:"maxTargetPercent"`
	MinHeadPercent   uint64 `yaml:"minHeadPercent" json:"minHeadPercent"`
	MaxHeadPercent   uint64 `yaml:"maxHeadPercent" json:"maxHeadPercent"`
	MinTotalPercent  uint64 `yaml:"minTotalPercent" json:"minTotalPercent"`
	MaxTotalPercent  uint64 `yaml:"maxTotalPercent" json:"maxTotalPercent"`
	FailOnCheckMiss  bool   `yaml:"failOnCheckMiss" json:"failOnCheckMiss"`
	MinCheckedEpochs uint64 `yaml:"minCheckedEpochs" json:"minCheckedEpochs"`
}

func DefaultConfig

func DefaultConfig() Config

func (*Config) Validate

func (c *Config) Validate() error

type Task

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

func (*Task) Config

func (t *Task) Config() interface{}

func (*Task) Execute

func (t *Task) Execute(ctx context.Context) error

func (*Task) LoadConfig

func (t *Task) LoadConfig() error

func (*Task) Timeout

func (t *Task) Timeout() time.Duration

Jump to

Keyboard shortcuts

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