handlers

package
v1.20.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 20, 2026 License: GPL-3.0 Imports: 57 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidPageModel = errors.New("invalid page model")

Functions

func Address added in v1.19.9

func Address(w http.ResponseWriter, r *http.Request)

Address handles the /address/{address} page

func AddressBalances added in v1.19.9

func AddressBalances(w http.ResponseWriter, r *http.Request)

AddressBalances handles the /address/{address}/balances AJAX endpoint Returns JSON balance data for auto-refresh functionality

func Blobs added in v1.19.5

func Blobs(w http.ResponseWriter, r *http.Request)

func Block added in v1.19.9

func Block(w http.ResponseWriter, r *http.Request)

Block handles the /block/{numberOrHash} route It looks up the block by EL block number or hash and redirects to the slot page

func Blocks added in v1.16.0

func Blocks(w http.ResponseWriter, r *http.Request)

Blocks will return the main "blocks" page using a go template

func BlocksFiltered added in v1.20.1

func BlocksFiltered(w http.ResponseWriter, r *http.Request)

BlocksFiltered will return the filtered "blocks" page using a go template

func ChainForks added in v1.18.3

func ChainForks(w http.ResponseWriter, r *http.Request)

ChainForks will return the chain forks visualization page using a go template

func ClientsCL added in v1.10.0

func ClientsCL(w http.ResponseWriter, r *http.Request)

ClientsCL will return the main "clients" page using a go template

func ClientsCLRefresh added in v1.17.0

func ClientsCLRefresh(w http.ResponseWriter, r *http.Request)

ClientsCLRefresh forces a refresh of ENR data from all consensus clients

func ClientsCLRefreshStatus added in v1.17.0

func ClientsCLRefreshStatus(w http.ResponseWriter, r *http.Request)

ClientsCLRefreshStatus returns the current cooldown status

func ClientsELRefresh added in v1.17.0

func ClientsELRefresh(w http.ResponseWriter, r *http.Request)

ClientsELRefresh forces a refresh of peer data from all execution clients

func ClientsELRefreshStatus added in v1.17.0

func ClientsELRefreshStatus(w http.ResponseWriter, r *http.Request)

ClientsELRefreshStatus returns the current cooldown status for execution clients

func ClientsEl added in v1.10.0

func ClientsEl(w http.ResponseWriter, r *http.Request)

ClientsEl will return the main "clients" page using a go template

func ClientsElStatus added in v1.19.8

func ClientsElStatus(w http.ResponseWriter, r *http.Request)

ClientsElStatus returns the status message for an execution client by connecting via P2P

func Consolidations added in v1.19.0

func Consolidations(w http.ResponseWriter, r *http.Request)

Consolidations will return the main "consolidations" page using a go template

func CustomFileServer

func CustomFileServer(handler http.Handler, root http.FileSystem, NotFoundHandler http.HandlerFunc) http.Handler

Custom FileServer which does the same as http.FileServer, but serves custom page on 404 error

func DebugPage added in v1.20.4

func DebugPage(w http.ResponseWriter, r *http.Request)

DebugPage serves the debug information page.

func Deposits

func Deposits(w http.ResponseWriter, r *http.Request)

Deposits will return the main "deposits" page using a go template

func ElConsolidations added in v1.12.0

func ElConsolidations(w http.ResponseWriter, r *http.Request)

ElConsolidations will return the filtered "el_consolidations" page using a go template

func ElWithdrawals added in v1.12.0

func ElWithdrawals(w http.ResponseWriter, r *http.Request)

ElWithdrawals will return the filtered "el_withdrawals" page using a go template

func Epoch

func Epoch(w http.ResponseWriter, r *http.Request)

Epoch will return the main "epoch" page using a go template

func Epochs

func Epochs(w http.ResponseWriter, r *http.Request)

Epochs will return the main "epochs" page using a go template

func Exits added in v1.19.0

func Exits(w http.ResponseWriter, r *http.Request)

Exits will return the main "exits" page using a go template

func Forks

func Forks(w http.ResponseWriter, r *http.Request)

Forks will return the main "forks" page using a go template

func IncludedDeposits

func IncludedDeposits(w http.ResponseWriter, r *http.Request)

IncludedDeposits will return the filtered "included_deposits" page using a go template

func Index

func Index(w http.ResponseWriter, r *http.Request)

Index will return the main "index" page using a go template

func IndexData

func IndexData(w http.ResponseWriter, r *http.Request)

func InitPageData

func InitPageData(w http.ResponseWriter, r *http.Request, active, path, title string, mainTemplates []string) *types.PageData

func InitRPCProxy added in v1.19.1

func InitRPCProxy()

InitRPCProxy initializes the RPC proxy service

func InitiatedDeposits

func InitiatedDeposits(w http.ResponseWriter, r *http.Request)

InitiatedDeposits will return the filtered "initiated_deposits" page using a go template

func MevBlocks

func MevBlocks(w http.ResponseWriter, r *http.Request)

MevBlocks will return the filtered "mev_blocks" page using a go template

func NotFound

func NotFound(w http.ResponseWriter, r *http.Request)

func QueuedConsolidations added in v1.19.0

func QueuedConsolidations(w http.ResponseWriter, r *http.Request)

QueuedConsolidations will return the filtered "queued_consolidations" page using a go template

func QueuedDeposits added in v1.15.0

func QueuedDeposits(w http.ResponseWriter, r *http.Request)

QueuedDeposits will return the "queued_deposits" page using a go template

func QueuedWithdrawals added in v1.19.0

func QueuedWithdrawals(w http.ResponseWriter, r *http.Request)

QueuedWithdrawals will return the filtered "queued_withdrawals" page using a go template

func RPCProxyHandler added in v1.19.1

func RPCProxyHandler(w http.ResponseWriter, r *http.Request)

RPCProxyHandler handles filtered JSON-RPC requests

func Search(w http.ResponseWriter, r *http.Request)

Search will return the main "search" page using a go template

func SearchAhead

func SearchAhead(w http.ResponseWriter, r *http.Request)

SearchAhead handles responses for the frontend search boxes

func Slashings

func Slashings(w http.ResponseWriter, r *http.Request)

Slashings will return the filtered "slashings" page using a go template

func Slot

func Slot(w http.ResponseWriter, r *http.Request)

Index will return the main "index" page using a go template

func SlotBlob

func SlotBlob(w http.ResponseWriter, r *http.Request)

SlotBlob handles responses for the block blobs tab

func SlotTracoor added in v1.20.1

func SlotTracoor(w http.ResponseWriter, r *http.Request)

SlotTracoor handles the Tracoor data request for a slot

func Slots

func Slots(w http.ResponseWriter, r *http.Request)

Slots will return the main "slots" page using a go template

func SlotsFiltered

func SlotsFiltered(w http.ResponseWriter, r *http.Request)

SlotsFiltered will return the filtered "slots" page using a go template

func SubmitConsolidation added in v1.12.1

func SubmitConsolidation(w http.ResponseWriter, r *http.Request)

SubmitConsolidation will submit a consolidation request

func SubmitDeposit added in v1.12.1

func SubmitDeposit(w http.ResponseWriter, r *http.Request)

SubmitDeposit will submit a deposit to the beacon node

func SubmitWithdrawal added in v1.12.1

func SubmitWithdrawal(w http.ResponseWriter, r *http.Request)

SubmitWithdrawal will submit a withdrawal request

func Transaction added in v1.19.9

func Transaction(w http.ResponseWriter, r *http.Request)

Transaction handles the /tx/{hash} page

func Validator

func Validator(w http.ResponseWriter, r *http.Request)

Validator will return the main "validator" page using a go template

func ValidatorSlots

func ValidatorSlots(w http.ResponseWriter, r *http.Request)

Slots will return the main "slots" page using a go template

func Validators

func Validators(w http.ResponseWriter, r *http.Request)

Validators will return the main "validators" page using a go template

func ValidatorsActivity

func ValidatorsActivity(w http.ResponseWriter, r *http.Request)

ValidatorsActivity will return the filtered "slots" page using a go template

func ValidatorsOffline added in v1.15.2

func ValidatorsOffline(w http.ResponseWriter, r *http.Request)

ValidatorsOffline will return the filtered "validators offline" page using a go template

func ValidatorsSummary added in v1.19.0

func ValidatorsSummary(w http.ResponseWriter, r *http.Request)

ValidatorsSummary will return the validators summary page with client distribution matrix

func VoluntaryExits

func VoluntaryExits(w http.ResponseWriter, r *http.Request)

VoluntaryExits will return the filtered "voluntary_exits" page using a go template

func Withdrawals added in v1.19.0

func Withdrawals(w http.ResponseWriter, r *http.Request)

Withdrawals will return the main "withdrawals" page using a go template

Types

type AddressBalanceTokenResponse added in v1.19.9

type AddressBalanceTokenResponse struct {
	TokenID    uint64  `json:"token_id"`
	Contract   string  `json:"contract"`
	Name       string  `json:"name"`
	Symbol     string  `json:"symbol"`
	Decimals   uint8   `json:"decimals"`
	Balance    float64 `json:"balance"`
	BalanceRaw string  `json:"balance_raw"`
}

AddressBalanceTokenResponse represents a single token balance in the response

type AddressBalancesResponse added in v1.19.9

type AddressBalancesResponse struct {
	EthBalance    float64                        `json:"eth_balance"`
	EthBalanceRaw string                         `json:"eth_balance_raw"`
	TokenBalances []*AddressBalanceTokenResponse `json:"token_balances"`
}

AddressBalancesResponse is the JSON response for the balances endpoint

type BlockDBDebugData added in v1.20.4

type BlockDBDebugData struct {
	Enabled     bool
	EngineName  string
	PebbleStats *PebbleDebugData
	S3Stats     *S3DebugData
	StoredData  *BlockDbStoredData
}

BlockDBDebugData holds block database statistics.

type BlockDbStoredData added in v1.20.4

type BlockDbStoredData struct {
	BeaconBlockCount int64
	BeaconBlockSize  int64
	ExecDataCount    int64
	ExecDataSize     int64
	TotalCount       int64
	TotalSize        int64
}

BlockDbStoredData holds aggregate stats from the DB about data stored in blockdb.

type DatabaseDebugData added in v1.20.4

type DatabaseDebugData struct {
	Engine    string
	TotalSize int64
	Tables    []*db.TableStats
}

DatabaseDebugData holds database statistics.

type DebugPageData added in v1.20.4

type DebugPageData struct {
	BeaconCache   *beacon.CacheDebugStats
	FrontendCache *FrontendCacheDebugData
	BlockDB       *BlockDBDebugData
	Database      *DatabaseDebugData
	System        *SystemDebugData
	ExecIndexer   *ExecIndexerDebugData
}

DebugPageData holds all data for the debug page.

type ExecIndexerDebugData added in v1.20.4

type ExecIndexerDebugData struct {
	Enabled          bool
	Indexer          *txindexer.TxIndexerDebugStats
	LatestSlot       uint64
	RecentBlockStats []*RecentBlockStatsEntry
}

ExecIndexerDebugData holds execution indexer statistics.

type FrontendCacheDebugData added in v1.20.4

type FrontendCacheDebugData struct {
	Service        *services.FrontendCacheStats
	Tiered         *cache.TieredCacheStats
	PageTypes      []*cache.PageTypeStats
	PageTypesTotal int64
}

FrontendCacheDebugData holds frontend cache statistics.

type PebbleDebugData added in v1.20.4

type PebbleDebugData struct {
	BlockCacheSize   int64
	BlockCacheHits   int64
	BlockCacheMisses int64
	KeyCount         int64
	TableCount       int64
	TotalSize        int64
	WALSize          uint64
	WALCount         int64
	MemTableSize     uint64
	MemTableCount    int64
	ZombieTableCount int64
	ZombieTableSize  uint64
	LevelCount       int
	Levels           []PebbleLevelData
	CompactionCount  int64
	CompactionDebt   uint64
}

PebbleDebugData holds pebble-specific metrics.

type PebbleLevelData added in v1.20.4

type PebbleLevelData struct {
	Level    int
	NumFiles int64
	Size     int64
	Score    float64
}

PebbleLevelData holds per-level pebble metrics.

type RecentBlockStatsEntry added in v1.20.4

type RecentBlockStatsEntry struct {
	Label        string
	BlockCount   int64
	Transactions int64
	Events       int64
	Transfers    int64
	ExecData     int64
	ExecDataSize int64
}

RecentBlockStatsEntry holds stats for a range of recent blocks.

type S3DebugData added in v1.20.4

type S3DebugData struct {
	Bucket     string
	PathPrefix string
	GetCount   int64
	PutCount   int64
	StatCount  int64
	GetBytes   int64
	PutBytes   int64
}

S3DebugData holds S3-specific statistics.

type SystemDebugData added in v1.20.4

type SystemDebugData struct {
	GoVersion      string
	NumGoroutine   int
	NumCPU         int
	Uptime         string
	MemAlloc       uint64
	MemTotalAlloc  uint64
	MemSys         uint64
	MemHeapAlloc   uint64
	MemHeapSys     uint64
	MemHeapIdle    uint64
	MemHeapInuse   uint64
	MemHeapObjects uint64
	MemStackInuse  uint64
	MemStackSys    uint64
	GCCycles       uint32
	GCPauseTotal   time.Duration
	GCLastPause    time.Duration
	GCNextTarget   uint64
}

SystemDebugData holds Go runtime statistics.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL