Documentation
¶
Overview ¶
templ: version: v0.3.898
templ: version: v0.3.898
templ: version: v0.3.898
templ: version: v0.3.898
templ: version: v0.3.898
templ: version: v0.3.898
templ: version: v0.3.898
templ: version: v0.3.898
templ: version: v0.3.898
templ: version: v0.3.898
templ: version: v0.3.898
templ: version: v0.3.898
templ: version: v0.3.898
templ: version: v0.3.898
Index ¶
- Constants
- func CamelCaseKeys(result []map[string]interface{}) []map[string]interface{}
- type AdjudicatePageView
- type BlockView
- type ConsensusClassification
- type ConsensusHealth
- type ConsensusNode
- type CopyButtonProps
- type Endpoint
- type EthEndpoint
- type HaltThresholds
- type NodePageView
- type NodesView
- type Pages
- func (c *Pages) AdjudicatePageHTML(props *AdjudicatePageView) templ.Component
- func (p *Pages) BlockPageHTML(view *BlockView) templ.Component
- func (p *Pages) ConsensusHaltBanner(h *ConsensusHealth) templ.Component
- func (p *Pages) ConsensusPanelFragment(h *ConsensusHealth) templ.Component
- func (p *Pages) ContentPageHTML() templ.Component
- func (p *Pages) ErrorPageHTML(errorID string) templ.Component
- func (p *Pages) GenesisHTML(genesis map[string]interface{}) templ.Component
- func (p *Pages) NodePageHTML(data *NodePageView) templ.Component
- func (p *Pages) NodesPageHTML(data *NodesView) templ.Component
- func (p *Pages) OverviewCriticalFragment(status *v1.GetStatusResponse) templ.Component
- func (p *Pages) OverviewNetworkFragment(status *v1.GetStatusResponse) templ.Component
- func (p *Pages) OverviewPage(status *v1.GetStatusResponse, health *ConsensusHealth) templ.Component
- func (p *Pages) OverviewProcessesFragment(status *v1.GetStatusResponse) templ.Component
- func (p *Pages) OverviewResourcesFragment(status *v1.GetStatusResponse) templ.Component
- func (p *Pages) OverviewStorageFragment(status *v1.GetStatusResponse) templ.Component
- func (c *Pages) PoSPageHTML(props *PoSPageView) templ.Component
- func (p *Pages) StoragePage(diag *storagev1.GetStorageDiagnosticsResponse) templ.Component
- func (p *Pages) TxPageHTML(view *TxView) templ.Component
- func (p *Pages) UploadPage() templ.Component
- func (c *Pages) UptimePageHTML(props *UptimePageView) templ.Component
- type PoSPageView
- type ServiceProvider
- type SlaReport
- type SlaStatus
- type SlashRecommendation
- type StorageProof
- type StorageProofRollup
- type TxView
- type UptimePageView
Constants ¶
const UnearnedRewardsThreshold = int64(10000)
Variables ¶
This section is empty.
Functions ¶
func CamelCaseKeys ¶
Types ¶
type AdjudicatePageView ¶
type AdjudicatePageView struct {
ServiceProvider *ServiceProvider
StartTime time.Time
EndTime time.Time
MetSlas int
PartialSlas int
DeadSlas int
TotalSlas int
TotalStaked int64
TotalChallenges int64
FailedChallenges int64
Slash SlashRecommendation
ActiveSlashProposalId int64
DashboardURL string
ReportingEndpoint *Endpoint
}
type ConsensusClassification ¶ added in v1.8.0
type ConsensusClassification string
ConsensusClassification is a coarse, operator-facing label for the state of the CometBFT consensus engine. It is derived entirely from the sanitized `/consensus_state` round data (no peer identities / topology), so it is safe to surface on the public console.
const ( // ConsensusHealthy: blocks are committing and rounds are low. ConsensusHealthy ConsensusClassification = "healthy" // ConsensusCatchingUp: node is state/block syncing; halt detection is suppressed. ConsensusCatchingUp ConsensusClassification = "catching_up" // ConsensusDegraded: rounds are elevated but the chain still looks like it's // making (slow) progress. An early warning, not a halt. ConsensusDegraded ConsensusClassification = "degraded" // ConsensusHaltLiveness: stuck, and votes are overwhelmingly nil — nobody can // build/accept a proposal. This is the "every proposal rejected" liveness // failure (e.g. oversized blocks, ProcessProposal rejecting every batch). ConsensusHaltLiveness ConsensusClassification = "halted_liveness" // ConsensusHaltSplit: stuck, and within a round votes are split across two or // more competing block hashes — a sign of non-determinism / app-hash divergence. ConsensusHaltSplit ConsensusClassification = "halted_split" // ConsensusHaltUnknown: stuck, but the vote pattern doesn't cleanly match // either bucket above. ConsensusHaltUnknown ConsensusClassification = "halted_unknown" // ConsensusUnknown: consensus state couldn't be read/parsed. ConsensusUnknown ConsensusClassification = "unknown" )
func (ConsensusClassification) IsHalt ¶ added in v1.8.0
func (c ConsensusClassification) IsHalt() bool
IsHalt reports whether the classification represents a halted chain.
type ConsensusHealth ¶ added in v1.8.0
type ConsensusHealth struct {
Classification ConsensusClassification
Halted bool
Height int64
Round int32
Step string
SecondsSinceLastBlock float64
LastBlockTime time.Time
CatchingUp bool
// Participation, taken from the height's most-populated round.
TotalValidators int
VotingValidators int
PrevotePowerFrac float64 // 0..1 of total voting power that prevoted
PrecommitPowerFrac float64 // 0..1 of total voting power that precommitted
// Vote breakdown aggregated across every round of the current height.
NilPrevotes int // present votes cast for nil
BlockPrevotes int // present votes cast for a real block
DistinctBlockHashes int // distinct non-nil block hashes seen across all rounds
MaxHashesInRound int // most distinct non-nil hashes seen within a single round
Summary string
}
ConsensusHealth is the sanitized view model rendered by the console. It deliberately omits peer IDs and per-validator identities that a full dump_consensus_state would expose.
func AnalyzeConsensusState ¶ added in v1.8.0
func AnalyzeConsensusState(roundStateJSON []byte, latestBlockTime time.Time, catchingUp bool, now time.Time, th HaltThresholds) (*ConsensusHealth, error)
AnalyzeConsensusState turns a raw CometBFT round_state payload (the `round_state` field of a /consensus_state response) plus basic status info into a sanitized ConsensusHealth summary.
latestBlockTime / catchingUp come from the node's /status. now is injected so the function is deterministic and testable.
func UnknownConsensusHealth ¶ added in v1.8.0
func UnknownConsensusHealth() *ConsensusHealth
UnknownConsensusHealth is returned when the RPC/consensus state can't be read.
func (*ConsensusHealth) ShowPanel ¶ added in v1.8.0
func (h *ConsensusHealth) ShowPanel() bool
ShowPanel reports whether the consensus panel is worth rendering. It's only shown when the chain needs attention — halted, or degraded (elevated rounds, the early-warning before a halt). Healthy / catching-up / unknown add no signal beyond the overview's existing status row, so the panel is hidden.
type ConsensusNode ¶ added in v1.2.6
type CopyButtonProps ¶
type EthEndpoint ¶ added in v1.2.6
type HaltThresholds ¶ added in v1.8.0
type HaltThresholds struct {
// HaltAfter: if no block has committed for at least this long, treat as halted.
HaltAfter time.Duration
// HighRound: if the current consensus round is >= this, treat as halted
// regardless of elapsed time (rounds are normally 0).
HighRound int32
// WarnRound: round >= this (but below HighRound / time threshold) is "degraded".
WarnRound int32
}
HaltThresholds tunes when the analyzer decides the chain is halted vs merely degraded. Zero values disable the corresponding check.
func DefaultHaltThresholds ¶ added in v1.8.0
func DefaultHaltThresholds() HaltThresholds
DefaultHaltThresholds are conservative defaults chosen to avoid false positives during normal (single-digit-second) block cadence.
type NodePageView ¶
type NodesView ¶
type NodesView struct {
ConsensusNodes []ConsensusNode
ConsensusNodesCount int
Nodes []db.CoreValidator
ValidatorNodesCount int
EthEndpoints []EthEndpoint
EthEndpointsCount int
// Validators registered in core_validators but not currently in the
// CometBFT consensus set.
MissingFromConsensus []db.CoreValidator
// Eth registry endpoints with no matching registered validator node.
MissingFromValidators []EthEndpoint
}
type Pages ¶
type Pages struct {
// contains filtered or unexported fields
}
func (*Pages) AdjudicatePageHTML ¶
func (c *Pages) AdjudicatePageHTML(props *AdjudicatePageView) templ.Component
func (*Pages) ConsensusHaltBanner ¶ added in v1.8.0
func (p *Pages) ConsensusHaltBanner(h *ConsensusHealth) templ.Component
ConsensusHaltBanner renders a site-wide alert only when the chain is halted. It is intentionally empty otherwise so it can be polled on every page.
func (*Pages) ConsensusPanelFragment ¶ added in v1.8.0
func (p *Pages) ConsensusPanelFragment(h *ConsensusHealth) templ.Component
ConsensusPanelFragment renders the consensus health detail card. ConsensusPanelFragment renders the consensus health detail card, but only for states worth an operator's attention (halted or degraded); healthy, syncing and unknown states render nothing.
func (*Pages) ContentPageHTML ¶
func (*Pages) GenesisHTML ¶
func (*Pages) NodePageHTML ¶
func (p *Pages) NodePageHTML(data *NodePageView) templ.Component
func (*Pages) OverviewCriticalFragment ¶
func (*Pages) OverviewNetworkFragment ¶
func (*Pages) OverviewPage ¶
func (p *Pages) OverviewPage(status *v1.GetStatusResponse, health *ConsensusHealth) templ.Component
func (*Pages) OverviewProcessesFragment ¶
func (*Pages) OverviewResourcesFragment ¶
func (*Pages) OverviewStorageFragment ¶ added in v1.1.7
func (*Pages) PoSPageHTML ¶
func (c *Pages) PoSPageHTML(props *PoSPageView) templ.Component
func (*Pages) StoragePage ¶ added in v1.2.14
func (p *Pages) StoragePage(diag *storagev1.GetStorageDiagnosticsResponse) templ.Component
func (*Pages) UploadPage ¶
func (*Pages) UptimePageHTML ¶
func (c *Pages) UptimePageHTML(props *UptimePageView) templ.Component
type PoSPageView ¶
type PoSPageView struct {
Address string
BlockStart int64
BlockEnd int64
StorageProofs []*StorageProof
}
type ServiceProvider ¶
type ServiceProvider struct {
Address string
Endpoints []*Endpoint
StorageProofRollups map[string]*StorageProofRollup
}
type SlashRecommendation ¶
type StorageProof ¶
type StorageProofRollup ¶
type UptimePageView ¶
Source Files
¶
- adjudicate_page_templ.go
- block_page_templ.go
- consensus.go
- consensus_panel_templ.go
- content_page_templ.go
- error_page_templ.go
- genesis_page_templ.go
- node_page_templ.go
- nodes_page_templ.go
- overview_page_templ.go
- pages.go
- pos_page_templ.go
- storage_page_templ.go
- tx_page_templ.go
- upload_page_templ.go
- uptime_page_templ.go
- utils.go