checkexecutionsyncstatus

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2026 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.

Task Behavior
  • The task polls execution clients at regular intervals to check their sync status.
  • By default, the task returns immediately when the sync criteria are met.
  • Use continueOnPass: true to keep monitoring even after success.

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. Default: 5s.

  • 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. Default: false.

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

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

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

  • 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. Default: false.

  • continueOnPass:
    If set to true, the task continues monitoring sync status even after the criteria are met. This is useful when running concurrently with other tasks. If false (default), the task exits immediately on success.

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
    continueOnPass: false

Outputs

This task does not produce any outputs.

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.",
		Category:    "execution",
		Config:      DefaultConfig(),
		Outputs: []types.TaskOutputDefinition{
			{
				Name:        "goodClients",
				Type:        "array",
				Description: "Array of clients that meet sync criteria.",
			},
			{
				Name:        "failedClients",
				Type:        "array",
				Description: "Array of clients that do not meet sync criteria.",
			},
		},
		NewTask: NewTask,
	}
)

Functions

func NewTask

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

Types

type ClientInfo

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" desc:"Regex pattern to select specific client endpoints for sync status checking."`
	PollInterval            helper.Duration `yaml:"pollInterval" json:"pollInterval" desc:"Interval between sync status polls (e.g., '5s', '1m')."`
	ExpectSyncing           bool            `yaml:"expectSyncing" json:"expectSyncing" desc:"If true, expect clients to be syncing."`
	ExpectMinPercent        float64         `yaml:"expectMinPercent" json:"expectMinPercent" desc:"Minimum percentage of clients expected to match the sync condition."`
	ExpectMaxPercent        float64         `yaml:"expectMaxPercent" json:"expectMaxPercent" desc:"Maximum percentage of clients expected to match the sync condition."`
	MinBlockHeight          int             `yaml:"minBlockHeight" json:"minBlockHeight" desc:"Minimum block height required before checking sync status."`
	WaitForChainProgression bool            `yaml:"waitForChainProgression" json:"waitForChainProgression" desc:"If true, wait for the chain to progress before checking."`
	ContinueOnPass          bool            `` /* 137-byte string literal not displayed */
}

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