Documentation
¶
Index ¶
- func InitChainService(ctx context.Context, logger logrus.FieldLogger)
- func StartCallRateLimiter(proxyCount uint, rateLimit uint, burstLimit uint) error
- func StartFrontendCache() error
- func StartTxSignaturesService() error
- type CallRateLimiter
- type ChainService
- func (bs *ChainService) CheckBlockOrphanedStatus(blockRoot phase0.Root) dbtypes.SlotStatus
- 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, commitment deneb.KZGCommitment) (*deneb.BlobSidecar, error)
- 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() *execindexer.ConsolidationIndexer
- func (bs *ChainService) GetConsolidationQueueByFilter(filter *ConsolidationQueueFilter, offset uint64, limit uint64) ([]*ConsolidationQueueEntry, uint64)
- func (bs *ChainService) GetConsolidationRequestOperationsByFilter(filter *dbtypes.ConsolidationRequestFilter, pageOffset uint64, pageSize uint32) ([]*dbtypes.ConsolidationRequest, uint64)
- func (bs *ChainService) GetConsolidationRequestsByFilter(filter *CombinedConsolidationRequestFilter, pageOffset uint64, pageSize uint32) ([]*CombinedConsolidationRequest, uint64, uint64)
- func (bs *ChainService) GetDbBlocksByFilter(filter *dbtypes.BlockFilter, pageIdx uint64, pageSize uint32, ...) []*dbtypes.AssignedSlot
- func (bs *ChainService) GetDbBlocksByParentRoot(parentRoot phase0.Root) []*dbtypes.Slot
- func (bs *ChainService) GetDbBlocksForSlots(firstSlot uint64, slotLimit uint32, withMissing bool, withOrphaned bool) []*dbtypes.Slot
- func (bs *ChainService) GetDbEpochs(firstEpoch uint64, limit uint32) []*dbtypes.Epoch
- func (bs *ChainService) GetDepositOperationsByFilter(filter *dbtypes.DepositFilter, txFilter *dbtypes.DepositTxFilter, ...) ([]*dbtypes.DepositWithTx, uint64)
- func (bs *ChainService) GetDepositRequestsByFilter(filter *CombinedDepositRequestFilter, pageOffset uint64, pageSize uint32) ([]*CombinedDepositRequest, uint64)
- func (bs *ChainService) GetExecutionChainState() *execution.ChainState
- func (bs *ChainService) GetExecutionClients() []*execution.Client
- func (bs *ChainService) GetFilteredQueuedDeposits(filter *QueuedDepositFilter) []*IndexedDepositQueueEntry
- func (bs *ChainService) GetFilteredValidatorSet(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(overrideForkId *beacon.ForkKey) uint64
- func (bs *ChainService) GetIndexedDepositQueue(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(filter *dbtypes.SlashingFilter, pageIdx uint64, pageSize uint32) ([]*dbtypes.Slashing, uint64)
- 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) GetSnooperManager() *snooper.SnooperManager
- func (bs *ChainService) GetSystemContractAddress(systemContract string) common.Address
- func (bs *ChainService) GetValidatorByIndex(index phase0.ValidatorIndex, withBalance bool) *v1.Validator
- 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) 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(filter *dbtypes.VoluntaryExitFilter, pageIdx uint64, pageSize uint32) ([]*dbtypes.VoluntaryExit, uint64)
- func (bs *ChainService) GetWithdrawalIndexer() *execindexer.WithdrawalIndexer
- func (bs *ChainService) GetWithdrawalQueueByFilter(filter *WithdrawalQueueFilter, pageOffset uint64, pageSize uint32) ([]*WithdrawalQueueEntry, uint64, phase0.Gwei)
- func (bs *ChainService) GetWithdrawalRequestOperationsByFilter(filter *dbtypes.WithdrawalRequestFilter, pageOffset uint64, pageSize uint32) ([]*dbtypes.WithdrawalRequest, uint64)
- func (bs *ChainService) GetWithdrawalRequestsByFilter(filter *CombinedWithdrawalRequestFilter, pageOffset uint64, pageSize uint32) ([]*CombinedWithdrawalRequest, uint64, uint64)
- func (cs *ChainService) StartService() error
- func (bs *ChainService) StopService()
- func (bs *ChainService) StreamActiveValidatorData(activeOnly bool, cb beacon.ValidatorSetStreamer) error
- type CombinedBlockResponse
- type CombinedConsolidationRequest
- 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
- type CombinedDepositRequestFilter
- type CombinedWithdrawalRequest
- 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 FrontendCachePageError
- type FrontendCacheProcessingPage
- type FrontendCacheService
- type IndexedDepositQueue
- type IndexedDepositQueueEntry
- type PageDataHandlerFn
- type QueuedDepositFilter
- type RPCError
- type RPCProxy
- type RPCProxyConfig
- type RPCRequest
- type RPCResponse
- type RateLimiter
- type SlotSelectorCallback
- type TokenBucket
- type TxSignaturesLookup
- type TxSignaturesService
- type ValidatorNames
- func (vn *ValidatorNames) GetValidatorName(index uint64) 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() error
- type ValidatorWithIndex
- type WithdrawalQueueEntry
- type WithdrawalQueueFilter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
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() 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 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(blockRoot phase0.Root) dbtypes.SlotStatus
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, commitment deneb.KZGCommitment) (*deneb.BlobSidecar, error)
GetBlockBlob retrieves the blob sidecar for a given block root and commitment. 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 checks if any of them match the given commitment. If a match is found, it returns the blob sidecar, otherwise it returns nil.
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() *execindexer.ConsolidationIndexer
func (*ChainService) GetConsolidationQueueByFilter ¶ added in v1.19.0
func (bs *ChainService) GetConsolidationQueueByFilter(filter *ConsolidationQueueFilter, offset uint64, limit uint64) ([]*ConsolidationQueueEntry, uint64)
func (*ChainService) GetConsolidationRequestOperationsByFilter ¶ added in v1.13.0
func (bs *ChainService) GetConsolidationRequestOperationsByFilter(filter *dbtypes.ConsolidationRequestFilter, pageOffset uint64, pageSize uint32) ([]*dbtypes.ConsolidationRequest, uint64)
func (*ChainService) GetConsolidationRequestsByFilter ¶ added in v1.12.0
func (bs *ChainService) GetConsolidationRequestsByFilter(filter *CombinedConsolidationRequestFilter, pageOffset uint64, pageSize uint32) ([]*CombinedConsolidationRequest, uint64, uint64)
func (*ChainService) GetDbBlocksByFilter ¶
func (bs *ChainService) GetDbBlocksByFilter(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 (bs *ChainService) GetDbBlocksByParentRoot(parentRoot phase0.Root) []*dbtypes.Slot
func (*ChainService) GetDbBlocksForSlots ¶
func (bs *ChainService) GetDbBlocksForSlots(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 (bs *ChainService) GetDbEpochs(firstEpoch uint64, limit uint32) []*dbtypes.Epoch
func (*ChainService) GetDepositOperationsByFilter ¶ added in v1.15.0
func (bs *ChainService) GetDepositOperationsByFilter(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(filter *CombinedDepositRequestFilter, pageOffset uint64, pageSize uint32) ([]*CombinedDepositRequest, uint64)
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) GetFilteredQueuedDeposits ¶ added in v1.15.0
func (bs *ChainService) GetFilteredQueuedDeposits(filter *QueuedDepositFilter) []*IndexedDepositQueueEntry
func (*ChainService) GetFilteredValidatorSet ¶ added in v1.14.0
func (bs *ChainService) GetFilteredValidatorSet(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 (bs *ChainService) GetHighestElBlockNumber(overrideForkId *beacon.ForkKey) uint64
func (*ChainService) GetIndexedDepositQueue ¶ added in v1.15.0
func (bs *ChainService) GetIndexedDepositQueue(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(filter *dbtypes.SlashingFilter, pageIdx uint64, pageSize uint32) ([]*dbtypes.Slashing, uint64)
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) 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) GetValidatorByIndex ¶ added in v1.13.0
func (bs *ChainService) GetValidatorByIndex(index phase0.ValidatorIndex, withBalance bool) *v1.Validator
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) 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(filter *dbtypes.VoluntaryExitFilter, pageIdx uint64, pageSize uint32) ([]*dbtypes.VoluntaryExit, uint64)
func (*ChainService) GetWithdrawalIndexer ¶ added in v1.12.1
func (bs *ChainService) GetWithdrawalIndexer() *execindexer.WithdrawalIndexer
func (*ChainService) GetWithdrawalQueueByFilter ¶ added in v1.19.0
func (bs *ChainService) GetWithdrawalQueueByFilter(filter *WithdrawalQueueFilter, pageOffset uint64, pageSize uint32) ([]*WithdrawalQueueEntry, uint64, phase0.Gwei)
func (*ChainService) GetWithdrawalRequestOperationsByFilter ¶ added in v1.13.0
func (bs *ChainService) GetWithdrawalRequestOperationsByFilter(filter *dbtypes.WithdrawalRequestFilter, pageOffset uint64, pageSize uint32) ([]*dbtypes.WithdrawalRequest, uint64)
func (*ChainService) GetWithdrawalRequestsByFilter ¶ added in v1.12.0
func (bs *ChainService) GetWithdrawalRequestsByFilter(filter *CombinedWithdrawalRequestFilter, pageOffset uint64, pageSize uint32) ([]*CombinedWithdrawalRequest, uint64, uint64)
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 CombinedBlockResponse ¶
type CombinedBlockResponse struct {
Root phase0.Root
Header *phase0.SignedBeaconBlockHeader
Block *spec.VersionedSignedBeaconBlock
Orphaned bool
}
type CombinedConsolidationRequest ¶ added in v1.13.0
type CombinedConsolidationRequest struct {
Request *dbtypes.ConsolidationRequest
RequestOrphaned bool
Transaction *dbtypes.ConsolidationRequestTx
TransactionOrphaned bool
}
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) 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) 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 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) ProcessCachedPage ¶
func (fc *FrontendCacheService) ProcessCachedPage(pageKey string, caching bool, returnValue interface{}, buildFn PageDataHandlerFn) (interface{}, error)
type IndexedDepositQueue ¶ added in v1.15.0
type IndexedDepositQueueEntry ¶ added in v1.15.0
type PageDataHandlerFn ¶
type PageDataHandlerFn = func(pageCall *FrontendCacheProcessingPage) interface{}
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 {
}
var GlobalTxSignaturesService *TxSignaturesService
func (*TxSignaturesService) LookupSignatures ¶
func (tss *TxSignaturesService) LookupSignatures(sigBytes []types.TxSignatureBytes) map[types.TxSignatureBytes]*TxSignaturesLookup
type ValidatorNames ¶
type ValidatorNames struct {
// contains filtered or unexported fields
}
func NewValidatorNames ¶
func NewValidatorNames(beaconIndexer *beacon.Indexer, chainState *consensus.ChainState) *ValidatorNames
func (*ValidatorNames) GetValidatorName ¶
func (vn *ValidatorNames) GetValidatorName(index uint64) string
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()
func (*ValidatorNames) UpdateDb ¶ added in v1.11.0
func (vn *ValidatorNames) UpdateDb() error
type ValidatorWithIndex ¶ added in v1.14.0
type ValidatorWithIndex struct {
Index phase0.ValidatorIndex
Validator *phase0.Validator
}