Documentation
¶
Index ¶
- type CLNodeData
- type CLNodesPageData
- type ELNodeData
- type ELNodesPageData
- type ForkInfo
- type FrontendHandler
- func (fh *FrontendHandler) CLENR(w http.ResponseWriter, r *http.Request)
- func (fh *FrontendHandler) CLNodes(w http.ResponseWriter, r *http.Request)
- func (fh *FrontendHandler) CLNodesJSON(w http.ResponseWriter, r *http.Request)
- func (fh *FrontendHandler) ELENR(w http.ResponseWriter, r *http.Request)
- func (fh *FrontendHandler) ELNodes(w http.ResponseWriter, r *http.Request)
- func (fh *FrontendHandler) ELNodesJSON(w http.ResponseWriter, r *http.Request)
- func (fh *FrontendHandler) ENR(w http.ResponseWriter, r *http.Request)
- func (fh *FrontendHandler) Enode(w http.ResponseWriter, r *http.Request)
- func (fh *FrontendHandler) Index(w http.ResponseWriter, r *http.Request)
- func (fh *FrontendHandler) Overview(w http.ResponseWriter, r *http.Request)
- type IndexPage
- type OldDigestInfo
- type OverviewPageData
- type TableStats
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CLNodeData ¶ added in v0.0.2
type CLNodeData struct {
PeerID string
IP string
Port int
ENR string
ENRSeq uint64
FirstSeen time.Time
LastSeen time.Time
SuccessCount int
FailureCount int
IsAlive bool
Score float64
AvgRTT time.Duration
ForkDigest string
HasForkData bool
IsCurrentFork bool
}
CLNodeData represents the data for a single CL node in the template.
type CLNodesPageData ¶ added in v0.0.2
type CLNodesPageData struct {
TotalNodes int
ActiveNodes int
InactiveNodes int
AliveNodes int
DeadNodes int
CurrentForkDigest string
Nodes []CLNodeData
}
CLNodesPageData represents the data for the CL nodes page.
type ELNodeData ¶ added in v0.0.2
type ELNodeData struct {
PeerID string
IP string
Port int
Enode string
ENR string
ENRSeq uint64
FirstSeen time.Time
LastSeen time.Time
SuccessCount int
FailureCount int
IsAlive bool
Score float64
AvgRTT time.Duration
ForkDigest string
HasForkData bool
IsCurrentFork bool
HasV4 bool // Supports discv4 protocol
HasV5 bool // Supports discv5 protocol
ProtocolSupport string // Human-readable protocol support string
}
ELNodeData represents the data for a single EL node in the template.
type ELNodesPageData ¶ added in v0.0.2
type ELNodesPageData struct {
TotalNodes int
ActiveNodes int
InactiveNodes int
AliveNodes int
DeadNodes int
CurrentForkDigest string
Nodes []ELNodeData
}
ELNodesPageData represents the data for the EL nodes page.
type ForkInfo ¶ added in v0.0.2
type ForkInfo struct {
Name string
Digest string
Activation string // Block number, timestamp, or epoch
}
ForkInfo represents fork information for display.
type FrontendHandler ¶
type FrontendHandler struct {
// contains filtered or unexported fields
}
func NewFrontendHandler ¶
func NewFrontendHandler(bootnodeService *bootnode.Service) *FrontendHandler
func (*FrontendHandler) CLENR ¶ added in v0.0.3
func (fh *FrontendHandler) CLENR(w http.ResponseWriter, r *http.Request)
CLENR serves the CL ENR with the EL-only eth field removed, as plain text.
func (*FrontendHandler) CLNodes ¶ added in v0.0.2
func (fh *FrontendHandler) CLNodes(w http.ResponseWriter, r *http.Request)
CLNodes handles the CL nodes page.
func (*FrontendHandler) CLNodesJSON ¶ added in v0.0.2
func (fh *FrontendHandler) CLNodesJSON(w http.ResponseWriter, r *http.Request)
CLNodesJSON returns the CL nodes data as JSON for AJAX updates.
func (*FrontendHandler) ELENR ¶ added in v0.0.3
func (fh *FrontendHandler) ELENR(w http.ResponseWriter, r *http.Request)
ELENR serves the EL ENR with the CL-only eth2 field removed, as plain text. This is the record to give EL clients, some of which reject an ENR carrying eth2.
func (*FrontendHandler) ELNodes ¶ added in v0.0.2
func (fh *FrontendHandler) ELNodes(w http.ResponseWriter, r *http.Request)
ELNodes handles the EL nodes page.
func (*FrontendHandler) ELNodesJSON ¶ added in v0.0.2
func (fh *FrontendHandler) ELNodesJSON(w http.ResponseWriter, r *http.Request)
ELNodesJSON returns the EL nodes data as JSON for AJAX updates.
func (*FrontendHandler) ENR ¶
func (fh *FrontendHandler) ENR(w http.ResponseWriter, r *http.Request)
ENR serves the local ENR as plain text. Use ?layer=el|cl to select an identity, and ?generic=1 for the fork-stripped record to put in static bootnode lists.
func (*FrontendHandler) Enode ¶ added in v0.0.2
func (fh *FrontendHandler) Enode(w http.ResponseWriter, r *http.Request)
Enode serves the local enode URL. enode:// is EL/discv4-only, so it reflects the EL identity; a CL-only bootnode has no enode (CL peers use the ENR).
func (*FrontendHandler) Index ¶
func (fh *FrontendHandler) Index(w http.ResponseWriter, r *http.Request)
Index will return the "index" page using a go template
func (*FrontendHandler) Overview ¶
func (fh *FrontendHandler) Overview(w http.ResponseWriter, r *http.Request)
Overview renders the overview page
type OldDigestInfo ¶
type OverviewPageData ¶
type OverviewPageData struct {
Status string
NetworkName string
StartTime time.Time
PeerID string
BindAddress string
LocalENR string
GenericENR string // ENR with fork fields stripped, for static bootnode lists
LocalEnode string
LocalENRSeq uint64
// Layer-specific records for the shared-key, dual-layer case: the combined
// LocalENR carries both eth and eth2, which some single-layer clients reject,
// so we also surface the eth-only and eth2-only variants. Empty unless both
// layers run under one key.
ELLayerENR string
CLLayerENR string
// Per-identity records, populated when EL and CL use distinct keys. CL has no
// enode field: enode:// is EL/discv4-only.
SeparateIdentities bool
ELPeerID string
ELBindAddress string
ELLocalENR string
ELGenericENR string
ELLocalEnode string
ELLocalENRSeq uint64
CLPeerID string
CLBindAddress string
CLLocalENR string
CLGenericENR string
CLLocalENRSeq uint64
CurrentFork string
CurrentDigest string
PreviousFork string
PreviousDigest string
GenesisDigest string
OldDigests []OldDigestInfo
GracePeriod string
// Fork lists
ELForks []ForkInfo // Execution Layer forks
CLForks []ForkInfo // Consensus Layer forks
// Routing table stats (combined)
TableSize int
ActiveNodes int
InactiveNodes int
// EL Statistics (NEW)
ELActiveNodes int
ELTotalNodes int
ELTableStats TableStats
// CL Statistics (NEW)
CLActiveNodes int
CLTotalNodes int
CLTableStats TableStats
// Discovery stats
LookupsStarted int
LookupsCompleted int
LookupsFailed int
// Ping stats
PingsSent int
PongsReceived int
PingSuccessRate float64
// Session stats
SessionsTotal int
SessionsActive int
SessionsExpired int
// Pending operations
PendingHandshakes int
PendingChallenges int
// Handler stats
PacketsReceived int
PacketsSent int
InvalidPackets int
WrongProtocolPackets int
FilteredResponses int
FindNodeReceived int
// CL fork digest filter stats
FilterAcceptedCurrent int
FilterAcceptedOld int
FilterRejectedInvalid int
FilterAcceptedHistorical int
FilterTotalChecks int
// EL fork ID admission stats. Independent of the CL counters above: a
// dual-layer bootnode runs both filters, so neither can stand in for the
// other.
ELFilterAccepted int
ELFilterRejected int
ELFilterTotalChecks int
// Database stats
DBQueueSize int
DBProcessedUpdates int64
DBMergedUpdates int64
DBFailedUpdates int64
DBTransactions int64
DBTotalQueries int64
DBOpenConnections int
}
OverviewPageData contains data for the overview page
type TableStats ¶ added in v0.0.2
TableStats contains statistics for a routing table