checkexecutionsyncstatus

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_execution_sync_status Task

Description

The check_execution_sync_status task checks the synchronization status of execution clients in the blockchain network. It ensures that these clients are syncing correctly with the network's current state.

Configuration Parameters

  • clientPattern:
    A regular expression pattern used to specify which clients to check. This allows for targeted health checks of specific clients or groups of clients within the network. A blank pattern targets all clients.

  • pollInterval:
    The interval at which the task checks the clients' sync status. This defines the frequency of the synchronization checks.

  • expectSyncing:
    Set this to true if the clients are expected to be in a syncing state. If false, the task expects the clients to be fully synced.

  • expectMinPercent:
    The minimum expected percentage of synchronization. Clients should be synced at least to this level for the task to succeed.

  • expectMaxPercent:
    The maximum allowable percentage of synchronization. Clients should not be synced beyond this level for the task to pass.

  • minBlockHeight:
    The minimum block height that the clients should be synced to. This sets a specific block height requirement for the task.

  • waitForChainProgression:
    If true, the task checks for blockchain progression in addition to the synchronization status. If false, it only checks for synchronization without waiting for further chain progression.

Defaults

These are the default settings for the check_execution_sync_status task:

- name: check_execution_sync_status
  config:
    clientPattern: ""
    pollInterval: 5s
    expectSyncing: false
    expectMinPercent: 100
    expectMaxPercent: 100
    minBlockHeight: 10
    waitForChainProgression: false

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TaskName       = "check_execution_sync_status"
	TaskDescriptor = &types.TaskDescriptor{
		Name:        TaskName,
		Description: "Checks execution clients for their sync status.",
		Config:      DefaultConfig(),
		NewTask:     NewTask,
	}
)

Functions

func NewTask

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

Types

type ClientInfo added in v0.0.10

type ClientInfo struct {
	Name          string `json:"name"`
	Synchronizing bool   `json:"synchronizing"`
	SyncHead      uint64 `json:"syncHead"`
	SyncDistance  uint64 `json:"syncDistance"`
}

type Config

type Config struct {
	ClientPattern           string          `yaml:"clientPattern" json:"clientPattern"`
	PollInterval            helper.Duration `yaml:"pollInterval" json:"pollInterval"`
	ExpectSyncing           bool            `yaml:"expectSyncing" json:"expectSyncing"`
	ExpectMinPercent        float64         `yaml:"expectMinPercent" json:"expectMinPercent"`
	ExpectMaxPercent        float64         `yaml:"expectMaxPercent" json:"expectMaxPercent"`
	MinBlockHeight          int             `yaml:"minBlockHeight" json:"minBlockHeight"`
	WaitForChainProgression bool            `yaml:"waitForChainProgression" json:"waitForChainProgression"`
}

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