checkconsensusfinality

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: 5 Imported by: 0

README

check_consensus_finality Task

Description

The check_consensus_finality task checks the finality status of the consensus chain. Finality in a blockchain context refers to the point where a block's transactions are considered irreversible.

Configuration Parameters

  • minUnfinalizedEpochs:
    The minimum number of epochs that are allowed to be not yet finalized.

  • maxUnfinalizedEpochs:
    The maximum number of epochs that can remain unfinalized before the task fails.

  • minFinalizedEpochs:
    The minimum number of epochs that must be finalized for the task to be successful.

  • failOnCheckMiss:
    If set to true, the task will stop with a failure result if the finality status does not meet the criteria specified in the other parameters.
    If false, the task will not fail immediately and will continue checking.

Defaults

These are the default settings for the check_consensus_finality task:

- name: check_consensus_finality
  config:
    minUnfinalizedEpochs: 0
    maxUnfinalizedEpochs: 0
    minFinalizedEpochs: 0
    failOnCheckMiss: false

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TaskName       = "check_consensus_finality"
	TaskDescriptor = &types.TaskDescriptor{
		Name:        TaskName,
		Description: "Check finality status 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 {
	MinUnfinalizedEpochs uint64 `yaml:"minUnfinalizedEpochs" json:"minUnfinalizedEpochs"`
	MaxUnfinalizedEpochs uint64 `yaml:"maxUnfinalizedEpochs" json:"maxUnfinalizedEpochs"`
	MinFinalizedEpochs   uint64 `yaml:"minFinalizedEpochs" json:"minFinalizedEpochs"`
	FailOnCheckMiss      bool   `yaml:"failOnCheckMiss" json:"failOnCheckMiss"`
}

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