Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( TaskName = "check_consensus_identity" TaskDescriptor = &types.TaskDescriptor{ Name: TaskName, Description: "Checks consensus client node identity information including CGC extraction from ENR.", Category: "consensus", Config: DefaultConfig(), Outputs: []types.TaskOutputDefinition{ { Name: "matchingClients", Type: "array", Description: "List of clients that passed identity checks.", }, { Name: "failedClients", Type: "array", Description: "List of clients that failed identity checks.", }, { Name: "totalCount", Type: "int", Description: "Total number of clients checked.", }, { Name: "matchingCount", Type: "int", Description: "Number of clients that passed checks.", }, { Name: "failedCount", Type: "int", Description: "Number of clients that failed checks.", }, }, NewTask: NewTask, } )
Functions ¶
func NewTask ¶
func NewTask(ctx *types.TaskContext, options *types.TaskOptions) (types.Task, error)
Types ¶
type Config ¶
type Config struct {
ClientPattern string `` /* 133-byte string literal not displayed */
PollInterval helper.Duration `yaml:"pollInterval" json:"pollInterval" desc:"Interval between identity check polls (e.g., '10s', '1m')."`
MinClientCount int `yaml:"minClientCount" json:"minClientCount" desc:"Minimum number of clients required to pass the check."`
MaxFailCount int `yaml:"maxFailCount" json:"maxFailCount" desc:"Maximum number of clients allowed to fail the check (-1 for unlimited)."`
FailOnCheckMiss bool `yaml:"failOnCheckMiss" json:"failOnCheckMiss" desc:"If true, fail the task when identity check condition is not met."`
// CGC (Custody Group Count) checks
ExpectCGC *uint64 `yaml:"expectCgc" json:"expectCgc" desc:"Expected custody group count (CGC) value."`
MinCGC *uint64 `yaml:"minCgc" json:"minCgc" desc:"Minimum custody group count required."`
MaxCGC *uint64 `yaml:"maxCgc" json:"maxCgc" desc:"Maximum custody group count allowed."`
// ENR checks
ExpectENRField map[string]interface{} `yaml:"expectEnrField" json:"expectEnrField" desc:"Map of ENR field names to expected values."`
// PeerID checks
ExpectPeerIDPattern string `yaml:"expectPeerIdPattern" json:"expectPeerIdPattern" desc:"Regex pattern that peer ID must match."`
// P2P address checks
ExpectP2PAddressCount *int `yaml:"expectP2pAddressCount" json:"expectP2pAddressCount" desc:"Expected number of P2P addresses."`
ExpectP2PAddressMatch string `yaml:"expectP2pAddressMatch" json:"expectP2pAddressMatch" desc:"Regex pattern that P2P addresses must match."`
// Metadata checks
ExpectSeqNumber *uint64 `yaml:"expectSeqNumber" json:"expectSeqNumber" desc:"Expected metadata sequence number."`
MinSeqNumber *uint64 `yaml:"minSeqNumber" json:"minSeqNumber" desc:"Minimum metadata sequence number required."`
ContinueOnPass bool `` /* 137-byte string literal not displayed */
}
func DefaultConfig ¶
func DefaultConfig() Config
type IdentityCheckResult ¶
type IdentityCheckResult struct {
ClientName string `json:"clientName"`
PeerID string `json:"peerId"`
ENR string `json:"enr"`
P2PAddresses []string `json:"p2pAddresses"`
DiscoveryAddresses []string `json:"discoveryAddresses"`
SeqNumber uint64 `json:"seqNumber"`
Attnets string `json:"attnets"`
Syncnets string `json:"syncnets"`
CGC uint64 `json:"cgc"`
ENRFields map[string]interface{} `json:"enrFields"`
ChecksPassed bool `json:"checksPassed"`
FailureReasons []string `json:"failureReasons"`
}
type Task ¶
type Task struct {
// contains filtered or unexported fields
}
func (*Task) LoadConfig ¶
Click to show internal directories.
Click to hide internal directories.