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.", Category: "consensus", Config: DefaultConfig(), Outputs: []types.TaskOutputDefinition{ { Name: "lastCheckedEpoch", Type: "uint64", Description: "The last epoch that was checked for attestation stats.", }, { Name: "validatorCount", Type: "uint64", Description: "Number of active validators in the epoch.", }, { Name: "validatorBalance", Type: "uint64", Description: "Total effective balance of active validators.", }, { Name: "targetVotes", Type: "uint64", Description: "Number of correct target votes.", }, { Name: "targetVotesPercent", Type: "float64", Description: "Percentage of correct target votes.", }, { Name: "headVotes", Type: "uint64", Description: "Number of correct head votes.", }, { Name: "headVotesPercent", Type: "float64", Description: "Percentage of correct head votes.", }, { Name: "totalVotes", Type: "uint64", Description: "Total number of attestation votes.", }, { Name: "totalVotesPercent", Type: "float64", Description: "Percentage of total attestation participation.", }, }, 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" desc:"Minimum percentage of correct target votes required."`
MaxTargetPercent uint64 `yaml:"maxTargetPercent" json:"maxTargetPercent" desc:"Maximum percentage of correct target votes allowed."`
MinHeadPercent uint64 `yaml:"minHeadPercent" json:"minHeadPercent" desc:"Minimum percentage of correct head votes required."`
MaxHeadPercent uint64 `yaml:"maxHeadPercent" json:"maxHeadPercent" desc:"Maximum percentage of correct head votes allowed."`
MinTotalPercent uint64 `yaml:"minTotalPercent" json:"minTotalPercent" desc:"Minimum total attestation participation percentage required."`
MaxTotalPercent uint64 `yaml:"maxTotalPercent" json:"maxTotalPercent" desc:"Maximum total attestation participation percentage allowed."`
FailOnCheckMiss bool `yaml:"failOnCheckMiss" json:"failOnCheckMiss" desc:"If true, fail the task when attestation stats condition is not met."`
MinCheckedEpochs uint64 `yaml:"minCheckedEpochs" json:"minCheckedEpochs" desc:"Minimum number of epochs to check before evaluating conditions."`
ContinueOnPass bool `` /* 137-byte string literal not displayed */
}
func DefaultConfig ¶
func DefaultConfig() Config
type Task ¶
type Task struct {
// contains filtered or unexported fields
}
func (*Task) LoadConfig ¶
Click to show internal directories.
Click to hide internal directories.