Documentation
¶
Index ¶
- Constants
- Variables
- func AvgBlockSizeChartData() (*types.GenericChartData, error)
- func AvgBlockUtilChartData() (*types.GenericChartData, error)
- func AvgGasLimitChartData() (*types.GenericChartData, error)
- func AvgGasPrice() (*types.GenericChartData, error)
- func AvgGasUsedChartData() (*types.GenericChartData, error)
- func BlockCountChartData() (*types.GenericChartData, error)
- func BlockTimeAvgChartData() (*types.GenericChartData, error)
- func BurnedFeesChartData() (*types.GenericChartData, error)
- func Eth1HeadBlockRootHash() []byte
- func EthStoreDisclaimer() string
- func FinalizationDelay() uint64
- func GetExplorerConfigurationsWithDefaults() (types.ExplorerConfigurationMap, error)
- func GetFeed() [][4]string
- func GetIndexForPubkey(pubkey []byte) (uint64, error)
- func GetLatestStats() *types.Stats
- func GetMaxEffectiveBalance() uint64
- func GetPubkeyForIndex(index uint64) ([]byte, error)
- func GetRates(selectedCurrency string) *types.Rates
- func GlobalNotificationMessage() template.HTML
- func Init()
- func InitGitCoinFeed()
- func InitNotificationCollector(pubkeyCachePath string)
- func InitNotificationSender()
- func IsFeedOn() bool
- func IsSyncing() bool
- func LatestBurnData() *types.BurnPageData
- func LatestChartsPageData() []*types.ChartsPageDataChart
- func LatestEpoch() uint64
- func LatestEth1BlockNumber() uint64
- func LatestEthStoreStatistics() *types.EthStoreStatistics
- func LatestExportedStatisticDay() (uint64, error)
- func LatestFinalizedEpoch() uint64
- func LatestGasNowData() *types.GasNowPageData
- func LatestIndexPageData() *types.IndexPageData
- func LatestMempoolTransactions() *types.RawMempoolResponse
- func LatestNodeEpoch() uint64
- func LatestNodeFinalizedEpoch() uint64
- func LatestPoolsPageData() *types.PoolsResp
- func LatestProposedSlot() uint64
- func LatestQueueData() *types.QueuesEstimate
- func LatestRelaysPageData() *types.RelaysResp
- func LatestSlot() uint64
- func LatestSlotVizMetrics() []*types.SlotVizEpochs
- func LatestState() *types.LatestState
- func MarketCapChartData() (*types.GenericChartData, error)
- func NewAccountsChartData() (*types.GenericChartData, error)
- func NonFailedTxGasUsageChartData() (*types.GenericChartData, error)
- func PowerConsumptionChartData() (*types.GenericChartData, error)
- func ReportStatus(name, status string, metadata *json.RawMessage)
- func RunStepDepositTagging(ctx context.Context, balanceByIndex map[uint64]int64) (err error)
- func RunStepImport(ctx context.Context) (err error)
- func RunStepLido(ctx context.Context) (err error)
- func RunStepLidoCSM(ctx context.Context) (err error)
- func RunStepLidoSimpleDVT(ctx context.Context) (err error)
- func RunStepPopulateValidatorNames(ctx context.Context) (err error)
- func RunStepPrecompute(ctx context.Context) (err error)
- func RunStepRocketPool(ctx context.Context) (err error)
- func RunStepWithdrawalTagging(ctx context.Context) (_ map[uint64]int64, err error)
- func RunValidatorTaggerOnDemand(ctx context.Context, stepsCSV string) error
- func RunValidatorTaggerScheduler()
- func StartHistoricPriceService()
- func TotalEmissionChartData() (*types.GenericChartData, error)
- func TotalGasUsedChartData() (*types.GenericChartData, error)
- func TxCountChartData() (*types.GenericChartData, error)
- func WriteHistoricPricesForDay(ts time.Time) error
- type BigFloat
- type BlockWrapper
- type JobRun
- type MachineEvents
- type PeriodSpec
- type TxPoolContent
- type TxPoolContentTransaction
- type ValidatorEntityJoinRow
- type WebhookQueue
Constants ¶
const ( ConfigurationKeyVisibleFromEpoch types.ExplorerConfigurationKey = "VisibleFromEpoch" ConfigurationKeyVisibleToEpoch types.ExplorerConfigurationKey = "VisibleToEpoch" ConfigurationKeyHardforkEpoch types.ExplorerConfigurationKey = "HardforkEpoch" ConfigurationKeyHardforkName types.ExplorerConfigurationKey = "HardforkName" )
const ( JobStatusScheduled = "scheduled" JobStatusRunning = "running" JobStatusOK = "ok" JobStatusError = "error" JobStatusSkipped = "skipped" )
JobStatus represents the status stored in validator_tagger_job_runs.status
const (
ConfigurationCategorySlotViz types.ExplorerConfigurationCategory = "SlotVizOnMainPage"
)
Variables ¶
var ChartHandlers = map[string]chartHandler{ "blocks": {1, blocksChartData}, "validators": {2, activeValidatorsChartData}, "staked_ether": {3, stakedEtherChartData}, "average_balance": {4, averageBalanceChartData}, "network_liveness": {5, networkLivenessChartData}, "participation_rate": {6, participationRateChartData}, "stake_effectiveness": {9, stakeEffectivenessChartData}, "balance_distribution": {10, balanceDistributionChartData}, "effective_balance_distribution": {11, effectiveBalanceDistributionChartData}, "performance_distribution_365d": {12, performanceDistribution365dChartData}, "deposits": {13, depositsChartData}, "withdrawals": {17, withdrawalsChartData}, "graffiti_wordcloud": {14, graffitiCloudChartData}, "pools_distribution": {15, poolsDistributionChartData}, "historic_pool_performance": {16, historicPoolPerformanceData}, "avg_gas_used_chart_data": {22, AvgGasUsedChartData}, "execution_burned_fees": {23, BurnedFeesChartData}, "block_gas_used": {25, TotalGasUsedChartData}, "block_count_chart_data": {26, BlockCountChartData}, "block_time_avg_chart_data": {27, BlockTimeAvgChartData}, "avg_gas_limit_chart_data": {28, AvgGasLimitChartData}, "avg_block_util_chart_data": {29, AvgBlockUtilChartData}, "tx_count_chart_data": {31, TxCountChartData}, }
var DefaultExplorerConfiguration types.ExplorerConfigurationMap = types.ExplorerConfigurationMap{ ConfigurationCategorySlotViz: { ConfigurationKeyVisibleFromEpoch: {Value: "0", DataType: "int"}, ConfigurationKeyHardforkEpoch: {Value: "0", DataType: "int"}, ConfigurationKeyVisibleToEpoch: {Value: "4", DataType: "int"}, ConfigurationKeyHardforkName: {Value: "", DataType: "string"}, }, }
** This is the list of possible configurations that can be changed in the explorer administration Per default these values will be taken, overridden by the values from the db, if they exist. **
Functions ¶
func AvgBlockSizeChartData ¶
func AvgBlockSizeChartData() (*types.GenericChartData, error)
func AvgBlockUtilChartData ¶
func AvgBlockUtilChartData() (*types.GenericChartData, error)
func AvgGasLimitChartData ¶
func AvgGasLimitChartData() (*types.GenericChartData, error)
func AvgGasPrice ¶
func AvgGasPrice() (*types.GenericChartData, error)
func AvgGasUsedChartData ¶
func AvgGasUsedChartData() (*types.GenericChartData, error)
func BlockCountChartData ¶
func BlockCountChartData() (*types.GenericChartData, error)
func BlockTimeAvgChartData ¶
func BlockTimeAvgChartData() (*types.GenericChartData, error)
func BurnedFeesChartData ¶
func BurnedFeesChartData() (*types.GenericChartData, error)
func Eth1HeadBlockRootHash ¶
func Eth1HeadBlockRootHash() []byte
Eth1HeadBlockRootHash will return the hash of the current chain head block
func EthStoreDisclaimer ¶
func EthStoreDisclaimer() string
func FinalizationDelay ¶
func FinalizationDelay() uint64
FinalizationDelay will return the current Finalization Delay
func GetExplorerConfigurationsWithDefaults ¶
func GetExplorerConfigurationsWithDefaults() (types.ExplorerConfigurationMap, error)
func GetIndexForPubkey ¶
func GetLatestStats ¶
func GetMaxEffectiveBalance ¶ added in v1.59.0
func GetMaxEffectiveBalance() uint64
func GetPubkeyForIndex ¶
will retrieve the pubkey for a given validatorindex and store it for later use
func InitGitCoinFeed ¶
func InitGitCoinFeed()
func InitNotificationCollector ¶
func InitNotificationCollector(pubkeyCachePath string)
func InitNotificationSender ¶
func InitNotificationSender()
func LatestBurnData ¶
func LatestBurnData() *types.BurnPageData
func LatestChartsPageData ¶
func LatestChartsPageData() []*types.ChartsPageDataChart
LatestChartsPageData returns the latest chart page data
func LatestEth1BlockNumber ¶
func LatestEth1BlockNumber() uint64
LatestEth1BlockNumber will return most recent eth1 block number
func LatestEthStoreStatistics ¶
func LatestEthStoreStatistics() *types.EthStoreStatistics
func LatestExportedStatisticDay ¶
LatestExportedStatisticDay will return the last exported day in the validator_stats table
func LatestFinalizedEpoch ¶
func LatestFinalizedEpoch() uint64
LatestFinalizedEpoch will return the most recent epoch that has been finalized.
func LatestGasNowData ¶
func LatestGasNowData() *types.GasNowPageData
func LatestIndexPageData ¶
func LatestIndexPageData() *types.IndexPageData
LatestIndexPageData returns the latest index page data
func LatestMempoolTransactions ¶
func LatestMempoolTransactions() *types.RawMempoolResponse
func LatestNodeEpoch ¶
func LatestNodeEpoch() uint64
func LatestNodeFinalizedEpoch ¶
func LatestNodeFinalizedEpoch() uint64
func LatestPoolsPageData ¶
LatestPoolsPageData returns the latest pools page data
func LatestProposedSlot ¶
func LatestProposedSlot() uint64
LatestProposedSlot will return the latest proposed slot
func LatestQueueData ¶ added in v1.59.0
func LatestQueueData() *types.QueuesEstimate
func LatestRelaysPageData ¶
func LatestRelaysPageData() *types.RelaysResp
func LatestSlotVizMetrics ¶
func LatestSlotVizMetrics() []*types.SlotVizEpochs
func LatestState ¶
func LatestState() *types.LatestState
LatestState returns statistics about the current eth2 state
func MarketCapChartData ¶
func MarketCapChartData() (*types.GenericChartData, error)
func NewAccountsChartData ¶
func NewAccountsChartData() (*types.GenericChartData, error)
func NonFailedTxGasUsageChartData ¶
func NonFailedTxGasUsageChartData() (*types.GenericChartData, error)
func PowerConsumptionChartData ¶
func PowerConsumptionChartData() (*types.GenericChartData, error)
func ReportStatus ¶
func ReportStatus(name, status string, metadata *json.RawMessage)
Report the status of a particular service, will add current Pid and executable name Throttle calls to 1/min for each service name so that we don't report too often
func RunStepDepositTagging ¶ added in v1.59.0
RunStepDepositTagging tags remaining untagged validators by earliest deposit from_address. If balanceByIndex is nil, it will compute balances from withdrawal tagging logic first.
func RunStepImport ¶ added in v1.59.0
RunStepImport runs the primary import step (from local CSV or Dune if configured).
func RunStepLido ¶ added in v1.59.0
RunStepLido enriches Lido validators via the existing exporter/indexer.
func RunStepLidoCSM ¶ added in v1.59.0
RunStepLidoCSM enriches validators from Lido CSM module.
func RunStepLidoSimpleDVT ¶ added in v1.59.0
RunStepLidoSimpleDVT enriches validators from Lido Simple DVT module.
func RunStepPopulateValidatorNames ¶ added in v1.59.0
RunStepPopulateValidatorNames populates validator_names based on validator_entities.
func RunStepPrecompute ¶ added in v1.59.0
RunStepPrecompute runs the precompute aggregation for entities across periods.
func RunStepRocketPool ¶ added in v1.59.0
RunStepRocketPool sets Rocket Pool sub_entity based on node address.
func RunStepWithdrawalTagging ¶ added in v1.59.0
RunStepWithdrawalTagging tags untagged validators based on withdrawal credentials and returns balances map for reuse.
func RunValidatorTaggerOnDemand ¶ added in v1.59.0
RunValidatorTaggerOnDemand runs one or more steps provided by name, in order, and records them as manual runs.
func RunValidatorTaggerScheduler ¶ added in v1.59.0
func RunValidatorTaggerScheduler()
RunValidatorTaggerScheduler starts the scheduler loop: - Daily at 10:00 UTC: runs all daily steps in order, then precompute. - Hourly at HH:00 UTC (other than 10:00): runs precompute only. Uses validator_tagger_job_runs to track scheduling, status, and errors.
func StartHistoricPriceService ¶
func StartHistoricPriceService()
func TotalEmissionChartData ¶
func TotalEmissionChartData() (*types.GenericChartData, error)
func TotalGasUsedChartData ¶
func TotalGasUsedChartData() (*types.GenericChartData, error)
func TxCountChartData ¶
func TxCountChartData() (*types.GenericChartData, error)
Types ¶
type BlockWrapper ¶ added in v1.59.0
type BlockWrapper struct {
Header *geth_types.Header
Transactions []rpcTransaction
}
BlockWrapper is a simple wrapper for Ethereum block data.
type JobRun ¶ added in v1.59.0
type JobRun struct {
ID int64
JobName string
RunGroupID *string
ScheduledAtUTC time.Time
StartedAt sql.NullTime
FinishedAt sql.NullTime
Status string
ErrorText sql.NullString
TriggeredBy string
}
JobRun represents a row in validator_tagger_job_runs.
type MachineEvents ¶
type PeriodSpec ¶ added in v1.59.0
type PeriodSpec struct {
Label string // one of: "1d", "7d", "30d", "90d"
RollingTable string // e.g., validator_dashboard_data_rolling_24h / _7d / _30d / _90d
HistoryTable string // e.g., validator_dashboard_data_hourly / _daily / _monthly
HistoryWhereClause string // optional WHERE clause for limiting the history time window (without the WHERE keyword)
}
PeriodSpec defines ClickHouse sources and labels for a precomputation period.
type TxPoolContent ¶
type TxPoolContent struct {
Pending map[string]map[int]*TxPoolContentTransaction
}
type TxPoolContentTransaction ¶
type TxPoolContentTransaction struct {
GasPrice string `json:"gasPrice"`
MaxFeePerGas string `json:"maxFeePerGas"`
Hash string `json:"hash"`
}
func (*TxPoolContentTransaction) GetGasPrice ¶
func (tx *TxPoolContentTransaction) GetGasPrice() *big.Int
type ValidatorEntityJoinRow ¶ added in v1.59.0
Source Files
¶
- charts_updater.go
- configuration.go
- execution_layer.go
- gitcoin_feed_updater.go
- historic_prices.go
- monitoring.go
- notifications.go
- pubkeyCache.go
- queue.go
- services.go
- stats.go
- status.go
- validator_tagger_common.go
- validator_tagger_import.go
- validator_tagger_jobs.go
- validator_tagger_lido.go
- validator_tagger_precompute_periods.go
- validator_tagger_rocketpool.go
- validator_tagger_scheduler.go
- validator_tagger_steps.go
- validator_tagger_tagging.go