Documentation
¶
Index ¶
- Constants
- Variables
- func InitChainService(ctx context.Context, logger logrus.FieldLogger)
- func StartCallRateLimiter(proxyCount uint, rateLimit uint, burstLimit uint) error
- func StartFrontendCache(logger logrus.FieldLogger) error
- func StartTxSignaturesService() error
- type BidParentClass
- type BpoForkInfo
- type BuilderOnboardingProjection
- type BuilderWithIndex
- type BuildoorInventory
- type CallRateLimiter
- type ChainService
- func (bs *ChainService) CheckBlockOrphanedStatus(ctx context.Context, blockRoot phase0.Root) dbtypes.SlotStatus
- func (bs *ChainService) GetActiveBuildersByIndexes(ctx context.Context, indexes []gloas.BuilderIndex) map[gloas.BuilderIndex]*gloas.Builder
- func (bs *ChainService) GetBeaconIndexer() *beacon.Indexer
- func (bs *ChainService) GetBlobSidecarsByBlockRoot(ctx context.Context, blockroot []byte) ([]*deneb.BlobSidecar, error)
- func (bs *ChainService) GetBlockBlob(ctx context.Context, blockroot phase0.Root, blobIndex uint64) (*deneb.Blob, error)
- func (bs *ChainService) GetBpoForks() []*BpoForkInfo
- func (bs *ChainService) GetBuilderBalances() []phase0.Gwei
- func (bs *ChainService) GetBuilderBids(ctx context.Context, builderIndex uint64, minSlot uint64, maxSlot *uint64, ...) []*dbtypes.BlockBid
- func (bs *ChainService) GetBuilderByIndex(index gloas.BuilderIndex) *gloas.Builder
- func (bs *ChainService) GetBuilderDepositIndexer() *syscontracts.BuilderDepositIndexer
- func (bs *ChainService) GetBuilderDepositsByFilter(ctx context.Context, filter *dbtypes.BuilderDepositFilter, pageOffset uint64, ...) ([]*CombinedBuilderDeposit, uint64, uint64)
- func (bs *ChainService) GetBuilderExitIndexer() *syscontracts.BuilderExitIndexer
- func (bs *ChainService) GetBuilderExitsByFilter(ctx context.Context, filter *dbtypes.BuilderExitFilter, pageOffset uint64, ...) ([]*CombinedBuilderExit, uint64, uint64)
- func (bs *ChainService) GetBuilderIndexByPubkey(pubkey phase0.BLSPubKey) (gloas.BuilderIndex, bool)
- func (bs *ChainService) GetBuilderOnboardingProjection(ctx context.Context) *BuilderOnboardingProjection
- func (bs *ChainService) GetBuilderTenureEndEpoch(ctx context.Context, index gloas.BuilderIndex, depositEpoch phase0.Epoch) *phase0.Epoch
- func (bs *ChainService) GetBuilderURL(builderIndex uint64) string
- func (bs *ChainService) GetBuildersByPubkeys(ctx context.Context, pubkeys [][]byte) map[string]BuilderWithIndex
- func (bs *ChainService) GetCanonicalForkIds() []uint64
- func (bs *ChainService) GetCanonicalForkKeys() []beacon.ForkKey
- func (bs *ChainService) GetChainState() *consensus.ChainState
- func (bs *ChainService) GetConsensusClientForks() []*ConsensusClientFork
- func (bs *ChainService) GetConsensusClients() []*consensus.Client
- func (bs *ChainService) GetConsolidationIndexer() *syscontracts.ConsolidationIndexer
- func (bs *ChainService) GetConsolidationQueueByFilter(ctx context.Context, filter *ConsolidationQueueFilter, offset uint64, ...) ([]*ConsolidationQueueEntry, uint64)
- func (bs *ChainService) GetConsolidationRequestOperationsByFilter(ctx context.Context, filter *dbtypes.ConsolidationRequestFilter, ...) ([]*dbtypes.ConsolidationRequest, uint64)
- func (bs *ChainService) GetConsolidationRequestsByFilter(ctx context.Context, filter *CombinedConsolidationRequestFilter, ...) ([]*CombinedConsolidationRequest, uint64, uint64)
- func (bs *ChainService) GetDbBlocksByFilter(ctx context.Context, filter *dbtypes.BlockFilter, pageIdx uint64, ...) []*dbtypes.AssignedSlot
- func (bs *ChainService) GetDbBlocksByParentRoot(ctx context.Context, parentRoot phase0.Root) []*dbtypes.Slot
- func (bs *ChainService) GetDbBlocksForSlots(ctx context.Context, firstSlot uint64, slotLimit uint32, withMissing bool, ...) []*dbtypes.Slot
- func (bs *ChainService) GetDbEpochs(ctx context.Context, firstEpoch uint64, limit uint32) []*dbtypes.Epoch
- func (bs *ChainService) GetDepositOperationsByFilter(ctx context.Context, filter *dbtypes.DepositFilter, ...) ([]*dbtypes.DepositWithTx, uint64)
- func (bs *ChainService) GetDepositRequestsByFilter(ctx context.Context, filter *CombinedDepositRequestFilter, pageOffset uint64, ...) ([]*CombinedDepositRequest, uint64)
- func (bs *ChainService) GetEnsResolver() *EnsResolver
- func (bs *ChainService) GetEpochCommittees(ctx context.Context, epoch phase0.Epoch) [][][]phase0.ValidatorIndex
- func (bs *ChainService) GetEpochCommitteesForRoot(ctx context.Context, epoch phase0.Epoch, depRoot phase0.Root) [][][]phase0.ValidatorIndex
- func (bs *ChainService) GetEpochProposers(ctx context.Context, epoch phase0.Epoch) []uint64
- func (bs *ChainService) GetEpochProposersForRoot(ctx context.Context, epoch phase0.Epoch, depRoot phase0.Root) []uint64
- func (bs *ChainService) GetExecutionChainState() *execution.ChainState
- func (bs *ChainService) GetExecutionClients() []*execution.Client
- func (bs *ChainService) GetFilteredBuilderSet(ctx context.Context, filter *dbtypes.BuilderFilter, withBalance bool) ([]BuilderWithIndex, uint64)
- func (bs *ChainService) GetFilteredQueuedDeposits(ctx context.Context, filter *QueuedDepositFilter) []*IndexedDepositQueueEntry
- func (bs *ChainService) GetFilteredValidatorSet(ctx context.Context, filter *dbtypes.ValidatorFilter, withBalance bool) ([]v1.Validator, uint64)
- func (bs *ChainService) GetFinalizedEpoch() (phase0.Epoch, phase0.Root)
- func (bs *ChainService) GetGenesis() (*v1.Genesis, error)
- func (bs *ChainService) GetHeadForks(readyOnly bool) []*beacon.ForkHead
- func (bs *ChainService) GetHighestElBlockNumber(ctx context.Context, overrideForkId *beacon.ForkKey) uint64
- func (bs *ChainService) GetIndexedDepositQueue(ctx context.Context, headBlock *beacon.Block) *IndexedDepositQueue
- func (bs *ChainService) GetParentForkIds(forkId beacon.ForkKey) []beacon.ForkKey
- func (bs *ChainService) GetRecentEpochStats(overrideForkId *beacon.ForkKey) (*beacon.EpochStatsValues, phase0.Epoch)
- func (bs *ChainService) GetSlashingsByFilter(ctx context.Context, filter *dbtypes.SlashingFilter, pageIdx uint64, ...) ([]*dbtypes.Slashing, uint64)
- func (bs *ChainService) GetSlotBidSeen(ctx context.Context, slot phase0.Slot) *btypes.SlotBids
- func (bs *ChainService) GetSlotBidsClassified(ctx context.Context, slot phase0.Slot, parentRoot phase0.Root) []*ClassifiedBlockBid
- func (bs *ChainService) GetSlotCommittees(ctx context.Context, slot phase0.Slot) [][]phase0.ValidatorIndex
- func (bs *ChainService) GetSlotCommitteesForRoot(ctx context.Context, slot phase0.Slot, depRoot phase0.Root) [][]phase0.ValidatorIndex
- func (bs *ChainService) GetSlotDetailsByBlockroot(ctx context.Context, blockroot phase0.Root) (*CombinedBlockResponse, error)
- func (bs *ChainService) GetSlotDetailsBySlot(ctx context.Context, slot phase0.Slot) (*CombinedBlockResponse, error)
- func (bs *ChainService) GetSlotPtc(ctx context.Context, slot phase0.Slot) []phase0.ValidatorIndex
- func (bs *ChainService) GetSlotPtcForRoot(ctx context.Context, slot phase0.Slot, depRoot phase0.Root) []phase0.ValidatorIndex
- func (bs *ChainService) GetSnooperManager() *snooper.SnooperManager
- func (bs *ChainService) GetSystemContractAddress(systemContract string) common.Address
- func (bs *ChainService) GetSystemContractAddresses() map[common.Address]string
- func (bs *ChainService) GetTxIndexer() *txindexer.TxIndexer
- func (bs *ChainService) GetValidatorByIndex(index phase0.ValidatorIndex, withBalance bool) *v1.Validator
- func (bs *ChainService) GetValidatorDutyStats(ctx context.Context, proposalLookbackEpochs phase0.Epoch, ...) *ValidatorDutyStats
- func (bs *ChainService) GetValidatorInclusionDistance(validatorIndex phase0.ValidatorIndex, lookbackEpochs phase0.Epoch) (count uint64, totalDelay uint64)
- func (bs *ChainService) GetValidatorIndexByPubkey(pubkey phase0.BLSPubKey) (phase0.ValidatorIndex, bool)
- func (bs *ChainService) GetValidatorLiveness(validatorIndex phase0.ValidatorIndex, lookbackEpochs phase0.Epoch) uint64
- func (bs *ChainService) GetValidatorName(index uint64) string
- func (bs *ChainService) GetValidatorNameAt(index uint64, slot phase0.Slot) string
- func (bs *ChainService) GetValidatorNameAtTime(index uint64, ts int64) string
- func (bs *ChainService) GetValidatorNamesCount() uint64
- func (bs *ChainService) GetValidatorStatusMap() map[v1.ValidatorState]uint64
- func (bs *ChainService) GetValidatorVotingActivity(validatorIndex phase0.ValidatorIndex) ([]beacon.ValidatorActivity, phase0.Epoch)
- func (bs *ChainService) GetVoluntaryExitsByFilter(ctx context.Context, filter *dbtypes.VoluntaryExitFilter, pageIdx uint64, ...) ([]*dbtypes.VoluntaryExit, uint64)
- func (bs *ChainService) GetWithdrawalIndexer() *syscontracts.WithdrawalIndexer
- func (bs *ChainService) GetWithdrawalQueueByFilter(ctx context.Context, filter *WithdrawalQueueFilter, pageOffset uint64, ...) ([]*WithdrawalQueueEntry, uint64, phase0.Gwei)
- func (bs *ChainService) GetWithdrawalRequestOperationsByFilter(ctx context.Context, filter *dbtypes.WithdrawalRequestFilter, ...) ([]*dbtypes.WithdrawalRequest, uint64)
- func (bs *ChainService) GetWithdrawalRequestsByFilter(ctx context.Context, filter *CombinedWithdrawalRequestFilter, ...) ([]*CombinedWithdrawalRequest, uint64, uint64)
- func (bs *ChainService) GetWithdrawalsByFilter(ctx context.Context, filter *dbtypes.WithdrawalFilter, pageIdx uint64, ...) ([]*dbtypes.Withdrawal, uint64)
- func (bs *ChainService) IsProjectedValidatorIndex(index phase0.ValidatorIndex) bool
- func (bs *ChainService) ResolveDependentRoot(ctx context.Context, epoch phase0.Epoch, blockRoot phase0.Root) (phase0.Root, bool)
- func (cs *ChainService) StartService() error
- func (bs *ChainService) StopService()
- func (bs *ChainService) StreamActiveValidatorData(activeOnly bool, cb beacon.ValidatorSetStreamer) error
- type ClassifiedBlockBid
- type CombinedBlockResponse
- type CombinedBuilderDeposit
- type CombinedBuilderExit
- type CombinedConsolidationRequest
- func (ccr *CombinedConsolidationRequest) ResolveSourceName(bs *ChainService) string
- func (ccr *CombinedConsolidationRequest) ResolveTargetName(bs *ChainService) string
- func (ccr *CombinedConsolidationRequest) SourceAddress() []byte
- func (ccr *CombinedConsolidationRequest) SourceIndex() *uint64
- func (ccr *CombinedConsolidationRequest) SourcePubkey() []byte
- func (ccr *CombinedConsolidationRequest) TargetIndex() *uint64
- func (ccr *CombinedConsolidationRequest) TargetPubkey() []byte
- type CombinedConsolidationRequestFilter
- type CombinedDepositRequest
- func (ccr *CombinedDepositRequest) Amount() uint64
- func (ccr *CombinedDepositRequest) DepositIndex() uint64
- func (ccr *CombinedDepositRequest) PublicKey() []byte
- func (ccr *CombinedDepositRequest) ResolveValidatorName(bs *ChainService, index uint64) string
- func (ccr *CombinedDepositRequest) SourceAddress() []byte
- func (ccr *CombinedDepositRequest) WithdrawalCredentials() []byte
- type CombinedDepositRequestFilter
- type CombinedWithdrawalRequest
- func (cwr *CombinedWithdrawalRequest) Amount() uint64
- func (cwr *CombinedWithdrawalRequest) ResolveValidatorName(bs *ChainService) string
- func (cwr *CombinedWithdrawalRequest) SourceAddress() []byte
- func (cwr *CombinedWithdrawalRequest) ValidatorIndex() *uint64
- func (cwr *CombinedWithdrawalRequest) ValidatorPubkey() []byte
- type CombinedWithdrawalRequestFilter
- type ConsensusClientFork
- type ConsolidationQueueEntry
- type ConsolidationQueueFilter
- type DasGuardian
- func (d *DasGuardian) Close() error
- func (d *DasGuardian) ScanNode(ctx context.Context, nodeEnr string, slots []uint64) (*dasguardian.DasGuardianScanResult, error)
- func (d *DasGuardian) ScanNodeWithCallback(ctx context.Context, nodeEnr string, slotCallback SlotSelectorCallback) (*dasguardian.DasGuardianScanResult, error)
- type EnsResolver
- type EnsResolverStats
- type FrontendCachePageError
- type FrontendCacheProcessingPage
- type FrontendCacheService
- func (fc *FrontendCacheService) GetPageTypeStats() []*cache.PageTypeStats
- func (fc *FrontendCacheService) GetStats() *FrontendCacheStats
- func (fc *FrontendCacheService) GetTieredCacheStats() *cache.TieredCacheStats
- func (fc *FrontendCacheService) ProcessCachedPage(pageKey string, caching bool, returnValue interface{}, ...) (interface{}, error)
- func (fc *FrontendCacheService) RemoveCacheByPrefix(pageKeyPrefix string) error
- type FrontendCacheStats
- type IndexedDepositQueue
- type IndexedDepositQueueEntry
- type PageDataHandlerFn
- type ProjectedBuilderDeposit
- type QueuedDepositFilter
- type RPCError
- type RPCProxy
- type RPCProxyConfig
- type RPCRequest
- type RPCResponse
- type RateLimiter
- type SlotSelectorCallback
- type TokenBucket
- type TxSignaturesLookup
- type TxSignaturesService
- type ValidatorDutyStat
- type ValidatorDutyStats
- type ValidatorNames
- func (vn *ValidatorNames) GetValidatorName(index uint64) string
- func (vn *ValidatorNames) GetValidatorNameAt(index uint64, slot phase0.Slot) string
- func (vn *ValidatorNames) GetValidatorNameAtTime(index uint64, ts int64) string
- func (vn *ValidatorNames) GetValidatorNameByPubkey(pubkey []byte) string
- func (vn *ValidatorNames) GetValidatorNamesCount() uint64
- func (vn *ValidatorNames) LoadValidatorNames() chan bool
- func (vn *ValidatorNames) StartUpdater()
- func (vn *ValidatorNames) UpdateDb(ctx context.Context) error
- type ValidatorWithIndex
- type WithdrawalQueueEntry
- type WithdrawalQueueFilter
Constants ¶
const BuilderIndexFlag = beacon.BuilderIndexFlag
BuilderIndexFlag separates builder indices from validator indices A validator/builder index with this flag set is a builder index
Variables ¶
var ErrTooManyPageRequests = fmt.Errorf("too many concurrent page requests")
ErrTooManyPageRequests is returned when the concurrency limit is reached.
Functions ¶
func InitChainService ¶ added in v1.11.0
func InitChainService(ctx context.Context, logger logrus.FieldLogger)
InitChainService is used to initialize the global beaconchain service
func StartCallRateLimiter ¶
StartFrontendCache is used to start the global frontend cache service
func StartFrontendCache ¶
func StartFrontendCache(logger logrus.FieldLogger) error
StartFrontendCache is used to start the global frontend cache service
func StartTxSignaturesService ¶
func StartTxSignaturesService() error
StartTxSignaturesService is used to start the global transaction signatures service
Types ¶
type BidParentClass ¶ added in v1.24.4
type BidParentClass uint8
BidParentClass classifies which chain position an execution payload bid targets, relative to the parent chain of a reference block (usually the block that was actually proposed in the bid's slot).
const ( // BidParentClassUnknown means the bid's parent root could not be resolved to a known block. BidParentClassUnknown BidParentClass = iota // BidParentClassParent means the bid targets the reference block's beacon parent. BidParentClassParent // BidParentClassReorg means the bid targets a deeper ancestor of the reference block, // i.e. it proposes to orphan the block(s) between that ancestor and the reference block. BidParentClassReorg // BidParentClassOrphaned means the bid targets a known block outside the reference // block's parent chain (a competing fork that ended up orphaned). BidParentClassOrphaned )
func (BidParentClass) String ¶ added in v1.24.4
func (c BidParentClass) String() string
String returns the wire/display identifier of the bid parent class.
type BpoForkInfo ¶ added in v1.24.4
type BpoForkInfo struct {
Name string
Epoch phase0.Epoch
Time time.Time
MaxBlobsPerBlock uint64
ForkDigest phase0.ForkDigest
}
BpoForkInfo describes a BPO (blob parameter only) fork, normalized from either the EL genesis config (preferred, carries the enumerated BPO numbers) or the CL BLOB_SCHEDULE (fallback, deduplicated & non-enumerated).
type BuilderOnboardingProjection ¶ added in v1.24.0
type BuilderOnboardingProjection struct {
GloasForkEpoch phase0.Epoch
GloasForkTime time.Time
// Deposits holds every (canonical) builder-credential deposit on chain, in deposit-index order,
// each annotated with its projected fate.
Deposits []*ProjectedBuilderDeposit
OnboardedNewCount uint64
OnboardedTopUpCount uint64
TooEarlyCount uint64
InvalidSignatureCount uint64
KeptAsValidatorCount uint64
// QueueEstimation is the epoch the current queue fully drains (0 = unknown / empty); and a
// secondary stat: all queued deposits (any credentials) processed before the fork epoch.
QueueEstimation phase0.Epoch
TotalQueueProcessedBeforeFork uint64
// HasSafetyEstimate / DepositSafe answer "is it safe to deposit right now". DepositSafe is true
// when a deposit submitted now would still be queued at the fork (and so onboarded as a builder);
// when false the queue is too short and it would be processed as a validator before the fork.
HasSafetyEstimate bool
DepositSafe bool
NewDepositEstimateEpoch phase0.Epoch
NewDepositEstimateTime time.Time
// Truncated reports that the deposit enumeration hit projectionFetchCap (some deposits omitted).
Truncated bool
}
BuilderOnboardingProjection is the projected outcome, computed pre-Gloas, of the one-time builder onboarding at the Gloas fork transition. Its primary data source is the on-chain builder-credential deposits (so deposits made in the epoch before the fork — not yet reflected in the once-per-epoch queue snapshot — and already-applied deposits are both covered); the pending deposit queue is used only to cross-check queue position and the churn-based processing estimate. It is an estimate: a snapshot of current deposits and churn that does not model future deposits.
type BuilderWithIndex ¶ added in v1.21.0
type BuilderWithIndex struct {
Index gloas.BuilderIndex
Builder *gloas.Builder
Superseded bool
}
type BuildoorInventory ¶ added in v1.23.0
type BuildoorInventory struct {
// contains filtered or unexported fields
}
func NewBuildoorInventory ¶ added in v1.23.0
func NewBuildoorInventory(ctx context.Context) *BuildoorInventory
func (*BuildoorInventory) GetBuilderName ¶ added in v1.23.0
func (b *BuildoorInventory) GetBuilderName(builderIndex uint64) string
func (*BuildoorInventory) GetBuilderURL ¶ added in v1.23.0
func (b *BuildoorInventory) GetBuilderURL(builderIndex uint64) string
func (*BuildoorInventory) StartUpdater ¶ added in v1.23.0
func (b *BuildoorInventory) StartUpdater()
type CallRateLimiter ¶
type CallRateLimiter struct {
// contains filtered or unexported fields
}
var GlobalCallRateLimiter *CallRateLimiter
func (*CallRateLimiter) CheckCallLimit ¶
func (crl *CallRateLimiter) CheckCallLimit(r *http.Request, callCost uint) error
type ChainService ¶
type ChainService struct {
// contains filtered or unexported fields
}
var GlobalBeaconService *ChainService
func (*ChainService) CheckBlockOrphanedStatus ¶
func (bs *ChainService) CheckBlockOrphanedStatus(ctx context.Context, blockRoot phase0.Root) dbtypes.SlotStatus
func (*ChainService) GetActiveBuildersByIndexes ¶ added in v1.24.0
func (bs *ChainService) GetActiveBuildersByIndexes(ctx context.Context, indexes []gloas.BuilderIndex) map[gloas.BuilderIndex]*gloas.Builder
GetActiveBuildersByIndexes batch-resolves the builder currently occupying each of the given indexes (cache first, then a single batched DB query for misses). Builder indexes can be reused (EIP-8282), so callers compare the returned builder's pubkey against the pubkey they expect to tell whether that pubkey still owns the index or was superseded.
func (*ChainService) GetBeaconIndexer ¶ added in v1.11.0
func (bs *ChainService) GetBeaconIndexer() *beacon.Indexer
func (*ChainService) GetBlobSidecarsByBlockRoot ¶
func (bs *ChainService) GetBlobSidecarsByBlockRoot(ctx context.Context, blockroot []byte) ([]*deneb.BlobSidecar, error)
GetBlobSidecarsByBlockRoot retrieves the blob sidecars for a given block root. It first tries to find a client that has the block root in its cache, and if not found, it falls back to a random ready client. It then retrieves the blob sidecars for the block root and returns them.
func (*ChainService) GetBlockBlob ¶ added in v1.11.0
func (bs *ChainService) GetBlockBlob(ctx context.Context, blockroot phase0.Root, blobIndex uint64) (*deneb.Blob, error)
GetBlockBlob retrieves the blob data for a given block root and blob index. It uses GetBlobsByBlockroot which works for both pre-Fulu and Fulu+ blocks.
func (*ChainService) GetBpoForks ¶ added in v1.24.4
func (bs *ChainService) GetBpoForks() []*BpoForkInfo
GetBpoForks returns all BPO forks of the network. The EL genesis config is used as source if available, as it enumerates the BPO forks (bpo1Time, bpo2Time, ...), so the fork names stay correct even if the schedule doesn't start at BPO1 or earlier BPOs are collapsed into genesis. Without an EL genesis config, the forks are derived from the CL BLOB_SCHEDULE and numbered sequentially.
func (*ChainService) GetBuilderBalances ¶ added in v1.21.0
func (bs *ChainService) GetBuilderBalances() []phase0.Gwei
GetBuilderBalances returns the current builder balances (epoch-start adjusted for in-epoch withdrawals).
func (*ChainService) GetBuilderBids ¶ added in v1.24.2
func (bs *ChainService) GetBuilderBids(ctx context.Context, builderIndex uint64, minSlot uint64, maxSlot *uint64, limit uint32) []*dbtypes.BlockBid
GetBuilderBids returns the bids submitted by a builder index within the [minSlot, maxSlot] slot window (maxSlot nil = open), newest first, merging the indexer's in-memory bid cache with the DB. The most recent bids live only in the cache until they are flushed, so a DB-only query would miss them; callers must always go through this accessor rather than db.GetBidsByBuilderIndex directly.
func (*ChainService) GetBuilderByIndex ¶ added in v1.21.0
func (bs *ChainService) GetBuilderByIndex(index gloas.BuilderIndex) *gloas.Builder
GetBuilderByIndex returns the builder by index
func (*ChainService) GetBuilderDepositIndexer ¶ added in v1.24.0
func (bs *ChainService) GetBuilderDepositIndexer() *syscontracts.BuilderDepositIndexer
func (*ChainService) GetBuilderDepositsByFilter ¶ added in v1.24.0
func (bs *ChainService) GetBuilderDepositsByFilter(ctx context.Context, filter *dbtypes.BuilderDepositFilter, pageOffset uint64, pageSize uint32) ([]*CombinedBuilderDeposit, uint64, uint64)
GetBuilderDepositsByFilter returns builder deposit requests merged from the pending EL request txs (not yet dequeued) and the included CL requests (cache + DB), each paired with its matching request tx.
func (*ChainService) GetBuilderExitIndexer ¶ added in v1.24.0
func (bs *ChainService) GetBuilderExitIndexer() *syscontracts.BuilderExitIndexer
func (*ChainService) GetBuilderExitsByFilter ¶ added in v1.24.0
func (bs *ChainService) GetBuilderExitsByFilter(ctx context.Context, filter *dbtypes.BuilderExitFilter, pageOffset uint64, pageSize uint32) ([]*CombinedBuilderExit, uint64, uint64)
GetBuilderExitsByFilter returns builder exit requests merged from the pending EL request txs (not yet dequeued) and the included CL requests (cache + DB), each paired with its matching request tx.
func (*ChainService) GetBuilderIndexByPubkey ¶ added in v1.24.0
func (bs *ChainService) GetBuilderIndexByPubkey(pubkey phase0.BLSPubKey) (gloas.BuilderIndex, bool)
GetBuilderIndexByPubkey resolves a builder index from its pubkey via the dedicated builder pubkey cache (separate from validators, see GetValidatorIndexByPubkey).
func (*ChainService) GetBuilderOnboardingProjection ¶ added in v1.24.0
func (bs *ChainService) GetBuilderOnboardingProjection(ctx context.Context) *BuilderOnboardingProjection
GetBuilderOnboardingProjection projects the builders that would be onboarded at the Gloas fork transition from the builder-credential deposits made before the fork. It returns nil when Gloas is not scheduled (no finite fork epoch) or the chain head/queue cannot be resolved. It is meant for the builder deposits page before the fork, where the real builder_deposits table is still empty.
It enumerates every 0xB0-credential deposit and classifies each: deposits already applied or that the churn queue would process before the fork become regular validators ("too early"); the rest register builders (or top up earlier ones), drop on an invalid proof-of-possession, or stay as validator deposits when they share a pubkey with a validator — mirroring onboard_builders_from_pending_deposits over the deposits that survive to the fork.
func (*ChainService) GetBuilderTenureEndEpoch ¶ added in v1.24.2
func (bs *ChainService) GetBuilderTenureEndEpoch(ctx context.Context, index gloas.BuilderIndex, depositEpoch phase0.Epoch) *phase0.Epoch
GetBuilderTenureEndEpoch returns the epoch at which the builder with the given deposit epoch stopped owning its index, i.e. the deposit epoch of the next builder that took over the same index (EIP-8282 index reuse). It returns nil when the builder is the current occupant of the index (no successor), meaning its tenure is still open.
The successor is the smallest deposit epoch strictly greater than depositEpoch among all builders (current cache occupant plus every persisted row) that have held the index. Callers convert the returned tenure to a slot window to scope index-keyed data (blocks, bids, withdrawals) to a specific builder's lifetime rather than mixing data from every builder that reused the index.
func (*ChainService) GetBuilderURL ¶ added in v1.23.0
func (bs *ChainService) GetBuilderURL(builderIndex uint64) string
func (*ChainService) GetBuildersByPubkeys ¶ added in v1.24.2
func (bs *ChainService) GetBuildersByPubkeys(ctx context.Context, pubkeys [][]byte) map[string]BuilderWithIndex
GetBuildersByPubkeys batch-resolves builders by their pubkey (their stable identity), merging the in-memory cache (current occupants) with the DB (which also holds superseded builders). The result is keyed by string(pubkey). This is the correct way to attribute a builder deposit/exit to its builder: the pubkey uniquely identifies the builder, whereas the persisted builder_index on the request row is a point-in-time snapshot that can be nil (never resolved) or belong to a reused index.
func (*ChainService) GetCanonicalForkIds ¶ added in v1.13.0
func (bs *ChainService) GetCanonicalForkIds() []uint64
func (*ChainService) GetCanonicalForkKeys ¶ added in v1.14.0
func (bs *ChainService) GetCanonicalForkKeys() []beacon.ForkKey
func (*ChainService) GetChainState ¶ added in v1.11.0
func (bs *ChainService) GetChainState() *consensus.ChainState
func (*ChainService) GetConsensusClientForks ¶ added in v1.11.0
func (bs *ChainService) GetConsensusClientForks() []*ConsensusClientFork
func (*ChainService) GetConsensusClients ¶ added in v1.10.0
func (bs *ChainService) GetConsensusClients() []*consensus.Client
func (*ChainService) GetConsolidationIndexer ¶ added in v1.12.1
func (bs *ChainService) GetConsolidationIndexer() *syscontracts.ConsolidationIndexer
func (*ChainService) GetConsolidationQueueByFilter ¶ added in v1.19.0
func (bs *ChainService) GetConsolidationQueueByFilter(ctx context.Context, filter *ConsolidationQueueFilter, offset uint64, limit uint64) ([]*ConsolidationQueueEntry, uint64)
func (*ChainService) GetConsolidationRequestOperationsByFilter ¶ added in v1.13.0
func (bs *ChainService) GetConsolidationRequestOperationsByFilter(ctx context.Context, filter *dbtypes.ConsolidationRequestFilter, pageOffset uint64, pageSize uint32) ([]*dbtypes.ConsolidationRequest, uint64)
func (*ChainService) GetConsolidationRequestsByFilter ¶ added in v1.12.0
func (bs *ChainService) GetConsolidationRequestsByFilter(ctx context.Context, filter *CombinedConsolidationRequestFilter, pageOffset uint64, pageSize uint32) ([]*CombinedConsolidationRequest, uint64, uint64)
func (*ChainService) GetDbBlocksByFilter ¶
func (bs *ChainService) GetDbBlocksByFilter(ctx context.Context, filter *dbtypes.BlockFilter, pageIdx uint64, pageSize uint32, withScheduledCount uint64) []*dbtypes.AssignedSlot
GetDbBlocksByFilter retrieves a filtered range of blocks from cache & database. The filter parameter specifies the filter criteria. The pageIdx parameter specifies the page index. The pageSize parameter specifies the page size. The withScheduledCount parameter specifies the number of scheduled slots to include. The returned slice contains the retrieved blocks.
func (*ChainService) GetDbBlocksByParentRoot ¶
func (*ChainService) GetDbBlocksForSlots ¶
func (bs *ChainService) GetDbBlocksForSlots(ctx context.Context, firstSlot uint64, slotLimit uint32, withMissing bool, withOrphaned bool) []*dbtypes.Slot
GetDbBlocksForSlots retrieves blocks for a range of slots from cache & database. The firstSlot parameter specifies the starting slot. The slotLimit parameter limits the number of slots to retrieve. The withMissing parameter indicates whether to include missing blocks. The withOrphaned parameter indicates whether to include orphaned blocks. The returned slice contains the retrieved blocks.
func (*ChainService) GetDbEpochs ¶
func (*ChainService) GetDepositOperationsByFilter ¶ added in v1.15.0
func (bs *ChainService) GetDepositOperationsByFilter(ctx context.Context, filter *dbtypes.DepositFilter, txFilter *dbtypes.DepositTxFilter, pageOffset uint64, pageSize uint32) ([]*dbtypes.DepositWithTx, uint64)
func (*ChainService) GetDepositRequestsByFilter ¶ added in v1.15.0
func (bs *ChainService) GetDepositRequestsByFilter(ctx context.Context, filter *CombinedDepositRequestFilter, pageOffset uint64, pageSize uint32) ([]*CombinedDepositRequest, uint64)
func (*ChainService) GetEnsResolver ¶ added in v1.24.2
func (bs *ChainService) GetEnsResolver() *EnsResolver
GetEnsResolver returns the ENS resolver service (always non-nil; a no-op when the feature is disabled).
func (*ChainService) GetEpochCommittees ¶ added in v1.24.4
func (bs *ChainService) GetEpochCommittees(ctx context.Context, epoch phase0.Epoch) [][][]phase0.ValidatorIndex
GetEpochCommittees returns the attester committees for every slot of an epoch, indexed [slotIndex][committeeIndex] -> global validator indices in committee order. Unlike calling GetSlotCommittees per slot, it loads the epoch's duties exactly once (from the in-memory epoch cache, or a single blockdb read), avoiding a redundant blockdb/S3 fetch of the same duties object per slot. Returns nil if the duties are unavailable for the epoch.
func (*ChainService) GetEpochCommitteesForRoot ¶ added in v1.24.4
func (bs *ChainService) GetEpochCommitteesForRoot(ctx context.Context, epoch phase0.Epoch, depRoot phase0.Root) [][][]phase0.ValidatorIndex
GetEpochCommitteesForRoot returns the attester committees for every slot of an epoch, resolved on the fork identified by depRoot. Falls back to the canonical committees when no diverging duties exist for depRoot.
func (*ChainService) GetEpochProposers ¶ added in v1.24.4
GetEpochProposers returns the per-slot canonical proposers for an epoch (global validator indices; 0 where unknown). Returns nil if unavailable.
func (*ChainService) GetEpochProposersForRoot ¶ added in v1.24.4
func (bs *ChainService) GetEpochProposersForRoot(ctx context.Context, epoch phase0.Epoch, depRoot phase0.Root) []uint64
GetEpochProposersForRoot returns the per-slot proposers for an epoch resolved on the fork identified by depRoot. Falls back to canonical when no diverging duties exist for depRoot.
func (*ChainService) GetExecutionChainState ¶ added in v1.19.0
func (bs *ChainService) GetExecutionChainState() *execution.ChainState
func (*ChainService) GetExecutionClients ¶ added in v1.10.0
func (bs *ChainService) GetExecutionClients() []*execution.Client
func (*ChainService) GetFilteredBuilderSet ¶ added in v1.21.0
func (bs *ChainService) GetFilteredBuilderSet(ctx context.Context, filter *dbtypes.BuilderFilter, withBalance bool) ([]BuilderWithIndex, uint64)
GetFilteredBuilderSet returns builders matching the filter criteria.
A builder's identity is its pubkey; the builder index is a reusable slot (EIP-8282). When an index is reused the previous occupant's DB row is flagged Superseded and a new row is inserted. This function therefore treats each pubkey as a distinct entry rather than deduplicating by index:
- The in-memory cache only ever holds the current (non-superseded) occupant of each index and is the freshest source for it.
- Superseded predecessors live only in the DB. Per product decision they are hidden by default and only returned when the caller explicitly requests the Superseded status.
func (*ChainService) GetFilteredQueuedDeposits ¶ added in v1.15.0
func (bs *ChainService) GetFilteredQueuedDeposits(ctx context.Context, filter *QueuedDepositFilter) []*IndexedDepositQueueEntry
func (*ChainService) GetFilteredValidatorSet ¶ added in v1.14.0
func (bs *ChainService) GetFilteredValidatorSet(ctx context.Context, filter *dbtypes.ValidatorFilter, withBalance bool) ([]v1.Validator, uint64)
getValidatorsByWithdrawalAddressForRoot returns validators with a specific withdrawal address for a given blockRoot
func (*ChainService) GetFinalizedEpoch ¶
func (bs *ChainService) GetFinalizedEpoch() (phase0.Epoch, phase0.Root)
func (*ChainService) GetGenesis ¶
func (bs *ChainService) GetGenesis() (*v1.Genesis, error)
func (*ChainService) GetHeadForks ¶
func (bs *ChainService) GetHeadForks(readyOnly bool) []*beacon.ForkHead
func (*ChainService) GetHighestElBlockNumber ¶ added in v1.14.0
func (*ChainService) GetIndexedDepositQueue ¶ added in v1.15.0
func (bs *ChainService) GetIndexedDepositQueue(ctx context.Context, headBlock *beacon.Block) *IndexedDepositQueue
func (*ChainService) GetParentForkIds ¶ added in v1.12.1
func (bs *ChainService) GetParentForkIds(forkId beacon.ForkKey) []beacon.ForkKey
func (*ChainService) GetRecentEpochStats ¶ added in v1.15.0
func (bs *ChainService) GetRecentEpochStats(overrideForkId *beacon.ForkKey) (*beacon.EpochStatsValues, phase0.Epoch)
func (*ChainService) GetSlashingsByFilter ¶
func (bs *ChainService) GetSlashingsByFilter(ctx context.Context, filter *dbtypes.SlashingFilter, pageIdx uint64, pageSize uint32) ([]*dbtypes.Slashing, uint64)
func (*ChainService) GetSlotBidSeen ¶ added in v1.24.4
GetSlotBidSeen returns which clients observed each execution payload bid of the given slot on gossip, merging live cache observations with the persisted blockdb bids object (recent slots live in the cache; flushed slots only in the blockdb). Returns nil if no observation data is available.
func (*ChainService) GetSlotBidsClassified ¶ added in v1.24.4
func (bs *ChainService) GetSlotBidsClassified(ctx context.Context, slot phase0.Slot, parentRoot phase0.Root) []*ClassifiedBlockBid
GetSlotBidsClassified returns all execution payload bids for the given slot (regardless of their parent root) and classifies each bid's parent tuple against the parent chain of the reference block identified by parentRoot (the reference block's parent root). Bids targeting deeper ancestors (reorg bids) or competing forks are included and marked.
func (*ChainService) GetSlotCommittees ¶ added in v1.24.0
func (bs *ChainService) GetSlotCommittees(ctx context.Context, slot phase0.Slot) [][]phase0.ValidatorIndex
GetSlotCommittees returns the attester committees for a slot (global validator indices, in committee order), from the in-memory epoch cache for unfinalized epochs or the blockdb duties store for finalized ones. Returns nil if unavailable.
func (*ChainService) GetSlotCommitteesForRoot ¶ added in v1.24.4
func (bs *ChainService) GetSlotCommitteesForRoot(ctx context.Context, slot phase0.Slot, depRoot phase0.Root) [][]phase0.ValidatorIndex
GetSlotCommitteesForRoot returns the attester committees for a slot, resolved on the fork identified by depRoot. It uses the in-memory epoch stats matching depRoot when available, otherwise the diverging-fork blockdb object; it falls back to the canonical committees when depRoot is the canonical dependent root or no diverging object exists.
func (*ChainService) GetSlotDetailsByBlockroot ¶
func (bs *ChainService) GetSlotDetailsByBlockroot(ctx context.Context, blockroot phase0.Root) (*CombinedBlockResponse, error)
GetSlotDetailsByBlockroot retrieves the combined block details for a given block root. It first checks if the block root is present in the beacon indexer's block cache. If found, it constructs a CombinedBlockResponse using the block information from the cache. If not found, it checks if the block root is present in the orphaned block database. If found, it constructs a CombinedBlockResponse with the orphaned block information. If not found and blockDb is configured, it retrieves the block body from the block database. If not found in either cache or db, it retrieves the block header and block body from a random ready client and constructs a CombinedBlockResponse with the retrieved information.
func (*ChainService) GetSlotDetailsBySlot ¶
func (bs *ChainService) GetSlotDetailsBySlot(ctx context.Context, slot phase0.Slot) (*CombinedBlockResponse, error)
GetSlotDetailsBySlot retrieves the combined block details for a given slot. It first checks if there are any blocks in the beacon indexer's block cache for the given slot. If found, it constructs a CombinedBlockResponse using the block information from the cache. If not found, it retrieves the block header and block body from a random ready client using the slot and constructs a CombinedBlockResponse with the retrieved information.
func (*ChainService) GetSlotPtc ¶ added in v1.24.0
func (bs *ChainService) GetSlotPtc(ctx context.Context, slot phase0.Slot) []phase0.ValidatorIndex
GetSlotPtc returns the PTC members for a slot (global validator indices), from the in-memory epoch cache or the blockdb duties store. Returns nil if unavailable.
func (*ChainService) GetSlotPtcForRoot ¶ added in v1.24.4
func (bs *ChainService) GetSlotPtcForRoot(ctx context.Context, slot phase0.Slot, depRoot phase0.Root) []phase0.ValidatorIndex
GetSlotPtcForRoot returns the PTC members for a slot, resolved on the fork identified by depRoot. Falls back to the canonical PTC when no diverging duties exist for depRoot.
func (*ChainService) GetSnooperManager ¶ added in v1.17.0
func (bs *ChainService) GetSnooperManager() *snooper.SnooperManager
func (*ChainService) GetSystemContractAddress ¶ added in v1.19.0
func (bs *ChainService) GetSystemContractAddress(systemContract string) common.Address
func (*ChainService) GetSystemContractAddresses ¶ added in v1.20.3
func (bs *ChainService) GetSystemContractAddresses() map[common.Address]string
GetSystemContractAddresses returns a map of all known system contract addresses to their human-readable labels (with EIP tags). Includes deposit, withdrawal request, consolidation request, beacon roots, and block hash history contracts.
func (*ChainService) GetTxIndexer ¶ added in v1.19.9
func (bs *ChainService) GetTxIndexer() *txindexer.TxIndexer
func (*ChainService) GetValidatorByIndex ¶ added in v1.13.0
func (bs *ChainService) GetValidatorByIndex(index phase0.ValidatorIndex, withBalance bool) *v1.Validator
func (*ChainService) GetValidatorDutyStats ¶ added in v1.24.4
func (bs *ChainService) GetValidatorDutyStats(ctx context.Context, proposalLookbackEpochs phase0.Epoch, ptcLookbackEpochs phase0.Epoch) *ValidatorDutyStats
GetValidatorDutyStats returns proposal, payload delivery (Gloas+) and PTC inclusion (Gloas+) stats per validator. The two metric groups take separate lookback windows:
Proposal & payload stats (proposalLookbackEpochs) are based on the combined cache & database slot listing, so they stay correct across the block cache pruning and finalization boundaries and support long windows. Canonical blocks count as expected and proposed for their author, missed duty slots as expected for the assigned proposer, and slots with only reorged blocks as expected for the reorged author. Payload delivery is tracked separately, as a canonical beacon block does not imply the execution payload envelope made it onto the canonical chain.
PTC stats (ptcLookbackEpochs) are computed from in-memory state only: PTC duties from EpochStats.PtcDuties + payload attestations from cached canonical block bodies, gated to the slot range whose bodies are still held in memory.
func (*ChainService) GetValidatorInclusionDistance ¶ added in v1.20.4
func (bs *ChainService) GetValidatorInclusionDistance(validatorIndex phase0.ValidatorIndex, lookbackEpochs phase0.Epoch) (count uint64, totalDelay uint64)
GetValidatorInclusionDistance returns the attestation count and total inclusion delay for a validator over the last lookbackEpochs epochs, using only cached blocks.
func (*ChainService) GetValidatorIndexByPubkey ¶ added in v1.13.0
func (bs *ChainService) GetValidatorIndexByPubkey(pubkey phase0.BLSPubKey) (phase0.ValidatorIndex, bool)
func (*ChainService) GetValidatorLiveness ¶ added in v1.13.0
func (bs *ChainService) GetValidatorLiveness(validatorIndex phase0.ValidatorIndex, lookbackEpochs phase0.Epoch) uint64
func (*ChainService) GetValidatorName ¶
func (bs *ChainService) GetValidatorName(index uint64) string
func (*ChainService) GetValidatorNameAt ¶ added in v1.24.3
func (bs *ChainService) GetValidatorNameAt(index uint64, slot phase0.Slot) string
GetValidatorNameAt returns the validator name assignment valid at the given slot. Identical to GetValidatorName on networks without name history.
func (*ChainService) GetValidatorNameAtTime ¶ added in v1.24.3
func (bs *ChainService) GetValidatorNameAtTime(index uint64, ts int64) string
GetValidatorNameAtTime returns the validator name assignment valid at the given unix time. Used for rows that only carry an execution layer block time instead of a slot.
func (*ChainService) GetValidatorNamesCount ¶
func (bs *ChainService) GetValidatorNamesCount() uint64
func (*ChainService) GetValidatorStatusMap ¶ added in v1.14.0
func (bs *ChainService) GetValidatorStatusMap() map[v1.ValidatorState]uint64
func (*ChainService) GetValidatorVotingActivity ¶ added in v1.13.0
func (bs *ChainService) GetValidatorVotingActivity(validatorIndex phase0.ValidatorIndex) ([]beacon.ValidatorActivity, phase0.Epoch)
func (*ChainService) GetVoluntaryExitsByFilter ¶
func (bs *ChainService) GetVoluntaryExitsByFilter(ctx context.Context, filter *dbtypes.VoluntaryExitFilter, pageIdx uint64, pageSize uint32) ([]*dbtypes.VoluntaryExit, uint64)
func (*ChainService) GetWithdrawalIndexer ¶ added in v1.12.1
func (bs *ChainService) GetWithdrawalIndexer() *syscontracts.WithdrawalIndexer
func (*ChainService) GetWithdrawalQueueByFilter ¶ added in v1.19.0
func (bs *ChainService) GetWithdrawalQueueByFilter(ctx context.Context, filter *WithdrawalQueueFilter, pageOffset uint64, pageSize uint32) ([]*WithdrawalQueueEntry, uint64, phase0.Gwei)
func (*ChainService) GetWithdrawalRequestOperationsByFilter ¶ added in v1.13.0
func (bs *ChainService) GetWithdrawalRequestOperationsByFilter(ctx context.Context, filter *dbtypes.WithdrawalRequestFilter, pageOffset uint64, pageSize uint32) ([]*dbtypes.WithdrawalRequest, uint64)
func (*ChainService) GetWithdrawalRequestsByFilter ¶ added in v1.12.0
func (bs *ChainService) GetWithdrawalRequestsByFilter(ctx context.Context, filter *CombinedWithdrawalRequestFilter, pageOffset uint64, pageSize uint32) ([]*CombinedWithdrawalRequest, uint64, uint64)
func (*ChainService) GetWithdrawalsByFilter ¶ added in v1.21.0
func (bs *ChainService) GetWithdrawalsByFilter(ctx context.Context, filter *dbtypes.WithdrawalFilter, pageIdx uint64, pageSize uint32) ([]*dbtypes.Withdrawal, uint64)
func (*ChainService) IsProjectedValidatorIndex ¶ added in v1.23.0
func (bs *ChainService) IsProjectedValidatorIndex(index phase0.ValidatorIndex) bool
IsProjectedValidatorIndex reports whether the given index currently resolves to a validator projected from the pending_deposits queue (not yet on chain), i.e. its index is an estimate. Returns false for real validators and unknown indexes.
func (*ChainService) ResolveDependentRoot ¶ added in v1.24.4
func (bs *ChainService) ResolveDependentRoot(ctx context.Context, epoch phase0.Epoch, blockRoot phase0.Root) (phase0.Root, bool)
ResolveDependentRoot returns the committee-shuffling dependent root for the attester duties of the given epoch on the fork that blockRoot sits on. The dependent root is the block root at the last slot before the epoch boundary reachable by walking blockRoot's parent chain.
For unfinalized blocks the in-memory epoch stats already carry the answer. For finalized blocks it loads every block in [EpochStartSlot(N-1), slotOf(root)] in bulk from BOTH the in-memory cache (slots above the finalized cutoff) and a single ranged DB query (canonical + orphaned slots at/below the cutoff), then walks the parent chain in memory. Returns (root, true) on success.
func (*ChainService) StartService ¶ added in v1.11.0
func (cs *ChainService) StartService() error
StartService is used to start the beaconchain service
func (*ChainService) StopService ¶ added in v1.14.0
func (bs *ChainService) StopService()
func (*ChainService) StreamActiveValidatorData ¶ added in v1.14.0
func (bs *ChainService) StreamActiveValidatorData(activeOnly bool, cb beacon.ValidatorSetStreamer) error
type ClassifiedBlockBid ¶ added in v1.24.4
type ClassifiedBlockBid struct {
*dbtypes.BlockBid
ParentClass BidParentClass
// ReorgDepth is the number of blocks on the reference chain the bid would orphan
// (0 for parent bids, 1 for grandparent/"reorg n-1" bids, ...).
ReorgDepth uint64
// ParentSlot is the slot of the targeted beacon parent block (valid if ParentKnown).
ParentSlot uint64
ParentKnown bool
// ParentFull indicates the bid builds on the targeted block's own payload (full parent).
// False means it builds on an earlier payload, i.e. it treats the target's payload as
// withheld/empty.
ParentFull bool
// ElParentSlot is the slot of the block whose payload block hash matches the bid's
// parent hash, i.e. the EL head the bid builds on (valid if ElParentKnown).
ElParentSlot uint64
ElParentKnown bool
// ElParentUnrevealed indicates the bid's parent hash matches a committed payload hash
// that was never revealed on the reference chain - such a bid can never become valid.
ElParentUnrevealed bool
}
ClassifiedBlockBid is a BlockBid annotated with the chain position its parent tuple (parent_block_root, parent_block_hash) targets.
type CombinedBlockResponse ¶
type CombinedBlockResponse struct {
Root phase0.Root
Header *phase0.SignedBeaconBlockHeader
Block *all.SignedBeaconBlock
Payload *all.SignedExecutionPayloadEnvelope
BlockAccessList []byte
Orphaned bool
}
type CombinedBuilderDeposit ¶ added in v1.24.0
type CombinedBuilderDeposit struct {
Request *dbtypes.BuilderDeposit
RequestOrphaned bool
Transaction *dbtypes.BuilderDepositTx
TransactionOrphaned bool
}
CombinedBuilderDeposit pairs a consensus-layer builder deposit request with its matching execution-layer request tx (either may be nil when only one side is known).
type CombinedBuilderExit ¶ added in v1.24.0
type CombinedBuilderExit struct {
Request *dbtypes.BuilderExit
RequestOrphaned bool
Transaction *dbtypes.BuilderExitTx
TransactionOrphaned bool
}
CombinedBuilderExit pairs a consensus-layer builder exit request with its matching execution-layer request tx (either may be nil when only one side is known).
type CombinedConsolidationRequest ¶ added in v1.13.0
type CombinedConsolidationRequest struct {
Request *dbtypes.ConsolidationRequest
RequestOrphaned bool
Transaction *dbtypes.ConsolidationRequestTx
TransactionOrphaned bool
}
func (*CombinedConsolidationRequest) ResolveSourceName ¶ added in v1.24.3
func (ccr *CombinedConsolidationRequest) ResolveSourceName(bs *ChainService) string
ResolveSourceName returns the display name for the request's source validator.
func (*CombinedConsolidationRequest) ResolveTargetName ¶ added in v1.24.3
func (ccr *CombinedConsolidationRequest) ResolveTargetName(bs *ChainService) string
ResolveTargetName returns the display name for the request's target validator.
func (*CombinedConsolidationRequest) SourceAddress ¶ added in v1.13.0
func (ccr *CombinedConsolidationRequest) SourceAddress() []byte
func (*CombinedConsolidationRequest) SourceIndex ¶ added in v1.13.0
func (ccr *CombinedConsolidationRequest) SourceIndex() *uint64
func (*CombinedConsolidationRequest) SourcePubkey ¶ added in v1.13.0
func (ccr *CombinedConsolidationRequest) SourcePubkey() []byte
func (*CombinedConsolidationRequest) TargetIndex ¶ added in v1.13.0
func (ccr *CombinedConsolidationRequest) TargetIndex() *uint64
func (*CombinedConsolidationRequest) TargetPubkey ¶ added in v1.13.0
func (ccr *CombinedConsolidationRequest) TargetPubkey() []byte
type CombinedConsolidationRequestFilter ¶ added in v1.13.0
type CombinedConsolidationRequestFilter struct {
Filter *dbtypes.ConsolidationRequestFilter
Request uint8 // 0: all, 1: tx only, 2: request only
}
type CombinedDepositRequest ¶ added in v1.15.0
type CombinedDepositRequest struct {
Request *dbtypes.Deposit
RequestOrphaned bool
Transaction *dbtypes.DepositTx
TransactionOrphaned bool
IsQueued bool
QueueEntry *IndexedDepositQueueEntry
}
func (*CombinedDepositRequest) Amount ¶ added in v1.15.0
func (ccr *CombinedDepositRequest) Amount() uint64
func (*CombinedDepositRequest) DepositIndex ¶ added in v1.15.0
func (ccr *CombinedDepositRequest) DepositIndex() uint64
func (*CombinedDepositRequest) PublicKey ¶ added in v1.15.0
func (ccr *CombinedDepositRequest) PublicKey() []byte
func (*CombinedDepositRequest) ResolveValidatorName ¶ added in v1.24.3
func (ccr *CombinedDepositRequest) ResolveValidatorName(bs *ChainService, index uint64) string
ResolveValidatorName returns the display name for the deposit's validator, resolved at the deposit's inclusion slot (or the deposit transaction's EL block time while the deposit is not included yet).
func (*CombinedDepositRequest) SourceAddress ¶ added in v1.15.0
func (ccr *CombinedDepositRequest) SourceAddress() []byte
func (*CombinedDepositRequest) WithdrawalCredentials ¶ added in v1.15.0
func (ccr *CombinedDepositRequest) WithdrawalCredentials() []byte
type CombinedDepositRequestFilter ¶ added in v1.15.0
type CombinedDepositRequestFilter struct {
Filter *dbtypes.DepositTxFilter
}
type CombinedWithdrawalRequest ¶ added in v1.13.0
type CombinedWithdrawalRequest struct {
Request *dbtypes.WithdrawalRequest
RequestOrphaned bool
Transaction *dbtypes.WithdrawalRequestTx
TransactionOrphaned bool
}
func (*CombinedWithdrawalRequest) Amount ¶ added in v1.13.0
func (cwr *CombinedWithdrawalRequest) Amount() uint64
func (*CombinedWithdrawalRequest) ResolveValidatorName ¶ added in v1.24.3
func (cwr *CombinedWithdrawalRequest) ResolveValidatorName(bs *ChainService) string
ResolveValidatorName returns the display name for the request's validator, resolved at the request's inclusion slot (or the request transaction's EL block time while the request is still pending).
func (*CombinedWithdrawalRequest) SourceAddress ¶ added in v1.13.0
func (cwr *CombinedWithdrawalRequest) SourceAddress() []byte
func (*CombinedWithdrawalRequest) ValidatorIndex ¶ added in v1.13.0
func (cwr *CombinedWithdrawalRequest) ValidatorIndex() *uint64
func (*CombinedWithdrawalRequest) ValidatorPubkey ¶ added in v1.13.0
func (cwr *CombinedWithdrawalRequest) ValidatorPubkey() []byte
type CombinedWithdrawalRequestFilter ¶ added in v1.13.0
type CombinedWithdrawalRequestFilter struct {
Filter *dbtypes.WithdrawalRequestFilter
Request uint8 // 0: all, 1: tx only, 2: request only
}
type ConsensusClientFork ¶ added in v1.11.0
type ConsolidationQueueEntry ¶ added in v1.19.0
type ConsolidationQueueFilter ¶ added in v1.19.0
type DasGuardian ¶ added in v1.18.0
type DasGuardian struct {
// contains filtered or unexported fields
}
func NewDasGuardian ¶ added in v1.18.0
func NewDasGuardian(ctx context.Context, logger logrus.FieldLogger) (*DasGuardian, error)
func (*DasGuardian) Close ¶ added in v1.18.0
func (d *DasGuardian) Close() error
func (*DasGuardian) ScanNode ¶ added in v1.18.0
func (d *DasGuardian) ScanNode(ctx context.Context, nodeEnr string, slots []uint64) (*dasguardian.DasGuardianScanResult, error)
func (*DasGuardian) ScanNodeWithCallback ¶ added in v1.18.0
func (d *DasGuardian) ScanNodeWithCallback(ctx context.Context, nodeEnr string, slotCallback SlotSelectorCallback) (*dasguardian.DasGuardianScanResult, error)
type EnsResolver ¶ added in v1.24.2
type EnsResolver struct {
// contains filtered or unexported fields
}
EnsResolver resolves execution addresses to their primary ENS name. Resolution is batched, asynchronous and persisted to the ens_names table. Handlers call ResolveNames once per page to warm the in-memory cache and feed the resolve queue.
func NewEnsResolver ¶ added in v1.24.2
func NewEnsResolver(ctx context.Context, logger logrus.FieldLogger, execPool *execution.Pool) *EnsResolver
func (*EnsResolver) GetDebugStats ¶ added in v1.24.2
func (e *EnsResolver) GetDebugStats() *EnsResolverStats
GetDebugStats returns a snapshot of the resolver's queue, cache and probed registries for the /debug/cache page. Safe to call when the resolver is disabled (nil-safe).
func (*EnsResolver) ResolveNames ¶ added in v1.24.2
ResolveNames returns the known primary names for the given addresses (keyed by lowercase 0x-hex), warming the cache with one batched DB query for cache misses and enqueuing unresolved or stale addresses for asynchronous resolution.
It is called by page handlers in the (uncached) build path — never from templates.
func (*EnsResolver) StartUpdater ¶ added in v1.24.2
func (e *EnsResolver) StartUpdater()
StartUpdater applies defaults, initializes the cache/queue and starts the worker.
type EnsResolverStats ¶ added in v1.24.2
type EnsResolverStats struct {
Enabled bool
Probed bool
QueueLen int
QueueCap int
CacheLen int
CacheCap int
ConfiguredRegistries int
Registries []string // usable (bytecode-probed) registries, in priority order
MulticallReady bool
MulticallAddress string
RefreshPositive time.Duration
RefreshNegative time.Duration
}
EnsResolverStats is a snapshot of the ENS resolver's runtime state for the debug page.
type FrontendCachePageError ¶
type FrontendCachePageError struct {
// contains filtered or unexported fields
}
func (FrontendCachePageError) Error ¶
func (e FrontendCachePageError) Error() string
func (FrontendCachePageError) Name ¶
func (e FrontendCachePageError) Name() string
func (FrontendCachePageError) Stack ¶
func (e FrontendCachePageError) Stack() string
type FrontendCacheService ¶
type FrontendCacheService struct {
// contains filtered or unexported fields
}
var GlobalFrontendCache *FrontendCacheService
func (*FrontendCacheService) GetPageTypeStats ¶ added in v1.20.4
func (fc *FrontendCacheService) GetPageTypeStats() []*cache.PageTypeStats
GetPageTypeStats returns per-page-type cache statistics.
func (*FrontendCacheService) GetStats ¶ added in v1.20.4
func (fc *FrontendCacheService) GetStats() *FrontendCacheStats
GetStats returns frontend cache statistics.
func (*FrontendCacheService) GetTieredCacheStats ¶ added in v1.20.4
func (fc *FrontendCacheService) GetTieredCacheStats() *cache.TieredCacheStats
GetTieredCacheStats returns the underlying tiered cache statistics.
func (*FrontendCacheService) ProcessCachedPage ¶
func (fc *FrontendCacheService) ProcessCachedPage(pageKey string, caching bool, returnValue interface{}, buildFn PageDataHandlerFn) (interface{}, error)
func (*FrontendCacheService) RemoveCacheByPrefix ¶ added in v1.24.0
func (fc *FrontendCacheService) RemoveCacheByPrefix(pageKeyPrefix string) error
RemoveCacheByPrefix evicts every cached page whose key starts with pageKeyPrefix, so the next request rebuilds them from fresh data. This is used to actively invalidate all variants of a page (e.g. every sort order) after the underlying data has been force-refreshed, instead of waiting for each page's cache timeout to expire.
type FrontendCacheStats ¶ added in v1.20.4
type FrontendCacheStats struct {
CachingEnabled bool
PageCallCounter uint64
ProcessingPages int
ProcessingPageKeys []string
ConcurrencyLimit int
ConcurrencyUsed int
PageTypeSemLimit int
PageTypeSemaphores map[string]int // page type -> current usage
}
FrontendCacheStats holds statistics about the frontend cache service.
type IndexedDepositQueue ¶ added in v1.15.0
type IndexedDepositQueue struct {
Queue []*IndexedDepositQueueEntry
TotalNew uint64
TotalGwei phase0.Gwei
QueueEstimation phase0.Epoch
// LastIncludedDepositIndex is the EL index of the most recent deposit included on chain as of
// the queue snapshot (nil if unknown). Deposits with a higher index were included after the
// snapshot (e.g. in the current epoch) and are not yet reflected in the queue; deposits with a
// lower index that are absent from the queue have already been applied.
LastIncludedDepositIndex *uint64
// contains filtered or unexported fields
}
func (*IndexedDepositQueue) EstimateAppendedDepositEpoch ¶ added in v1.24.0
func (q *IndexedDepositQueue) EstimateAppendedDepositEpoch(amount phase0.Gwei) phase0.Epoch
EstimateAppendedDepositEpoch projects the epoch in which a deposit of the given amount would be processed by process_pending_deposits if it were appended to the tail of the queue right now. It continues the same churn simulation used for the existing entries from its residual state. It returns 0 (unknown) when the churn parameters are unavailable (e.g. no active balance yet).
type IndexedDepositQueueEntry ¶ added in v1.15.0
type IndexedDepositQueueEntry struct {
QueuePos uint64
DepositIndex *uint64
EpochEstimate phase0.Epoch
PendingDeposit *electra.PendingDeposit
// Postponed marks a deposit that process_pending_deposits reorders to the back of
// the queue (its validator is exiting), so it no longer follows the queue's
// slot<->index order and is resolved by slot rather than by position. Its
// EpochEstimate is left unset as it does not flow through the normal churn queue.
Postponed bool
}
type PageDataHandlerFn ¶
type PageDataHandlerFn = func(pageCall *FrontendCacheProcessingPage) interface{}
type ProjectedBuilderDeposit ¶ added in v1.24.0
type ProjectedBuilderDeposit struct {
Deposit *dbtypes.DepositWithTx
// Result is the onboarding outcome (dbtypes.BuilderDepositRequestResult*): NewBuilder, TopUp, or
// InvalidSignature. Left Unknown for deposits that never reach onboarding (too early / kept).
Result uint8
// EstimateEpoch is the projected epoch the deposit is processed (0 = unknown).
EstimateEpoch phase0.Epoch
// Fate flags (at most one set; none set => onboarded as a builder):
TooEarly bool // processed before the fork -> becomes a regular validator, not a builder
AlreadyProcessed bool // refinement of TooEarly: already applied (vs projected to apply before fork)
KeptAsValidator bool // shares a pubkey with a validator -> applied as a validator deposit
InvalidSignature bool // invalid proof-of-possession -> dropped at onboarding
// Queue cross-check (the queue lags up to an epoch, so recent deposits may be unqueued).
IsQueued bool
QueuePos uint64
}
ProjectedBuilderDeposit is one builder-credential (0xB0) deposit on chain together with its projected fate at the upcoming Gloas fork transition. When none of the fate flags is set the deposit is projected to be onboarded as a builder (Result distinguishes new vs top-up).
func (*ProjectedBuilderDeposit) Onboarded ¶ added in v1.24.0
func (d *ProjectedBuilderDeposit) Onboarded() bool
Onboarded reports whether the deposit is projected to be onboarded as a builder at the fork.
type QueuedDepositFilter ¶ added in v1.15.0
type RPCError ¶ added in v1.19.1
type RPCError struct {
Code int `json:"code"`
Message string `json:"message"`
Data interface{} `json:"data,omitempty"`
}
RPCError represents a JSON-RPC 2.0 error
type RPCProxy ¶ added in v1.19.1
type RPCProxy struct {
// contains filtered or unexported fields
}
RPCProxy implements a filtered JSON-RPC proxy with rate limiting
func NewRPCProxy ¶ added in v1.19.1
func NewRPCProxy(config *RPCProxyConfig) *RPCProxy
NewRPCProxy creates a new RPC proxy instance
type RPCProxyConfig ¶ added in v1.19.1
type RPCProxyConfig struct {
// Upstream execution client endpoint
UpstreamURL string
// Rate limiting
RequestsPerMinute int // Requests per minute per IP
BurstLimit int // Maximum burst requests
// Method filtering
AllowedMethods []string // Whitelist of allowed methods
// Request timeout
Timeout time.Duration
// Logging
LogRequests bool
}
RPCProxyConfig holds the configuration for the RPC proxy
type RPCRequest ¶ added in v1.19.1
type RPCRequest struct {
ID interface{} `json:"id"`
Jsonrpc string `json:"jsonrpc"`
Method string `json:"method"`
Params interface{} `json:"params,omitempty"`
}
RPCRequest represents a JSON-RPC 2.0 request
type RPCResponse ¶ added in v1.19.1
type RPCResponse struct {
ID interface{} `json:"id"`
Jsonrpc string `json:"jsonrpc"`
Result interface{} `json:"result,omitempty"`
Error *RPCError `json:"error,omitempty"`
}
RPCResponse represents a JSON-RPC 2.0 response
type RateLimiter ¶ added in v1.19.1
type RateLimiter struct {
// contains filtered or unexported fields
}
RateLimiter implements a token bucket rate limiter per IP
func NewRateLimiter ¶ added in v1.19.1
func NewRateLimiter(requestsPerMinute, burstLimit int) *RateLimiter
NewRateLimiter creates a new rate limiter
func (*RateLimiter) Allow ¶ added in v1.19.1
func (rl *RateLimiter) Allow(ip string) bool
Allow checks if a request from the given IP is allowed
type SlotSelectorCallback ¶ added in v1.18.0
type SlotSelectorCallback func(nodeStatus *dasguardian.StatusV2) ([]uint64, error)
SlotSelectorCallback is a function type that receives node status and returns selected slots
type TokenBucket ¶ added in v1.19.1
type TokenBucket struct {
// contains filtered or unexported fields
}
TokenBucket represents a token bucket for rate limiting
type TxSignaturesLookup ¶
type TxSignaturesLookup struct {
Bytes types.TxSignatureBytes
Signature string
Name string
Status types.TxSignatureLookupStatus
}
type TxSignaturesService ¶
type TxSignaturesService struct {
// contains filtered or unexported fields
}
var GlobalTxSignaturesService *TxSignaturesService
func (*TxSignaturesService) LookupSignatures ¶
func (tss *TxSignaturesService) LookupSignatures(ctx context.Context, sigBytes []types.TxSignatureBytes) map[types.TxSignatureBytes]*TxSignaturesLookup
type ValidatorDutyStat ¶ added in v1.24.4
type ValidatorDutyStat struct {
ProposalsExpected uint64
ProposalsProposed uint64
PayloadsExpected uint64
PayloadsDelivered uint64
PtcExpected uint64
PtcIncluded uint64
}
ValidatorDutyStat tracks the block production performance of a single validator: expected vs actually proposed canonical blocks, plus (Gloas+) execution payload delivery for its canonical proposals and expected vs included PTC votes.
type ValidatorDutyStats ¶ added in v1.24.4
type ValidatorDutyStats struct {
Validators map[phase0.ValidatorIndex]*ValidatorDutyStat
HasPtcStats bool
PtcFirstVoteSlot phase0.Slot
}
ValidatorDutyStats holds per-validator block production stats over a lookback window. PTC stats are computed from in-memory block bodies only, so their effective window can be smaller than the requested lookback: PtcFirstVoteSlot is the first vote slot that was actually considered. HasPtcStats is false pre-Gloas, where no PTC duties exist.
type ValidatorNames ¶
type ValidatorNames struct {
// contains filtered or unexported fields
}
func NewValidatorNames ¶
func NewValidatorNames(ctx context.Context, beaconIndexer *beacon.Indexer, chainState *consensus.ChainState) *ValidatorNames
func (*ValidatorNames) GetValidatorName ¶
func (vn *ValidatorNames) GetValidatorName(index uint64) string
func (*ValidatorNames) GetValidatorNameAt ¶ added in v1.24.3
func (vn *ValidatorNames) GetValidatorNameAt(index uint64, slot phase0.Slot) string
GetValidatorNameAt returns the name assignment valid at the given slot. Falls back to the current name when no history snapshot covers the slot or index, so networks without name history behave identically to GetValidatorName.
func (*ValidatorNames) GetValidatorNameAtTime ¶ added in v1.24.3
func (vn *ValidatorNames) GetValidatorNameAtTime(index uint64, ts int64) string
GetValidatorNameAtTime returns the name assignment valid at the given unix time. Used for rows that only carry an execution layer block time instead of a slot.
func (*ValidatorNames) GetValidatorNameByPubkey ¶
func (vn *ValidatorNames) GetValidatorNameByPubkey(pubkey []byte) string
func (*ValidatorNames) GetValidatorNamesCount ¶
func (vn *ValidatorNames) GetValidatorNamesCount() uint64
func (*ValidatorNames) LoadValidatorNames ¶
func (vn *ValidatorNames) LoadValidatorNames() chan bool
func (*ValidatorNames) StartUpdater ¶
func (vn *ValidatorNames) StartUpdater()
type ValidatorWithIndex ¶ added in v1.14.0
type ValidatorWithIndex struct {
Index phase0.ValidatorIndex
Validator *phase0.Validator
}
type WithdrawalQueueEntry ¶ added in v1.19.0
Source Files
¶
- buildoor.go
- callratelimiter.go
- chainservice.go
- chainservice_bids.go
- chainservice_blocks.go
- chainservice_builder.go
- chainservice_builder_onboarding.go
- chainservice_builder_requests.go
- chainservice_consolidations.go
- chainservice_deposits.go
- chainservice_duties.go
- chainservice_epochs.go
- chainservice_forks.go
- chainservice_objects.go
- chainservice_validators.go
- chainservice_withdrawals.go
- dasguardian.go
- ensresolver.go
- ensresolver_ens.go
- fnsignatures.go
- frontendcache.go
- rpcproxy.go
- validatornames.go