Documentation
¶
Index ¶
- Constants
- Variables
- func ApplyEmbeddedDbSchema(version int64) error
- func ConvertInt64ToUint64(i int64) uint64
- func ConvertUint64ToInt64(u uint64) int64
- func DeleteElAccount(ctx context.Context, dbTx *sqlx.Tx, id uint64) error
- func DeleteElBalance(ctx context.Context, dbTx *sqlx.Tx, accountID uint64, tokenID uint64) error
- func DeleteElBalancesByAccountID(ctx context.Context, dbTx *sqlx.Tx, accountID uint64) error
- func DeleteElBalancesByTokenID(ctx context.Context, dbTx *sqlx.Tx, tokenID uint64) error
- func DeleteElBlock(ctx context.Context, dbTx *sqlx.Tx, blockUid uint64) error
- func DeleteElToken(ctx context.Context, dbTx *sqlx.Tx, id uint64) error
- func DeleteElTokenTransfer(ctx context.Context, dbTx *sqlx.Tx, blockUid uint64, txHash []byte, ...) error
- func DeleteElTokenTransfersByBlockUid(ctx context.Context, dbTx *sqlx.Tx, blockUid uint64) error
- func DeleteElTokenTransfersByTokenID(ctx context.Context, dbTx *sqlx.Tx, tokenID uint64) error
- func DeleteElTokenTransfersByTxHash(ctx context.Context, dbTx *sqlx.Tx, txHash []byte) error
- func DeleteElTransaction(ctx context.Context, dbTx *sqlx.Tx, blockUid uint64, txHash []byte) error
- func DeleteElTransactionsByBlockUid(ctx context.Context, dbTx *sqlx.Tx, blockUid uint64) error
- func DeleteElWithdrawal(ctx context.Context, dbTx *sqlx.Tx, blockUid uint64, blockIndex uint16) error
- func DeleteElWithdrawalsByBlockUid(ctx context.Context, dbTx *sqlx.Tx, blockUid uint64) error
- func DeleteElZeroBalances(ctx context.Context, dbTx *sqlx.Tx) (int64, error)
- func DeleteFinalizedForks(ctx context.Context, tx *sqlx.Tx, finalizedRoots [][]byte) error
- func DeletePendingFunctionSignatures(ctx context.Context, tx *sqlx.Tx, sigBytes []types.TxSignatureBytes) error
- func DeleteUnfinalizedBlocksBefore(ctx context.Context, tx *sqlx.Tx, slot uint64) error
- func DeleteUnfinalizedDutiesBefore(ctx context.Context, tx *sqlx.Tx, epoch uint64) error
- func DeleteUnfinalizedEpochsBefore(ctx context.Context, tx *sqlx.Tx, epoch uint64) error
- func DeleteValidatorNames(ctx context.Context, tx *sqlx.Tx, validatorNames []uint64) error
- func EngineQuery(queryMap map[dbtypes.DBEngineType]string) string
- func GetBlob(ctx context.Context, commitment []byte, withData bool) *dbtypes.Blob
- func GetBlockHeadByRoot(ctx context.Context, root []byte) *dbtypes.BlockHead
- func GetBlockHeadBySlot(ctx context.Context, slot uint64) *dbtypes.BlockHead
- func GetBlockHeadBySlotRange(ctx context.Context, startSlot uint64, endSlot uint64) []*dbtypes.BlockHead
- func GetConsolidationRequestTxsByDequeueRange(ctx context.Context, dequeueFirst uint64, dequeueLast uint64) []*dbtypes.ConsolidationRequestTx
- func GetConsolidationRequestTxsByTxHashes(ctx context.Context, txHashes [][]byte) []*dbtypes.ConsolidationRequestTx
- func GetConsolidationRequestTxsFiltered(ctx context.Context, offset uint64, limit uint32, canonicalForkIds []uint64, ...) ([]*dbtypes.ConsolidationRequestTx, uint64, error)
- func GetConsolidationRequestsByElBlockRange(ctx context.Context, firstSlot uint64, lastSlot uint64) []*dbtypes.ConsolidationRequest
- func GetConsolidationRequestsFiltered(ctx context.Context, offset uint64, limit uint32, canonicalForkIds []uint64, ...) ([]*dbtypes.ConsolidationRequest, uint64, error)
- func GetDatabaseSize() (int64, error)
- func GetDepositTxs(ctx context.Context, firstIndex uint64, limit uint32) []*dbtypes.DepositTx
- func GetDepositTxsByIndexes(ctx context.Context, indexes []uint64) []*dbtypes.DepositTx
- func GetDepositTxsFiltered(ctx context.Context, offset uint64, limit uint32, canonicalForkIds []uint64, ...) ([]*dbtypes.DepositTx, uint64, error)
- func GetDepositsFiltered(ctx context.Context, offset uint64, limit uint32, canonicalForkIds []uint64, ...) ([]*dbtypes.DepositWithTx, uint64, error)
- func GetElAccountByAddress(ctx context.Context, address []byte) (*dbtypes.ElAccount, error)
- func GetElAccountByID(ctx context.Context, id uint64) (*dbtypes.ElAccount, error)
- func GetElAccountsByAddresses(ctx context.Context, addresses [][]byte) (map[string]*dbtypes.ElAccount, error)
- func GetElAccountsByFunder(ctx context.Context, funderID uint64, offset uint64, limit uint32) ([]*dbtypes.ElAccount, uint64, error)
- func GetElAccountsByIDs(ctx context.Context, ids []uint64) ([]*dbtypes.ElAccount, error)
- func GetElAccountsFiltered(ctx context.Context, offset uint64, limit uint32, ...) ([]*dbtypes.ElAccount, uint64, error)
- func GetElBalance(ctx context.Context, accountID uint64, tokenID uint64) (*dbtypes.ElBalance, error)
- func GetElBalancesByAccountID(ctx context.Context, accountID uint64, offset uint64, limit uint32) ([]*dbtypes.ElBalance, uint64, error)
- func GetElBalancesByTokenID(ctx context.Context, tokenID uint64, offset uint64, limit uint32) ([]*dbtypes.ElBalance, uint64, error)
- func GetElBalancesFiltered(ctx context.Context, offset uint64, limit uint32, accountID uint64, ...) ([]*dbtypes.ElBalance, uint64, error)
- func GetElBlock(ctx context.Context, blockUid uint64) (*dbtypes.ElBlock, error)
- func GetElBlocksByUids(ctx context.Context, blockUids []uint64) ([]*dbtypes.ElBlock, error)
- func GetElEventIndexCountByTxHash(ctx context.Context, txHash []byte) (uint64, error)
- func GetElEventIndicesBySource(ctx context.Context, sourceID uint64, offset uint64, limit uint32) ([]*dbtypes.ElEventIndex, uint64, error)
- func GetElEventIndicesByTopic1(ctx context.Context, topic1 []byte, offset uint64, limit uint32) ([]*dbtypes.ElEventIndex, uint64, error)
- func GetElEventIndicesByTxHash(ctx context.Context, txHash []byte) ([]*dbtypes.ElEventIndex, error)
- func GetElTokenByContract(ctx context.Context, contract []byte) (*dbtypes.ElToken, error)
- func GetElTokenByID(ctx context.Context, id uint64) (*dbtypes.ElToken, error)
- func GetElTokenTransfer(ctx context.Context, blockUid uint64, txHash []byte, txIdx uint32) (*dbtypes.ElTokenTransfer, error)
- func GetElTokenTransferCountByBlockUidAndTxHash(ctx context.Context, blockUid uint64, txHash []byte) (uint64, error)
- func GetElTokenTransfersByAccountID(ctx context.Context, accountID uint64, isFrom bool, offset uint64, ...) ([]*dbtypes.ElTokenTransfer, uint64, error)
- func GetElTokenTransfersByAccountIDCombined(ctx context.Context, accountID uint64, tokenTypes []uint8, offset uint64, ...) ([]*dbtypes.ElTokenTransfer, uint64, bool, error)
- func GetElTokenTransfersByBlockUid(ctx context.Context, blockUid uint64) ([]*dbtypes.ElTokenTransfer, error)
- func GetElTokenTransfersByBlockUidAndTxHash(ctx context.Context, blockUid uint64, txHash []byte) ([]*dbtypes.ElTokenTransfer, error)
- func GetElTokenTransfersByTokenID(ctx context.Context, tokenID uint64, offset uint64, limit uint32) ([]*dbtypes.ElTokenTransfer, uint64, error)
- func GetElTokenTransfersByTxHash(ctx context.Context, txHash []byte) ([]*dbtypes.ElTokenTransfer, error)
- func GetElTokenTransfersFiltered(ctx context.Context, offset uint64, limit uint32, ...) ([]*dbtypes.ElTokenTransfer, uint64, error)
- func GetElTokens(ctx context.Context, offset uint64, limit uint32) ([]*dbtypes.ElToken, uint64, error)
- func GetElTokensByContracts(ctx context.Context, contracts [][]byte) (map[string]*dbtypes.ElToken, error)
- func GetElTokensByIDs(ctx context.Context, ids []uint64) ([]*dbtypes.ElToken, error)
- func GetElTokensFiltered(ctx context.Context, offset uint64, limit uint32, ...) ([]*dbtypes.ElToken, uint64, error)
- func GetElTransaction(ctx context.Context, blockUid uint64, txHash []byte) (*dbtypes.ElTransaction, error)
- func GetElTransactionsByAccountID(ctx context.Context, accountID uint64, isFrom bool, offset uint64, ...) ([]*dbtypes.ElTransaction, uint64, error)
- func GetElTransactionsByAccountIDCombined(ctx context.Context, accountID uint64, offset uint64, limit uint32) ([]*dbtypes.ElTransaction, uint64, bool, error)
- func GetElTransactionsByBlockUid(ctx context.Context, blockUid uint64) ([]*dbtypes.ElTransaction, error)
- func GetElTransactionsByHash(ctx context.Context, txHash []byte) ([]*dbtypes.ElTransaction, error)
- func GetElTransactionsByHashes(ctx context.Context, txHashes [][]byte) ([]*dbtypes.ElTransaction, error)
- func GetElTransactionsFiltered(ctx context.Context, offset uint64, limit uint32, ...) ([]*dbtypes.ElTransaction, uint64, error)
- func GetElTransactionsInternalByAccount(ctx context.Context, accountID uint64, offset uint64, limit uint32) ([]*dbtypes.ElTransactionInternal, uint64, error)
- func GetElTransactionsInternalByTxHash(ctx context.Context, txHash []byte) ([]*dbtypes.ElTransactionInternal, error)
- func GetElTransactionsInternalCountByTxHash(ctx context.Context, txHash []byte) (uint64, error)
- func GetElWithdrawal(ctx context.Context, blockUid uint64, blockIndex uint16) (*dbtypes.ElWithdrawal, error)
- func GetElWithdrawalsByAccountID(ctx context.Context, accountID uint64, offset uint64, limit uint32) ([]*dbtypes.ElWithdrawal, uint64, error)
- func GetElWithdrawalsByBlockUid(ctx context.Context, blockUid uint64) ([]*dbtypes.ElWithdrawal, error)
- func GetElWithdrawalsFiltered(ctx context.Context, offset uint64, limit uint32, ...) ([]*dbtypes.ElWithdrawal, uint64, error)
- func GetEpochs(ctx context.Context, firstEpoch uint64, limit uint32) []*dbtypes.Epoch
- func GetExplorerState(ctx context.Context, key string, returnValue interface{}) (interface{}, error)
- func GetFilteredSlots(ctx context.Context, filter *dbtypes.BlockFilter, firstSlot uint64, ...) []*dbtypes.AssignedSlot
- func GetForkBlockCounts(ctx context.Context, startSlot uint64, endSlot uint64) (map[uint64]uint64, error)
- func GetForkById(ctx context.Context, forkId uint64) *dbtypes.Fork
- func GetForkVisualizationData(ctx context.Context, startSlot uint64, endSlot uint64) ([]*dbtypes.Fork, error)
- func GetHighestMevBlockSlotByRelay(ctx context.Context, relayId uint8) (uint64, error)
- func GetHighestRootBeforeSlot(ctx context.Context, slot uint64, withOrphaned bool) []byte
- func GetLatestBlobAssignment(ctx context.Context, commitment []byte) *dbtypes.BlobAssignment
- func GetLatestElBlockSlot() (uint64, error)
- func GetMaxValidatorIndex(ctx context.Context) (uint64, error)
- func GetMevBlockByBlockHash(ctx context.Context, blockHash []byte) *dbtypes.MevBlock
- func GetMevBlocksByBlockHashes(ctx context.Context, blockHashes [][]byte) map[string]*dbtypes.MevBlock
- func GetMevBlocksFiltered(ctx context.Context, offset uint64, limit uint32, ...) ([]*dbtypes.MevBlock, uint64, error)
- func GetNewestElBlockUid(ctx context.Context) (uint64, error)
- func GetOldestElBlockUid(ctx context.Context) (uint64, error)
- func GetOldestElBlocksWithData(ctx context.Context, limit uint32) ([]*dbtypes.ElBlock, error)
- func GetOrphanedBlock(ctx context.Context, root []byte) *dbtypes.OrphanedBlock
- func GetOrphanedEpoch(ctx context.Context, epoch uint64, headRoot []byte) *dbtypes.OrphanedEpoch
- func GetPendingFunctionSignatures(ctx context.Context, limit uint64) []*dbtypes.TxPendingFunctionSignature
- func GetSlashingForValidator(ctx context.Context, validator uint64) *dbtypes.Slashing
- func GetSlashingsFiltered(ctx context.Context, offset uint64, limit uint32, finalizedBlock uint64, ...) ([]*dbtypes.Slashing, uint64, error)
- func GetSlotAssignment(ctx context.Context, slot uint64) uint64
- func GetSlotBlobCountByExecutionHashes(ctx context.Context, blockHashes [][]byte) []*dbtypes.BlockBlobCount
- func GetSlotByRoot(ctx context.Context, root []byte) *dbtypes.Slot
- func GetSlotStatus(ctx context.Context, blockRoots [][]byte) []*dbtypes.BlockStatus
- func GetSlotsByBlockHash(ctx context.Context, blockHash []byte) []*dbtypes.Slot
- func GetSlotsByParentRoot(ctx context.Context, parentRoot []byte) []*dbtypes.Slot
- func GetSlotsByRoots(ctx context.Context, roots [][]byte) map[phase0.Root]*dbtypes.Slot
- func GetSlotsRange(ctx context.Context, firstSlot uint64, lastSlot uint64, withMissing bool, ...) []*dbtypes.AssignedSlot
- func GetSyncAssignmentsForPeriod(ctx context.Context, period uint64) []uint64
- func GetSyncCommitteeParticipation(ctx context.Context, slot uint64) (float64, error)
- func GetTotalElBlockDataSize(ctx context.Context) (int64, error)
- func GetTxFunctionSignaturesByBytes(ctx context.Context, sigBytes []types.TxSignatureBytes) []*dbtypes.TxFunctionSignature
- func GetUnfinalizedBlock(ctx context.Context, root []byte) *dbtypes.UnfinalizedBlock
- func GetUnfinalizedBlocks(ctx context.Context, filter *dbtypes.UnfinalizedBlockFilter) []*dbtypes.UnfinalizedBlock
- func GetUnfinalizedDuty(ctx context.Context, epoch uint64, dependentRoot []byte) *dbtypes.UnfinalizedDuty
- func GetUnfinalizedEpoch(ctx context.Context, epoch uint64, headRoot []byte) *dbtypes.UnfinalizedEpoch
- func GetUnfinalizedForks(ctx context.Context, finalizedSlot uint64) []*dbtypes.Fork
- func GetUnknownFunctionSignatures(ctx context.Context, sigBytes []types.TxSignatureBytes) []*dbtypes.TxUnknownFunctionSignature
- func GetValidatorByIndex(ctx context.Context, index phase0.ValidatorIndex) *dbtypes.Validator
- func GetValidatorByPubkey(ctx context.Context, pubkey []byte) *dbtypes.Validator
- func GetValidatorIndexesByFilter(ctx context.Context, filter dbtypes.ValidatorFilter, currentEpoch uint64) ([]uint64, error)
- func GetValidatorNames(ctx context.Context, minIdx uint64, maxIdx uint64) []*dbtypes.ValidatorName
- func GetValidatorRange(ctx context.Context, startIndex uint64, endIndex uint64) []*dbtypes.Validator
- func GetVoluntaryExitForValidator(ctx context.Context, validator uint64) *dbtypes.VoluntaryExit
- func GetVoluntaryExitsFiltered(ctx context.Context, offset uint64, limit uint32, finalizedBlock uint64, ...) ([]*dbtypes.VoluntaryExit, uint64, error)
- func GetWithdrawalRequestTxsByDequeueRange(ctx context.Context, dequeueFirst uint64, dequeueLast uint64) []*dbtypes.WithdrawalRequestTx
- func GetWithdrawalRequestTxsByTxHashes(ctx context.Context, txHashes [][]byte) []*dbtypes.WithdrawalRequestTx
- func GetWithdrawalRequestTxsFiltered(ctx context.Context, offset uint64, limit uint32, canonicalForkIds []uint64, ...) ([]*dbtypes.WithdrawalRequestTx, uint64, error)
- func GetWithdrawalRequestsByElBlockRange(ctx context.Context, firstSlot uint64, lastSlot uint64) []*dbtypes.WithdrawalRequest
- func GetWithdrawalRequestsFiltered(ctx context.Context, offset uint64, limit uint32, canonicalForkIds []uint64, ...) ([]*dbtypes.WithdrawalRequest, uint64, error)
- func HasElTransactionsInternalByAccount(ctx context.Context, accountID uint64) (bool, error)
- func HasElWithdrawalsByAccountID(ctx context.Context, accountID uint64) (bool, error)
- func InsertBlob(ctx context.Context, tx *sqlx.Tx, blob *dbtypes.Blob) error
- func InsertBlobAssignment(ctx context.Context, tx *sqlx.Tx, blobAssignment *dbtypes.BlobAssignment) error
- func InsertConsolidationRequestTxs(ctx context.Context, tx *sqlx.Tx, ...) error
- func InsertConsolidationRequests(ctx context.Context, tx *sqlx.Tx, ...) error
- func InsertDepositTxs(ctx context.Context, tx *sqlx.Tx, depositTxs []*dbtypes.DepositTx) error
- func InsertDeposits(ctx context.Context, tx *sqlx.Tx, deposits []*dbtypes.Deposit) error
- func InsertElAccount(ctx context.Context, dbTx *sqlx.Tx, account *dbtypes.ElAccount) (uint64, error)
- func InsertElBalances(ctx context.Context, dbTx *sqlx.Tx, balances []*dbtypes.ElBalance) error
- func InsertElBlock(ctx context.Context, dbTx *sqlx.Tx, block *dbtypes.ElBlock) error
- func InsertElEventIndices(ctx context.Context, dbTx *sqlx.Tx, entries []*dbtypes.ElEventIndex) error
- func InsertElToken(ctx context.Context, dbTx *sqlx.Tx, token *dbtypes.ElToken) (uint64, error)
- func InsertElTokenTransfers(ctx context.Context, dbTx *sqlx.Tx, transfers []*dbtypes.ElTokenTransfer) error
- func InsertElTransactions(ctx context.Context, dbTx *sqlx.Tx, txs []*dbtypes.ElTransaction) error
- func InsertElTransactionsInternal(ctx context.Context, dbTx *sqlx.Tx, entries []*dbtypes.ElTransactionInternal) error
- func InsertElWithdrawals(ctx context.Context, dbTx *sqlx.Tx, withdrawals []*dbtypes.ElWithdrawal) error
- func InsertEpoch(ctx context.Context, tx *sqlx.Tx, epoch *dbtypes.Epoch) error
- func InsertFork(ctx context.Context, tx *sqlx.Tx, fork *dbtypes.Fork) error
- func InsertMevBlocks(ctx context.Context, tx *sqlx.Tx, mevBlocks []*dbtypes.MevBlock) error
- func InsertMissingSlot(ctx context.Context, tx *sqlx.Tx, block *dbtypes.SlotHeader) error
- func InsertOrphanedBlock(ctx context.Context, tx *sqlx.Tx, block *dbtypes.OrphanedBlock) error
- func InsertOrphanedEpoch(ctx context.Context, tx *sqlx.Tx, epoch *dbtypes.OrphanedEpoch) error
- func InsertPendingFunctionSignatures(ctx context.Context, tx *sqlx.Tx, ...) error
- func InsertSlashings(ctx context.Context, tx *sqlx.Tx, slashings []*dbtypes.Slashing) error
- func InsertSlot(ctx context.Context, tx *sqlx.Tx, slot *dbtypes.Slot) error
- func InsertSyncAssignments(ctx context.Context, tx *sqlx.Tx, syncAssignments []*dbtypes.SyncAssignment) error
- func InsertTxFunctionSignature(ctx context.Context, tx *sqlx.Tx, txFuncSig *dbtypes.TxFunctionSignature) error
- func InsertUnfinalizedBlock(ctx context.Context, tx *sqlx.Tx, block *dbtypes.UnfinalizedBlock) error
- func InsertUnfinalizedDuty(ctx context.Context, tx *sqlx.Tx, duty *dbtypes.UnfinalizedDuty) error
- func InsertUnfinalizedEpoch(ctx context.Context, tx *sqlx.Tx, epoch *dbtypes.UnfinalizedEpoch) error
- func InsertUnknownFunctionSignatures(ctx context.Context, tx *sqlx.Tx, ...) error
- func InsertValidator(ctx context.Context, tx *sqlx.Tx, validator *dbtypes.Validator) error
- func InsertValidatorBatch(ctx context.Context, tx *sqlx.Tx, validators []*dbtypes.Validator) error
- func InsertValidatorNames(ctx context.Context, tx *sqlx.Tx, validatorNames []*dbtypes.ValidatorName) error
- func InsertVoluntaryExits(ctx context.Context, tx *sqlx.Tx, voluntaryExits []*dbtypes.VoluntaryExit) error
- func InsertWithdrawalRequestTxs(ctx context.Context, tx *sqlx.Tx, withdrawalTxs []*dbtypes.WithdrawalRequestTx) error
- func InsertWithdrawalRequests(ctx context.Context, tx *sqlx.Tx, elRequests []*dbtypes.WithdrawalRequest) error
- func IsEpochSynchronized(ctx context.Context, epoch uint64) bool
- func IsSyncCommitteeSynchronized(ctx context.Context, period uint64) bool
- func MustCloseDB()
- func MustInitDB(dbcfg *types.DatabaseConfig)
- func ResetElBlockDataStatus(ctx context.Context, dbTx *sqlx.Tx, blockUids []uint64) error
- func ResetElBlockDataStatusBefore(ctx context.Context, dbTx *sqlx.Tx, blockUidThreshold uint64) (int64, error)
- func RunDBTransaction(handler func(tx *sqlx.Tx) error) error
- func SetExplorerState(ctx context.Context, tx *sqlx.Tx, key string, value interface{}) error
- func StreamOrphanedEpochs(ctx context.Context, epoch uint64, cb func(duty *dbtypes.OrphanedEpoch)) error
- func StreamUnfinalizedBlocks(ctx context.Context, slot uint64, cb func(block *dbtypes.UnfinalizedBlock)) error
- func StreamUnfinalizedDuties(ctx context.Context, epoch uint64, cb func(duty *dbtypes.UnfinalizedDuty)) error
- func StreamUnfinalizedEpochs(ctx context.Context, epoch uint64, cb func(duty *dbtypes.UnfinalizedEpoch)) error
- func StreamValidatorsByIndexes(ctx context.Context, indexes []uint64, ...) error
- func UpdateConsolidationRequestTxHash(ctx context.Context, tx *sqlx.Tx, slotRoot []byte, slotIndex uint64, ...) error
- func UpdateElAccount(ctx context.Context, dbTx *sqlx.Tx, account *dbtypes.ElAccount) error
- func UpdateElAccountsLastNonce(ctx context.Context, dbTx *sqlx.Tx, accounts []*dbtypes.ElAccount) error
- func UpdateElBalance(ctx context.Context, dbTx *sqlx.Tx, balance *dbtypes.ElBalance) error
- func UpdateElBlockDataStatus(ctx context.Context, dbTx *sqlx.Tx, blockUid uint64, dataStatus uint16, ...) error
- func UpdateElToken(ctx context.Context, dbTx *sqlx.Tx, token *dbtypes.ElToken) error
- func UpdateFinalizedForkParents(ctx context.Context, tx *sqlx.Tx, finalizedRoots [][]byte) error
- func UpdateForkParent(ctx context.Context, tx *sqlx.Tx, parentRoot []byte, parentForkId uint64) error
- func UpdateMevBlockByEpoch(ctx context.Context, tx *sqlx.Tx, epoch uint64, slotsPerEpoch uint64, ...) error
- func UpdateUnfinalizedBlockExecutionTimes(ctx context.Context, tx *sqlx.Tx, root []byte, minExecTime uint32, ...) error
- func UpdateUnfinalizedBlockForkId(ctx context.Context, tx *sqlx.Tx, roots [][]byte, forkId uint64) error
- func UpdateUnfinalizedBlockStatus(ctx context.Context, tx *sqlx.Tx, roots [][]byte, ...) error
- func UpdateWithdrawalRequestTxHash(ctx context.Context, tx *sqlx.Tx, slotRoot []byte, slotIndex uint64, ...) error
- type BlobStatistics
- type BlockDbStats
- type CleanupStats
- type EpochParticipation
- type ForkParticipationByEpoch
- type OrphanedEpochParticipation
- type RecentBlockStats
- type TableStats
- type UnfinalizedEpochParticipation
Constants ¶
const MaxAccountInternalTxCount = 100000
MaxAccountInternalTxCount is the maximum count returned for address internal transaction queries. If the actual count exceeds this, the query returns this limit and sets the "more" flag.
const MaxAccountTokenTransferCount = 100000
MaxAccountTokenTransferCount is the maximum count returned for address token transfer queries. If the actual count exceeds this, the query returns this limit and sets the "more" flag.
const MaxAccountTransactionCount = 100000
MaxAccountTransactionCount is the maximum count returned for address transaction queries. If the actual count exceeds this, the query returns this limit and sets the "more" flag.
const MaxAccountWithdrawalCount = 100000
MaxAccountWithdrawalCount is the maximum count returned for address withdrawal queries.
Variables ¶
var DBPGX *pgxpool.Conn
var DbEngine dbtypes.DBEngineType
DB is a pointer to the explorer-database
var EmbedPgsqlSchema embed.FS
var EmbedSqliteSchema embed.FS
var ReaderDb *sqlx.DB
Functions ¶
func ApplyEmbeddedDbSchema ¶
func ConvertInt64ToUint64 ¶ added in v1.14.0
ConvertInt64ToUint64 converts an int64 to a uint64, supporting the full range of int64, but the value is translated to the range of uint64.
func ConvertUint64ToInt64 ¶ added in v1.14.0
ConvertUint64ToInt64 converts a uint64 to an int64, supporting the full range of uint64, but the value is translated to the range of int64.
func DeleteElAccount ¶ added in v1.19.9
func DeleteElBalance ¶ added in v1.19.9
func DeleteElBalancesByAccountID ¶ added in v1.19.9
func DeleteElBalancesByTokenID ¶ added in v1.19.9
func DeleteElBlock ¶ added in v1.19.9
func DeleteElToken ¶ added in v1.19.9
func DeleteElTokenTransfer ¶ added in v1.19.9
func DeleteElTokenTransfersByBlockUid ¶ added in v1.19.9
func DeleteElTokenTransfersByTokenID ¶ added in v1.19.9
func DeleteElTokenTransfersByTxHash ¶ added in v1.19.9
func DeleteElTransaction ¶ added in v1.19.9
func DeleteElTransactionsByBlockUid ¶ added in v1.19.9
func DeleteElWithdrawal ¶ added in v1.19.9
func DeleteElWithdrawalsByBlockUid ¶ added in v1.19.9
func DeleteElZeroBalances ¶ added in v1.19.9
DeleteElZeroBalances deletes all balance entries with zero balance. Returns the number of deleted rows.
func DeleteFinalizedForks ¶ added in v1.11.0
func DeleteUnfinalizedBlocksBefore ¶ added in v1.11.0
func DeleteUnfinalizedDutiesBefore ¶ added in v1.11.0
func DeleteUnfinalizedEpochsBefore ¶ added in v1.14.0
func DeleteValidatorNames ¶
func EngineQuery ¶
func EngineQuery(queryMap map[dbtypes.DBEngineType]string) string
func GetBlockHeadByRoot ¶ added in v1.11.0
func GetBlockHeadBySlot ¶ added in v1.15.0
func GetBlockHeadBySlotRange ¶ added in v1.19.9
func GetConsolidationRequestTxsByDequeueRange ¶ added in v1.12.1
func GetConsolidationRequestTxsByTxHashes ¶ added in v1.12.1
func GetConsolidationRequestTxsByTxHashes(ctx context.Context, txHashes [][]byte) []*dbtypes.ConsolidationRequestTx
func GetConsolidationRequestTxsFiltered ¶ added in v1.12.1
func GetConsolidationRequestsByElBlockRange ¶ added in v1.12.1
func GetConsolidationRequestsFiltered ¶ added in v1.12.0
func GetDatabaseSize ¶ added in v1.20.4
GetDatabaseSize returns the total database size in bytes.
func GetDepositTxs ¶
func GetDepositTxsByIndexes ¶ added in v1.15.0
func GetDepositTxsFiltered ¶
func GetDepositsFiltered ¶
func GetDepositsFiltered(ctx context.Context, offset uint64, limit uint32, canonicalForkIds []uint64, filter *dbtypes.DepositFilter, txFilter *dbtypes.DepositTxFilter) ([]*dbtypes.DepositWithTx, uint64, error)
func GetElAccountByAddress ¶ added in v1.19.9
func GetElAccountByID ¶ added in v1.19.9
func GetElAccountsByAddresses ¶ added in v1.20.0
func GetElAccountsByAddresses(ctx context.Context, addresses [][]byte) (map[string]*dbtypes.ElAccount, error)
GetElAccountsByAddresses retrieves multiple accounts by their addresses in a single query. Returns a map from address (as hex string) to account for efficient lookup.
func GetElAccountsByFunder ¶ added in v1.19.9
func GetElAccountsByIDs ¶ added in v1.19.9
GetElAccountsByIDs retrieves multiple accounts by their IDs in a single query.
func GetElAccountsFiltered ¶ added in v1.19.9
func GetElBalance ¶ added in v1.19.9
func GetElBalancesByAccountID ¶ added in v1.19.9
func GetElBalancesByTokenID ¶ added in v1.19.9
func GetElBalancesFiltered ¶ added in v1.19.9
func GetElBlock ¶ added in v1.19.9
func GetElBlocksByUids ¶ added in v1.19.9
func GetElEventIndexCountByTxHash ¶ added in v1.20.4
GetElEventIndexCountByTxHash returns the number of event index entries for a given transaction hash. Uses an index-only scan for fast counting.
func GetElEventIndicesBySource ¶ added in v1.20.3
func GetElEventIndicesBySource( ctx context.Context, sourceID uint64, offset uint64, limit uint32, ) ([]*dbtypes.ElEventIndex, uint64, error)
GetElEventIndicesBySource returns event index entries for a given source contract, ordered by block_uid DESC.
func GetElEventIndicesByTopic1 ¶ added in v1.20.3
func GetElEventIndicesByTopic1( ctx context.Context, topic1 []byte, offset uint64, limit uint32, ) ([]*dbtypes.ElEventIndex, uint64, error)
GetElEventIndicesByTopic1 returns event index entries for a given event signature (topic1), ordered by block_uid DESC.
func GetElEventIndicesByTxHash ¶ added in v1.20.3
GetElEventIndicesByTxHash returns all event index entries for a given transaction hash.
func GetElTokenByContract ¶ added in v1.19.9
func GetElTokenByID ¶ added in v1.19.9
func GetElTokenTransfer ¶ added in v1.19.9
func GetElTokenTransferCountByBlockUidAndTxHash ¶ added in v1.20.4
func GetElTokenTransferCountByBlockUidAndTxHash(ctx context.Context, blockUid uint64, txHash []byte) (uint64, error)
GetElTokenTransferCountByBlockUidAndTxHash returns the number of token transfers for a given block UID and transaction hash.
func GetElTokenTransfersByAccountID ¶ added in v1.19.9
func GetElTokenTransfersByAccountIDCombined ¶ added in v1.19.9
func GetElTokenTransfersByAccountIDCombined(ctx context.Context, accountID uint64, tokenTypes []uint8, offset uint64, limit uint32) ([]*dbtypes.ElTokenTransfer, uint64, bool, error)
GetElTokenTransfersByAccountIDCombined returns all token transfers where the account is either sender or receiver. Results are sorted by block_uid DESC, tx_pos DESC, tx_idx DESC. tokenTypes filters by token type (empty = all types). Returns transfers, total count (capped at MaxAccountTokenTransferCount), whether count is capped, and error.
func GetElTokenTransfersByBlockUid ¶ added in v1.19.9
func GetElTokenTransfersByBlockUidAndTxHash ¶ added in v1.19.9
func GetElTokenTransfersByTokenID ¶ added in v1.19.9
func GetElTokenTransfersByTxHash ¶ added in v1.19.9
func GetElTokenTransfersFiltered ¶ added in v1.19.9
func GetElTokenTransfersFiltered(ctx context.Context, offset uint64, limit uint32, filter *dbtypes.ElTokenTransferFilter) ([]*dbtypes.ElTokenTransfer, uint64, error)
func GetElTokens ¶ added in v1.19.9
func GetElTokensByContracts ¶ added in v1.20.0
func GetElTokensByContracts(ctx context.Context, contracts [][]byte) (map[string]*dbtypes.ElToken, error)
GetElTokensByContracts retrieves multiple tokens by their contract addresses in a single query. Returns a map from contract address (as hex string) to token for efficient lookup.
func GetElTokensByIDs ¶ added in v1.19.9
GetElTokensByIDs retrieves multiple tokens by their IDs in a single query.
func GetElTokensFiltered ¶ added in v1.19.9
func GetElTransaction ¶ added in v1.19.9
func GetElTransactionsByAccountID ¶ added in v1.19.9
func GetElTransactionsByAccountIDCombined ¶ added in v1.19.9
func GetElTransactionsByAccountIDCombined(ctx context.Context, accountID uint64, offset uint64, limit uint32) ([]*dbtypes.ElTransaction, uint64, bool, error)
GetElTransactionsByAccountIDCombined fetches transactions where the account is either sender (from_id) or receiver (to_id). Results are sorted by block_uid DESC, tx_index DESC. Returns transactions, total count (capped at MaxAccountTransactionCount), whether count is capped, and error.
func GetElTransactionsByBlockUid ¶ added in v1.19.9
func GetElTransactionsByHash ¶ added in v1.19.9
func GetElTransactionsByHashes ¶ added in v1.20.3
func GetElTransactionsByHashes(ctx context.Context, txHashes [][]byte) ([]*dbtypes.ElTransaction, error)
GetElTransactionsByHashes returns all transaction records matching the given tx hashes. May return multiple records per hash if the tx appears in multiple blocks (reorgs).
func GetElTransactionsFiltered ¶ added in v1.19.9
func GetElTransactionsFiltered(ctx context.Context, offset uint64, limit uint32, filter *dbtypes.ElTransactionFilter) ([]*dbtypes.ElTransaction, uint64, error)
func GetElTransactionsInternalByAccount ¶ added in v1.20.3
func GetElTransactionsInternalByAccount( ctx context.Context, accountID uint64, offset uint64, limit uint32, ) ([]*dbtypes.ElTransactionInternal, uint64, error)
GetElTransactionsInternalByAccount returns internal transactions involving the given account (as sender or receiver), ordered by block_uid DESC. Uses UNION ALL instead of OR to enable index scans on the composite indexes (from_id, block_uid DESC) and (to_id, block_uid DESC). NULLS LAST is required to match the index definition and enable index scans.
func GetElTransactionsInternalByTxHash ¶ added in v1.20.3
func GetElTransactionsInternalByTxHash(ctx context.Context, txHash []byte) ([]*dbtypes.ElTransactionInternal, error)
GetElTransactionsInternalByTxHash returns all internal transactions for a given transaction hash.
func GetElTransactionsInternalCountByTxHash ¶ added in v1.20.4
GetElTransactionsInternalCountByTxHash returns the number of internal transactions for a given transaction hash. Uses an index-only scan.
func GetElWithdrawal ¶ added in v1.19.9
func GetElWithdrawalsByAccountID ¶ added in v1.19.9
func GetElWithdrawalsByBlockUid ¶ added in v1.19.9
func GetElWithdrawalsFiltered ¶ added in v1.19.9
func GetElWithdrawalsFiltered(ctx context.Context, offset uint64, limit uint32, filter *dbtypes.ElWithdrawalFilter) ([]*dbtypes.ElWithdrawal, uint64, error)
func GetExplorerState ¶
func GetFilteredSlots ¶
func GetFilteredSlots(ctx context.Context, filter *dbtypes.BlockFilter, firstSlot uint64, offset uint64, limit uint32) []*dbtypes.AssignedSlot
func GetForkBlockCounts ¶ added in v1.18.3
func GetForkBlockCounts(ctx context.Context, startSlot uint64, endSlot uint64) (map[uint64]uint64, error)
GetForkBlockCounts returns the number of blocks for each fork ID
func GetForkById ¶ added in v1.12.1
func GetForkVisualizationData ¶ added in v1.18.3
func GetLatestBlobAssignment ¶
func GetLatestBlobAssignment(ctx context.Context, commitment []byte) *dbtypes.BlobAssignment
func GetLatestElBlockSlot ¶ added in v1.20.4
GetLatestElBlockSlot returns the slot of the most recently indexed EL block.
func GetMaxValidatorIndex ¶ added in v1.14.0
GetMaxValidatorIndex returns the highest validator index in the database
func GetMevBlockByBlockHash ¶
func GetMevBlocksByBlockHashes ¶ added in v1.16.0
func GetMevBlocksByBlockHashes(ctx context.Context, blockHashes [][]byte) map[string]*dbtypes.MevBlock
GetMevBlocksByBlockHashes retrieves multiple MEV blocks in a single database query for better performance
func GetMevBlocksFiltered ¶
func GetNewestElBlockUid ¶ added in v1.19.9
GetNewestElBlockUid returns the newest (maximum) block_uid in the el_blocks table. Returns 0 if no blocks exist.
func GetOldestElBlockUid ¶ added in v1.19.9
GetOldestElBlockUid returns the oldest (minimum) block_uid in the el_blocks table. Returns 0 if no blocks exist.
func GetOldestElBlocksWithData ¶ added in v1.20.3
GetOldestElBlocksWithData returns the oldest blocks that have blockdb data, ordered by block_uid ascending.
func GetOrphanedBlock ¶
func GetOrphanedBlock(ctx context.Context, root []byte) *dbtypes.OrphanedBlock
func GetOrphanedEpoch ¶ added in v1.18.3
func GetPendingFunctionSignatures ¶
func GetPendingFunctionSignatures(ctx context.Context, limit uint64) []*dbtypes.TxPendingFunctionSignature
func GetSlashingForValidator ¶
func GetSlashingsFiltered ¶
func GetSlotBlobCountByExecutionHashes ¶ added in v1.18.3
func GetSlotBlobCountByExecutionHashes(ctx context.Context, blockHashes [][]byte) []*dbtypes.BlockBlobCount
func GetSlotStatus ¶
func GetSlotStatus(ctx context.Context, blockRoots [][]byte) []*dbtypes.BlockStatus
func GetSlotsByBlockHash ¶
func GetSlotsByParentRoot ¶
func GetSlotsByRoots ¶ added in v1.11.1
func GetSlotsRange ¶
func GetSyncCommitteeParticipation ¶ added in v1.18.3
func GetTotalElBlockDataSize ¶ added in v1.20.3
GetTotalElBlockDataSize returns the total data_size across all el_blocks.
func GetTxFunctionSignaturesByBytes ¶
func GetTxFunctionSignaturesByBytes(ctx context.Context, sigBytes []types.TxSignatureBytes) []*dbtypes.TxFunctionSignature
func GetUnfinalizedBlock ¶
func GetUnfinalizedBlock(ctx context.Context, root []byte) *dbtypes.UnfinalizedBlock
func GetUnfinalizedBlocks ¶
func GetUnfinalizedBlocks(ctx context.Context, filter *dbtypes.UnfinalizedBlockFilter) []*dbtypes.UnfinalizedBlock
func GetUnfinalizedDuty ¶ added in v1.11.0
func GetUnfinalizedEpoch ¶
func GetUnfinalizedForks ¶ added in v1.11.0
func GetUnknownFunctionSignatures ¶
func GetUnknownFunctionSignatures(ctx context.Context, sigBytes []types.TxSignatureBytes) []*dbtypes.TxUnknownFunctionSignature
func GetValidatorByIndex ¶ added in v1.14.0
GetValidatorByIndex returns a validator by index
func GetValidatorByPubkey ¶ added in v1.14.0
GetValidatorByPubkey returns a validator by pubkey
func GetValidatorIndexesByFilter ¶ added in v1.14.0
func GetValidatorIndexesByFilter(ctx context.Context, filter dbtypes.ValidatorFilter, currentEpoch uint64) ([]uint64, error)
GetValidatorIndexesByFilter returns validator indexes matching a filter
func GetValidatorNames ¶
func GetValidatorRange ¶ added in v1.14.0
func GetValidatorRange(ctx context.Context, startIndex uint64, endIndex uint64) []*dbtypes.Validator
GetValidatorRange returns validators in a given index range
func GetVoluntaryExitForValidator ¶
func GetVoluntaryExitForValidator(ctx context.Context, validator uint64) *dbtypes.VoluntaryExit
func GetWithdrawalRequestTxsByDequeueRange ¶ added in v1.12.1
func GetWithdrawalRequestTxsByTxHashes ¶ added in v1.12.1
func GetWithdrawalRequestTxsByTxHashes(ctx context.Context, txHashes [][]byte) []*dbtypes.WithdrawalRequestTx
func GetWithdrawalRequestTxsFiltered ¶ added in v1.12.1
func GetWithdrawalRequestsByElBlockRange ¶ added in v1.12.1
func GetWithdrawalRequestsFiltered ¶ added in v1.11.0
func HasElTransactionsInternalByAccount ¶ added in v1.20.4
HasElTransactionsInternalByAccount returns true if the given account has any internal transactions (as sender or receiver). Uses EXISTS for O(1) lookup.
func HasElWithdrawalsByAccountID ¶ added in v1.20.4
HasElWithdrawalsByAccountID returns true if the given account has any withdrawals or fee recipient rewards. Uses EXISTS for O(1) lookup.
func InsertBlobAssignment ¶
func InsertConsolidationRequestTxs ¶ added in v1.12.1
func InsertConsolidationRequests ¶ added in v1.11.0
func InsertDepositTxs ¶
func InsertDeposits ¶
func InsertElAccount ¶ added in v1.19.9
func InsertElBalances ¶ added in v1.19.9
func InsertElBlock ¶ added in v1.19.9
func InsertElEventIndices ¶ added in v1.20.3
func InsertElEventIndices(ctx context.Context, dbTx *sqlx.Tx, entries []*dbtypes.ElEventIndex) error
InsertElEventIndices inserts event index entries in batch.
func InsertElToken ¶ added in v1.19.9
func InsertElTokenTransfers ¶ added in v1.19.9
func InsertElTransactions ¶ added in v1.19.9
func InsertElTransactionsInternal ¶ added in v1.20.3
func InsertElTransactionsInternal(ctx context.Context, dbTx *sqlx.Tx, entries []*dbtypes.ElTransactionInternal) error
InsertElTransactionsInternal inserts internal transaction index entries in batch.
func InsertElWithdrawals ¶ added in v1.19.9
func InsertFork ¶ added in v1.11.0
func InsertMevBlocks ¶
func InsertMissingSlot ¶
func InsertOrphanedBlock ¶
func InsertOrphanedEpoch ¶ added in v1.18.3
func InsertSlashings ¶
func InsertSyncAssignments ¶
func InsertUnfinalizedBlock ¶
func InsertUnfinalizedDuty ¶ added in v1.11.0
func InsertUnfinalizedEpoch ¶
func InsertValidator ¶ added in v1.14.0
InsertValidator inserts a single validator into the database
func InsertValidatorBatch ¶ added in v1.14.0
InsertValidatorBatch inserts multiple validators in a batch
func InsertValidatorNames ¶
func InsertVoluntaryExits ¶
func InsertWithdrawalRequestTxs ¶ added in v1.12.1
func InsertWithdrawalRequests ¶ added in v1.11.0
func MustCloseDB ¶
func MustCloseDB()
func MustInitDB ¶
func MustInitDB(dbcfg *types.DatabaseConfig)
func ResetElBlockDataStatus ¶ added in v1.20.3
ResetElBlockDataStatus resets data_status and data_size for blocks that have been evicted from blockdb.
func ResetElBlockDataStatusBefore ¶ added in v1.20.3
func ResetElBlockDataStatusBefore(ctx context.Context, dbTx *sqlx.Tx, blockUidThreshold uint64) (int64, error)
ResetElBlockDataStatusBefore resets data_status and data_size for all blocks with block_uid below the given threshold (used for time-based pruning).
func SetExplorerState ¶
func StreamOrphanedEpochs ¶ added in v1.18.3
func StreamUnfinalizedBlocks ¶ added in v1.11.0
func StreamUnfinalizedDuties ¶ added in v1.11.0
func StreamUnfinalizedEpochs ¶ added in v1.11.0
func StreamValidatorsByIndexes ¶ added in v1.14.0
func UpdateConsolidationRequestTxHash ¶ added in v1.12.1
func UpdateElAccount ¶ added in v1.19.9
func UpdateElAccountsLastNonce ¶ added in v1.19.9
func UpdateElAccountsLastNonce(ctx context.Context, dbTx *sqlx.Tx, accounts []*dbtypes.ElAccount) error
UpdateElAccountsLastNonce batch updates last_nonce and last_block_uid for multiple accounts by ID. Uses VALUES clause for efficient batch update - 10-50x faster than individual updates.
func UpdateElBalance ¶ added in v1.19.9
func UpdateElBlockDataStatus ¶ added in v1.20.3
func UpdateElBlockDataStatus(ctx context.Context, dbTx *sqlx.Tx, blockUid uint64, dataStatus uint16, dataSize int64) error
UpdateElBlockDataStatus updates the data_status and data_size for a block after writing execution data to blockdb.
func UpdateElToken ¶ added in v1.19.9
func UpdateFinalizedForkParents ¶ added in v1.11.0
func UpdateForkParent ¶ added in v1.11.1
func UpdateMevBlockByEpoch ¶
func UpdateUnfinalizedBlockExecutionTimes ¶ added in v1.17.0
func UpdateUnfinalizedBlockForkId ¶ added in v1.11.0
func UpdateUnfinalizedBlockStatus ¶ added in v1.11.0
Types ¶
type BlobStatistics ¶ added in v1.19.5
type BlobStatistics struct {
BlobsLast1h uint64
BlobsLast24h uint64
BlobsLast7d uint64
BlobsLast18d uint64
BlocksWithBlobsLast1h uint64
BlocksWithBlobsLast24h uint64
BlocksWithBlobsLast7d uint64
BlocksWithBlobsLast18d uint64
BlobGasLast1h uint64
BlobGasLast24h uint64
BlobGasLast7d uint64
BlobGasLast18d uint64
}
func GetBlobStatistics ¶ added in v1.19.5
func GetBlobStatistics(ctx context.Context, currentSlot uint64) (*BlobStatistics, error)
type BlockDbStats ¶ added in v1.20.4
type BlockDbStats struct {
BeaconBlockCount int64
BeaconBlockSize int64
ExecDataCount int64
ExecDataSize int64
}
BlockDbStats holds aggregate stats about data stored in the block database.
func GetBlockDbStats ¶ added in v1.20.4
func GetBlockDbStats() (*BlockDbStats, error)
GetBlockDbStats returns counts and sizes for beacon blocks and execution data tracked in the database, avoiding expensive S3/Pebble listing.
type CleanupStats ¶ added in v1.19.9
type CleanupStats struct {
ZeroBalancesDeleted int64
TransactionsDeleted int64
InternalTxsDeleted int64
EventIndicesDeleted int64
TokenTransfersDeleted int64
WithdrawalsDeleted int64
BlocksDeleted int64
}
CleanupStats holds statistics from cleanup operations.
func DeleteElDataBeforeBlockUid ¶ added in v1.19.9
func DeleteElDataBeforeBlockUid(ctx context.Context, blockUidThreshold uint64, _ *sqlx.Tx) (*CleanupStats, error)
DeleteElDataBeforeBlockUid deletes all EL data (transactions, internal txs, event index, transfers, withdrawals, blocks) with block_uid less than the specified threshold. Returns statistics about deleted rows. Uses batched deletes to avoid long locks - deletes in chunks and commits between batches. Uses default batch size of 50000 rows per batch.
type EpochParticipation ¶ added in v1.18.3
type EpochParticipation struct {
Epoch uint64 `db:"epoch"`
BlockCount uint64 `db:"block_count"`
Eligible uint64 `db:"eligible"`
VotedTarget uint64 `db:"voted_target"`
VotedHead uint64 `db:"voted_head"`
VotedTotal uint64 `db:"voted_total"`
}
EpochParticipation represents participation data for a finalized canonical epoch
func GetFinalizedEpochParticipation ¶ added in v1.18.3
func GetFinalizedEpochParticipation(ctx context.Context, startEpoch, endEpoch uint64) ([]*EpochParticipation, error)
GetFinalizedEpochParticipation gets participation data for finalized canonical epochs in the given range
type ForkParticipationByEpoch ¶ added in v1.18.3
type ForkParticipationByEpoch struct {
ForkId uint64 `db:"fork_id"`
Epoch uint64 `db:"epoch"`
Participation float64 `db:"avg_participation"`
SlotCount uint64 `db:"slot_count"`
}
ForkParticipationByEpoch represents participation data for a fork in a specific epoch
func GetForkParticipationByEpoch ¶ added in v1.18.3
func GetForkParticipationByEpoch(ctx context.Context, startEpoch, endEpoch uint64, forkIds []uint64) ([]*ForkParticipationByEpoch, error)
GetForkParticipationByEpoch gets average participation per fork per epoch for the given epoch range This is optimized to fetch all data in one query to avoid expensive repeated queries
type OrphanedEpochParticipation ¶ added in v1.18.3
type OrphanedEpochParticipation struct {
Epoch uint64 `db:"epoch"`
HeadForkId uint64 `db:"epoch_head_fork_id"`
BlockCount uint64 `db:"block_count"`
Eligible uint64 `db:"eligible"`
VotedTarget uint64 `db:"voted_target"`
VotedHead uint64 `db:"voted_head"`
VotedTotal uint64 `db:"voted_total"`
}
OrphanedEpochParticipation represents participation data for an orphaned epoch
func GetOrphanedEpochParticipation ¶ added in v1.18.3
func GetOrphanedEpochParticipation(ctx context.Context, startEpoch, endEpoch uint64) ([]*OrphanedEpochParticipation, error)
GetOrphanedEpochParticipation gets participation data for orphaned epochs in the given range
type RecentBlockStats ¶ added in v1.20.4
type RecentBlockStats struct {
BlockCount int64
Transactions int64
Events int64
Transfers int64
ExecData int64
ExecDataSize int64
}
RecentBlockStats holds aggregate stats for a range of recent EL blocks.
func GetRecentElBlockStats ¶ added in v1.20.4
func GetRecentElBlockStats(lastN int64) (*RecentBlockStats, error)
GetRecentElBlockStats returns aggregate stats for the most recent N EL blocks.
type TableStats ¶ added in v1.20.4
TableStats holds size information for a database table.
func GetTableStats ¶ added in v1.20.4
func GetTableStats() ([]*TableStats, error)
GetTableStats returns row counts and sizes for all known tables.
type UnfinalizedEpochParticipation ¶ added in v1.18.3
type UnfinalizedEpochParticipation struct {
Epoch uint64 `db:"epoch"`
HeadForkId uint64 `db:"epoch_head_fork_id"`
BlockCount uint64 `db:"block_count"`
Eligible uint64 `db:"eligible"`
VotedTarget uint64 `db:"voted_target"`
VotedHead uint64 `db:"voted_head"`
VotedTotal uint64 `db:"voted_total"`
}
UnfinalizedEpochParticipation represents participation data for an unfinalized epoch
func GetUnfinalizedEpochParticipation ¶ added in v1.18.3
func GetUnfinalizedEpochParticipation(ctx context.Context, startEpoch, endEpoch uint64) ([]*UnfinalizedEpochParticipation, error)
GetUnfinalizedEpochParticipation gets participation data for unfinalized epochs in the given range This is used for pruned epochs that are stored in the database
Source Files
¶
- blobs.go
- common.go
- consolidation_request_txs.go
- consolidation_requests.go
- convert.go
- debug_stats.go
- deposit_txs.go
- deposits.go
- el_accounts.go
- el_balances.go
- el_blocks.go
- el_cleanup.go
- el_event_index.go
- el_token_transfers.go
- el_tokens.go
- el_transactions.go
- el_transactions_internal.go
- el_withdrawals.go
- epochs.go
- explorer_state.go
- forks.go
- mev_blocks.go
- orphaned_blocks.go
- orphaned_epochs.go
- slashings.go
- slots.go
- sync_assignments.go
- txsignatures.go
- unfinalized_blocks.go
- unfinalized_duties.go
- unfinalized_epochs.go
- validator_names.go
- validators.go
- voluntary_exits.go
- withdrawal_request_txs.go
- withdrawal_requests.go