Versions in this module Expand all Collapse all v1 v1.2.2 Apr 7, 2024 Changes in this version + const BlocksToSkipAtEpochEnd + const MaxSafeLookbackWindow + const MinSafeLookbackWindow + func ComputeLookbackWindow(epochSize uint64, defaultLookbackWindow uint64, cip21 bool, ...) uint64 + type Monitor struct + func NewMonitor(store Store, epochSize, lookbackWindow uint64) *Monitor + func (um *Monitor) ComputeValidatorsUptime(epoch uint64, valSetSize int) ([]*big.Int, error) + func (um *Monitor) GetValidatorsActivity(epoch, numberWithinEpoch uint64, valSetSize int) ([]UptimeEntry, []float64, error) + func (um *Monitor) MonitoringWindow(epoch uint64) Window + func (um *Monitor) ProcessBlock(block *types.Block) error + type Store interface + ReadAccumulatedEpochUptime func(epoch uint64) *Uptime + WriteAccumulatedEpochUptime func(epoch uint64, uptime *Uptime) + type Uptime struct + Entries []UptimeEntry + LatestBlock uint64 + type UptimeEntry struct + LastSignedBlock uint64 + UpBlocks uint64 + func (u *UptimeEntry) String() string + type Window struct + End uint64 + Start uint64 + func MonitoringWindow(epochNumber uint64, epochSize uint64, lookbackWindowSize uint64) (Window, error) + func MustMonitoringWindow(epochNumber uint64, epochSize uint64, lookbackWindowSize uint64) Window + func (w Window) Contains(n uint64) bool + func (w Window) Size() uint64