Documentation
¶
Index ¶
- Constants
- Variables
- func AddAuthorizeCode(userId uint64, code, clientId string, appId uint64) error
- func AddSubscription(userID uint64, network string, eventName types.EventName, eventFilter string, ...) error
- func AddSubscriptionBatch(userID uint64, network string, eventName types.EventName, eventFilter []string, ...) error
- func AddToWatchlist(watchlist []WatchlistEntry, network string) error
- func ApplyEmbeddedDbSchema(version int64) error
- func CalculateMevFromBlock(block *types.Eth1Block) *big.Int
- func CalculateTxFeeFromTransaction(tx *types.Eth1Transaction, blockBaseFee *big.Int) *big.Int
- func CalculateTxFeesFromBlock(block *types.Eth1Block) *big.Int
- func ChangeProductIDFromStripe(tx *sql.Tx, stripeSubscriptionID string, productID string) error
- func CheckIfDayIsFinalized(day uint64) error
- func CountSentMail(email string) error
- func CreateAPIKey(userID uint64) error
- func CreateBLSToExecutionChangesNodeJob(nj *types.NodeJob) (*types.NodeJob, error)
- func CreateNodeJob(data []byte) (*types.NodeJob, error)
- func CreateVoluntaryExitNodeJob(nj *types.NodeJob) (*types.NodeJob, error)
- func DeleteAdConfiguration(id string) error
- func DeleteAllSubscription(userID uint64, network string, eventName types.EventName) error
- func DeleteSubscription(userID uint64, network string, eventName types.EventName, eventFilter string) error
- func DeleteSubscriptionBatch(userID uint64, network string, eventName types.EventName, eventFilter []string) error
- func DeleteUserByEmail(email string) error
- func DeleteUserById(id uint64) error
- func DisableAllSubscriptionsFromStripeUser(stripeCustomerID string) error
- func GatherStatisticsForDay(day int64) ([]*types.ValidatorStatsTableDbRow, error)
- func GatherValidatorSyncDutiesForDay(validators []uint64, day uint64, data []*types.ValidatorStatsTableDbRow, ...) error
- func GetActiveValidatorCount() (uint64, error)
- func GetAdConfigurations() ([]*types.AdConfig, error)
- func GetAdConfigurationsForTemplate(ids []string, noAds bool) ([]*types.AdConfig, error)
- func GetAddressForEnsName(name string) (address *common.Address, err error)
- func GetAddressWithdrawalTableData(address []byte, pageToken string, currency string) (*types.DataTableResponse, error)
- func GetAddressWithdrawalsTotal(address []byte) (uint64, error)
- func GetAllAppSubscriptions() ([]*types.PremiumData, error)
- func GetAllSlots(tx *sqlx.Tx) ([]uint64, error)
- func GetAppDataFromRedirectUri(callback string) (*types.OAuthAppData, error)
- func GetAppSubscriptionCount(userID uint64) (int64, error)
- func GetBLSChangeCount() (uint64, error)
- func GetBLSChanges(query string, length, start uint64, orderBy, orderDir string) ([]*types.BLSChange, error)
- func GetBLSChangesCountForQuery(query string) (uint64, error)
- func GetBlockNumber(slot uint64) (block uint64, err error)
- func GetBlockStatus(block int64, latestFinalizedEpoch uint64, epochInfo *types.EpochInfo) error
- func GetByRefreshToken(claimUserID, claimAppID, claimDeviceID uint64, hashedRefreshToken string) (uint64, error)
- func GetCurrentDayClIncome(validator_indices []uint64) (map[uint64]int64, error)
- func GetDashboardWithdrawals(validators []uint64, limit uint64, offset uint64, orderBy string, ...) ([]*types.Withdrawals, error)
- func GetDataTablesState(user uint64, key string) (*types.DataTableSaveState, error)
- func GetEnsExpiration(client *ethclient.Client, name string) (time.Time, error)
- func GetEnsNameForAddress(address common.Address) (name string, err error)
- func GetEnsNamesForAddress(addressMap map[string]string) error
- func GetEpochWithdrawals(epoch uint64) ([]*types.WithdrawalsNotification, error)
- func GetEpochWithdrawalsTotal(epoch uint64) (total uint64, err error)
- func GetEth1DepositsJoinEth2Deposits(query string, length, start uint64, orderBy, orderDir string, ...) ([]*types.EthOneDepositsData, uint64, error)
- func GetEth1DepositsLeaderboard(query string, length, start uint64, orderBy, orderDir string) ([]*types.EthOneDepositLeaderboardData, uint64, error)
- func GetEth2Deposits(query string, length, start uint64, orderBy, orderDir string) ([]*types.EthTwoDepositData, uint64, error)
- func GetExplorerConfigurations() ([]*types.ExplorerConfig, error)
- func GetFirstActivationEpoch(validators []uint64, firstActivationEpoch *uint64) error
- func GetHistoricalPrice(chainId uint64, currency string, day uint64) (float64, error)
- func GetLastExportedStatisticDay() (uint64, error)
- func GetLastWithdrawalEpoch(validators []uint64) (map[uint64]uint64, error)
- func GetLatestEpoch() (uint64, error)
- func GetLatestFinalizedEpoch() (uint64, error)
- func GetMailsSentCount(email string, t time.Time) (int, error)
- func GetMissedSlots(slots []uint64) ([]uint64, error)
- func GetMissedSlotsMap(slots []uint64) (map[uint64]bool, error)
- func GetMostRecentWithdrawalValidator() (uint64, error)
- func GetNodeJob(id string) (*types.NodeJob, error)
- func GetNodeJobValidatorInfos(job *types.NodeJob) ([]types.NodeJobValidatorInfo, error)
- func GetOrphanedSlots(slots []uint64) ([]uint64, error)
- func GetOrphanedSlotsMap(slots []uint64) (map[uint64]bool, error)
- func GetPendingBLSChangeValidatorCount() (uint64, error)
- func GetPendingValidatorCount() (uint64, error)
- func GetQueueAheadOfValidator(validatorIndex uint64) (uint64, error)
- func GetRelayDataForIndexedBlocks(blocks []*types.Eth1BlockIndexed) (map[common.Hash]types.RelaysData, error)
- func GetSlashingCount() (uint64, error)
- func GetSlotBLSChange(slot uint64) ([]*types.BLSChange, error)
- func GetSlotVizData(latestEpoch uint64) ([]*types.SlotVizEpochs, error)
- func GetSlotWithdrawals(slot uint64) ([]*types.Withdrawals, error)
- func GetSubsForEventFilter(eventName types.EventName) ([][]byte, map[string][]types.Subscription, error)
- func GetSubscriptions(filter GetSubscriptionsFilter) ([]*types.Subscription, error)
- func GetSyncParticipationBySlotRange(startSlot, endSlot uint64) (map[uint64]uint64, error)
- func GetTaggedValidators(filter WatchlistFilter) ([]*types.TaggedValidators, error)
- func GetTotalAmountDeposited() (uint64, error)
- func GetTotalAmountWithdrawn() (sum uint64, count uint64, err error)
- func GetTotalBLSChanges() (uint64, error)
- func GetTotalEligibleEther() (uint64, error)
- func GetTotalValidatorDeposits(validators []uint64, totalDeposits *uint64) error
- func GetTotalValidatorsCount() (uint64, error)
- func GetTotalWithdrawals() (total uint64, err error)
- func GetTotalWithdrawalsCount(validators []uint64) (uint64, error)
- func GetUserAPIKeyStatistics(apikey *string) (*types.ApiStatistics, error)
- func GetUserApiKeyById(id uint64) (string, error)
- func GetUserAuthDataByAuthorizationCode(code string) (*types.OAuthCodeData, error)
- func GetUserDevicesByUserID(userID uint64) ([]types.PairedDevice, error)
- func GetUserEmailById(id uint64) (string, error)
- func GetUserEmailsByIds(ids []uint64) (map[uint64]string, error)
- func GetUserIdByApiKey(apiKey string) (*types.UserWithPremium, error)
- func GetUserMonitorSharingSetting(userID uint64) (bool, error)
- func GetUserPremiumSubscription(id uint64) (types.UserPremiumSubscription, error)
- func GetUserPushTokenByIds(ids []uint64) (map[uint64][]string, error)
- func GetUserSubscriptionIDByStripe(stripeSubscriptionID string) (uint64, error)
- func GetValidatorActivationBalance(validators []uint64, balance *uint64) error
- func GetValidatorAttestationHistoryForNotifications(startEpoch uint64, endEpoch uint64) (map[types.Epoch]map[types.ValidatorIndex]bool, error)
- func GetValidatorBLSChange(validatorindex uint64) (*types.BLSChange, error)
- func GetValidatorBalanceForDay(validators []uint64, day uint64, balance *uint64) error
- func GetValidatorDeposits(publicKey []byte) (*types.ValidatorDeposits, error)
- func GetValidatorDepositsForSlots(validators []uint64, fromSlot uint64, toSlot uint64, deposits *uint64) error
- func GetValidatorIncomeHistory(validatorIndices []uint64, lowerBoundDay uint64, upperBoundDay uint64, ...) ([]types.ValidatorIncomeHistory, error)
- func GetValidatorIncomeHistoryChart(validatorIndices []uint64, currency string, lastFinalizedEpoch uint64, ...) ([]*types.ChartDataPoint, error)
- func GetValidatorIncomePerformance(validators []uint64, incomePerformance *types.ValidatorIncomePerformance) error
- func GetValidatorIndex(publicKey []byte) (uint64, error)
- func GetValidatorIndices() ([]uint64, error)
- func GetValidatorNames() (map[uint64]string, error)
- func GetValidatorPropsosals(validators []uint64, proposals *[]types.ValidatorProposalInfo) error
- func GetValidatorPublicKeys(indices []uint64, keys [][]byte) ([][]byte, error)
- func GetValidatorWithdrawals(validator uint64, limit uint64, offset uint64, orderBy string, orderDir string) ([]*types.Withdrawals, error)
- func GetValidatorWithdrawalsForSlots(validators []uint64, fromSlot uint64, toSlot uint64, withdrawals *uint64) error
- func GetValidatorsBLSChange(validators []uint64) ([]*types.ValidatorsBLSChange, error)
- func GetValidatorsGotSlashed(epoch uint64) ([]struct{ ... }, error)
- func GetValidatorsWithdrawals(validators []uint64, fromEpoch uint64, toEpoch uint64) ([]*types.Withdrawals, error)
- func GetValidatorsWithdrawalsByEpoch(validator []uint64, startEpoch uint64, endEpoch uint64) ([]*types.WithdrawalsByEpoch, error)
- func GetWithdrawableValidatorCount(epoch uint64) (uint64, error)
- func GetWithdrawals(query string, length, start uint64, orderBy, orderDir string) ([]*types.Withdrawals, error)
- func GetWithdrawalsCountForQuery(query string) (uint64, error)
- func InitBigtableSchema() error
- func InsertAdConfigurations(adConfig types.AdConfig) error
- func InsertMobileSubscription(tx *sql.Tx, userID uint64, paymentDetails types.MobileSubscription, ...) error
- func InsertUserDevice(userID uint64, hashedRefreshToken string, name string, appID uint64) (uint64, error)
- func MobileDeviceDelete(userID, deviceID uint64) error
- func MobileDeviceSettingsSelect(userID, deviceID uint64) (*sql.Rows, error)
- func MobileDeviceSettingsUpdate(userID, deviceID uint64, notifyEnabled, active string) (*sql.Rows, error)
- func MobileNotificatonTokenUpdate(userID, deviceID uint64, notifyToken string) error
- func MustInitDB(writer *types.DatabaseConfig, reader *types.DatabaseConfig, driverName string, ...)
- func MustInitFrontendDB(writer *types.DatabaseConfig, reader *types.DatabaseConfig, driverName string, ...)
- func NewTransaction() (*sql.Tx, error)
- func RemoveFromWatchlist(userId uint64, validator_publickey string, network string) error
- func RemoveFromWatchlistBatch(userId uint64, validator_publickeys []string, network string) error
- func SaveBlock(block *types.Block, forceSlotUpdate bool, tx *sqlx.Tx) error
- func SaveChartSeriesPoint(date time.Time, indicator string, value any) error
- func SaveDataTableState(user uint64, key string, state types.DataTableSaveState) error
- func SaveEpoch(epoch uint64, validators []*types.Validator, client rpc.Client, tx *sqlx.Tx) error
- func SaveExplorerConfiguration(configs []types.ExplorerConfig) error
- func SaveValidatorQueue(validators *types.ValidatorQueue, tx *sqlx.Tx) error
- func SaveValidators(epoch uint64, validators []*types.Validator, client rpc.Client, ...) error
- func SetBlockStatus(blocks []*types.CanonBlock) error
- func SetSlotFinalizationAndStatus(slot uint64, finalized bool, status string, tx *sqlx.Tx) error
- func SetSubscriptionToExpired(tx *sql.Tx, id uint64) error
- func SetUserMonitorSharingSetting(userID uint64, share bool) error
- func StripeCreateSubscription(tx *sql.Tx, customerID, priceID, subscriptionID string, ...) error
- func StripeGetCustomerEmail(customerID string) (string, error)
- func StripeGetCustomerUserId(customerID string) (uint64, error)
- func StripeGetSubscription(id string) (*types.StripeSubscription, error)
- func StripeGetUserSubscription(id uint64, purchaseGroup string) (types.UserSubscription, error)
- func StripeGetUserSubscriptions(id uint64, purchaseGroup string) ([]types.UserSubscription, error)
- func StripeRemoveCustomer(customerID string) error
- func StripeUpdateCustomerID(email, customerID string) error
- func StripeUpdateSubscription(tx *sql.Tx, priceID, subscriptionID string, payload json.RawMessage) error
- func StripeUpdateSubscriptionStatus(tx *sql.Tx, id string, status bool, payload *json.RawMessage) error
- func SubmitBLSToExecutionChangesNodeJob(job *types.NodeJob) error
- func SubmitBLSToExecutionChangesNodeJobs() error
- func SubmitNodeJobs() error
- func SubmitVoluntaryExitNodeJob(job *types.NodeJob) error
- func SubmitVoluntaryExitNodeJobs() error
- func TimestampToBigtableTimeDesc(ts time.Time) string
- func UpdateAdConfiguration(adConfig types.AdConfig) error
- func UpdateBLSToExecutionChangesNodeJob(job *types.NodeJob) error
- func UpdateBLSToExecutionChangesNodeJobs() error
- func UpdateCanonicalBlocks(startEpoch, endEpoch uint64, blocks []*types.MinimalBlock) error
- func UpdateEpochStatus(stats *types.ValidatorParticipation, tx *sqlx.Tx) error
- func UpdateNodeJobs() error
- func UpdatePassword(userId uint64, cleartextPassword string) error
- func UpdateQueueDeposits(tx *sqlx.Tx) error
- func UpdateSubscriptionLastSent(tx *sqlx.Tx, ts uint64, epoch uint64, subID uint64) error
- func UpdateSubscriptionsLastSent(subscriptionIDs []uint64, sent time.Time, epoch uint64, useDB *sqlx.DB) error
- func UpdateUserSubscription(tx *sql.Tx, id uint64, valid bool, expiration int64, rejectReason string) error
- func UpdateUserSubscriptionProduct(tx *sql.Tx, id uint64, productID string) error
- func UpdateVoluntaryExitNodeJob(job *types.NodeJob) error
- func UpdateVoluntaryExitNodeJobs() error
- func WriteChartSeriesForDay(day int64) error
- func WriteConsensusChartSeriesForDay(day int64) error
- func WriteExecutionChartSeriesForDay(day int64) error
- func WriteGraffitiStatisticsForDay(day int64) error
- func WriteValidatorStatisticsForDay(day uint64, client rpc.Client) error
- func WriteValidatorStatsExported(day uint64, tx pgx.Tx) error
- func WriteValidatorTotalPerformance(day uint64, tx pgx.Tx) error
- type Bigtable
- func (bigtable *Bigtable) CheckForGapsInBlocksTable(lookback int) (gapFound bool, start int, end int, err error)
- func (bigtable *Bigtable) CheckForGapsInDataTable(lookback int) error
- func (bigtable *Bigtable) ClearByPrefix(table string, family, columns, prefix string, dryRun bool) error
- func (bigtable *Bigtable) Close()
- func (bigtable *Bigtable) DeleteBlock(blockNumber uint64, blockHash []byte) error
- func (bigtable *Bigtable) DeleteEpoch(epoch uint64) error
- func (bigtable *Bigtable) GetAddressBlobTableData(address []byte, pageToken string) (*types.DataTableResponse, error)
- func (bigtable *Bigtable) GetAddressBlocksMinedTableData(address string, pageToken string) (*types.DataTableResponse, error)
- func (bigtable *Bigtable) GetAddressContractInteractionsAt(requests []contractInteractionAtRequest) ([]types.ContractInteractionType, error)
- func (bigtable *Bigtable) GetAddressContractInteractionsAtBlock(block *types.Eth1Block) ([]types.ContractInteractionType, error)
- func (bigtable *Bigtable) GetAddressContractInteractionsAtITransactions(itransactions []*types.Eth1InternalTransactionIndexed, idxs [][2]int64) ([][2]types.ContractInteractionType, error)
- func (bigtable *Bigtable) GetAddressContractInteractionsAtParityTraces(traces []*rpc.ParityTraceResult) ([][2]types.ContractInteractionType, error)
- func (bigtable *Bigtable) GetAddressContractInteractionsAtTransactions(transactions []*types.Eth1TransactionIndexed, idxs []int64) ([]types.ContractInteractionType, error)
- func (bigtable *Bigtable) GetAddressErc1155TableData(address []byte, pageToken string) (*types.DataTableResponse, error)
- func (bigtable *Bigtable) GetAddressErc20TableData(address []byte, pageToken string) (*types.DataTableResponse, error)
- func (bigtable *Bigtable) GetAddressErc721TableData(address []byte, pageToken string) (*types.DataTableResponse, error)
- func (bigtable *Bigtable) GetAddressInternalTableData(address []byte, pageToken string) (*types.DataTableResponse, error)
- func (bigtable *Bigtable) GetAddressLabel(id string, invoke_overwrite types.ContractInteractionType) string
- func (bigtable *Bigtable) GetAddressName(address []byte) (string, error)
- func (bigtable *Bigtable) GetAddressNames(addresses map[string]string) error
- func (bigtable *Bigtable) GetAddressTransactionsTableData(address []byte, pageToken string) (*types.DataTableResponse, error)
- func (bigtable *Bigtable) GetAddressUnclesMinedTableData(address string, pageToken string) (*types.DataTableResponse, error)
- func (bigtable *Bigtable) GetAddressesNamesArMetadata(names *map[string]string, inputMetadata *map[string]*types.ERC20Metadata) (map[string]string, map[string]*types.ERC20Metadata, error)
- func (bigtable *Bigtable) GetAggregatedValidatorIncomeDetailsHistory(validators []uint64, startEpoch uint64, endEpoch uint64) (map[uint64]*itypes.ValidatorEpochIncome, error)
- func (bigtable *Bigtable) GetArbitraryTokenTransfersForTransaction(transaction []byte) ([]*types.Transfer, error)
- func (bigtable *Bigtable) GetBalanceForAddress(address []byte, token []byte) (*types.Eth1AddressBalance, error)
- func (bigtable *Bigtable) GetBlockFromBlocksTable(number uint64) (*types.Eth1Block, error)
- func (bigtable *Bigtable) GetBlockKeys(blockNumber uint64, blockHash []byte) ([]string, error)
- func (bigtable *Bigtable) GetBlocksDescending(start, limit uint64) ([]*types.Eth1BlockIndexed, error)
- func (bigtable *Bigtable) GetBlocksIndexedMultiple(blockNumbers []uint64, limit uint64) ([]*types.Eth1BlockIndexed, error)
- func (bigtable *Bigtable) GetClient() *gcp_bigtable.Client
- func (bigtable *Bigtable) GetContractMetadata(address []byte) (*types.ContractMetadata, error)
- func (bigtable *Bigtable) GetERC20MetadataForAddress(address []byte) (*types.ERC20Metadata, error)
- func (bigtable *Bigtable) GetEth1BlocksForAddress(prefix string, limit int64) ([]*types.Eth1BlockIndexed, string, error)
- func (bigtable *Bigtable) GetEth1BtxForAddress(prefix string, limit int64) ([]*types.Eth1BlobTransactionIndexed, string, error)
- func (bigtable *Bigtable) GetEth1ERC1155ForAddress(prefix string, limit int64) ([]*types.ETh1ERC1155Indexed, string, error)
- func (bigtable *Bigtable) GetEth1ERC20ForAddress(prefix string, limit int64) ([]*types.Eth1ERC20Indexed, string, error)
- func (bigtable *Bigtable) GetEth1ERC721ForAddress(prefix string, limit int64) ([]*types.Eth1ERC721Indexed, string, error)
- func (bigtable *Bigtable) GetEth1ItxsForAddress(prefix string, limit int64) ([]*types.Eth1InternalTransactionIndexed, []string, error)
- func (bigtable *Bigtable) GetEth1TxForToken(prefix string, limit int64) ([]*types.Eth1ERC20Indexed, string, error)
- func (bigtable *Bigtable) GetEth1TxsForAddress(prefix string, limit int64) ([]*types.Eth1TransactionIndexed, []string, error)
- func (bigtable *Bigtable) GetEth1UnclesForAddress(prefix string, limit int64) ([]*types.Eth1UncleIndexed, string, error)
- func (bigtable *Bigtable) GetEventLabel(id []byte) string
- func (bigtable *Bigtable) GetFullBlocksDescending(stream chan<- *types.Eth1Block, high, low uint64) error
- func (bigtable *Bigtable) GetGasNowHistory(ts, pastTs time.Time) ([]types.GasNowHistory, error)
- func (bigtable *Bigtable) GetIndexedEth1Transaction(txHash []byte) (*types.Eth1TransactionIndexed, error)
- func (bigtable *Bigtable) GetInternalTransfersForTransaction(transaction []byte, from []byte, parityTrace []*rpc.ParityTraceResult, ...) ([]types.ITransaction, error)
- func (bigtable *Bigtable) GetLastAttestationSlots(validators []uint64) (map[uint64]uint64, error)
- func (bigtable *Bigtable) GetLastBlockInBlocksTable() (int, error)
- func (bigtable *Bigtable) GetLastBlockInDataTable() (int, error)
- func (bigtable Bigtable) GetMachineMetricsForNotifications(rowKeys gcp_bigtable.RowList) (map[uint64]map[string]*types.MachineMetricSystemUser, error)
- func (bigtable Bigtable) GetMachineMetricsMachineCount(userID uint64) (uint64, error)
- func (bigtable Bigtable) GetMachineMetricsMachineNames(userID uint64) ([]string, error)
- func (bigtable Bigtable) GetMachineMetricsNode(userID uint64, limit, offset int) ([]*types.MachineMetricNode, error)
- func (bigtable Bigtable) GetMachineMetricsSystem(userID uint64, limit, offset int) ([]*types.MachineMetricSystem, error)
- func (bigtable Bigtable) GetMachineMetricsValidator(userID uint64, limit, offset int) ([]*types.MachineMetricValidator, error)
- func (bigtable Bigtable) GetMachineRowKey(userID uint64, process string, machine string) string
- func (bigtable *Bigtable) GetMaxValidatorindexForEpoch(epoch uint64) (uint64, error)
- func (bigtable *Bigtable) GetMetadata(startToken string, limit int) ([]string, []*types.Eth1AddressBalance, error)
- func (bigtable *Bigtable) GetMetadataForAddress(address []byte, offset uint64, limit uint64) (*types.Eth1AddressMetadata, error)
- func (bigtable *Bigtable) GetMetadataUpdates(prefix string, startToken string, limit int) ([]string, []*types.Eth1AddressBalance, error)
- func (bigtable *Bigtable) GetMethodLabel(data []byte, interaction types.ContractInteractionType) string
- func (bigtable *Bigtable) GetMostRecentBlockFromDataTable() (*types.Eth1BlockIndexed, error)
- func (bigtable *Bigtable) GetRowsByPrefix(prefix string) ([]string, error)
- func (bigtable *Bigtable) GetSignature(hex string, st types.SignatureType) (*string, error)
- func (bigtable *Bigtable) GetSignatureImportStatus(st types.SignatureType) (*types.SignatureImportStatus, error)
- func (bigtable *Bigtable) GetTokenTransactionsTableData(token []byte, address []byte, pageToken string) (*types.DataTableResponse, error)
- func (bigtable *Bigtable) GetTotalValidatorIncomeDetailsHistory(startEpoch uint64, endEpoch uint64) (map[uint64]*itypes.ValidatorEpochIncome, error)
- func (bigtable *Bigtable) GetValidatorAttestationHistory(validators []uint64, startEpoch uint64, endEpoch uint64) (map[uint64][]*types.ValidatorAttestation, error)
- func (bigtable *Bigtable) GetValidatorBalanceHistory(validators []uint64, startEpoch uint64, endEpoch uint64) (map[uint64][]*types.ValidatorBalance, error)
- func (bigtable *Bigtable) GetValidatorBalanceStatistics(validators []uint64, startEpoch, endEpoch uint64) (map[uint64]*types.ValidatorBalanceStatistic, error)
- func (bigtable *Bigtable) GetValidatorEffectiveness(validators []uint64, epoch uint64) ([]*types.ValidatorEffectiveness, error)
- func (bigtable *Bigtable) GetValidatorIncomeDetailsHistory(validators []uint64, startEpoch uint64, endEpoch uint64) (map[uint64]map[uint64]*itypes.ValidatorEpochIncome, error)
- func (bigtable *Bigtable) GetValidatorMissedAttestationHistory(validators []uint64, startEpoch uint64, endEpoch uint64) (map[uint64]map[uint64]bool, error)
- func (bigtable *Bigtable) GetValidatorMissedAttestationsCount(validators []uint64, firstEpoch uint64, lastEpoch uint64) (map[uint64]*types.ValidatorMissedAttestationsStatistic, error)
- func (bigtable *Bigtable) GetValidatorProposalHistory(validators []uint64, startEpoch uint64, endEpoch uint64) (map[uint64][]*types.ValidatorProposal, error)
- func (bigtable *Bigtable) GetValidatorSyncDutiesHistory(validators []uint64, startSlot uint64, endSlot uint64) (map[uint64]map[uint64]*types.ValidatorSyncParticipation, error)
- func (bigtable *Bigtable) GetValidatorSyncDutiesStatistics(validators []uint64, startEpoch uint64, endEpoch uint64) (map[uint64]*types.ValidatorSyncDutiesStatistic, error)
- func (bigtable *Bigtable) ImportEnsUpdates(client *ethclient.Client, readBatchSize int64) error
- func (bigtable *Bigtable) IndexEventsWithTransformers(start, end int64, ...) error
- func (bigtable *Bigtable) MigrateIncomeDataV1V2Schema(epoch uint64) error
- func (bigtable *Bigtable) SaveAddressName(address []byte, name string) error
- func (bigtable *Bigtable) SaveAttestationDuties(duties map[types.Slot]map[types.ValidatorIndex][]types.Slot) error
- func (bigtable *Bigtable) SaveBalances(balances []*types.Eth1AddressBalance, deleteKeys []string) error
- func (bigtable *Bigtable) SaveBlock(block *types.Eth1Block) error
- func (bigtable *Bigtable) SaveBlockKeys(blockNumber uint64, blockHash []byte, keys string) error
- func (bigtable *Bigtable) SaveContractMetadata(address []byte, metadata *types.ContractMetadata) error
- func (bigtable *Bigtable) SaveERC20Metadata(address []byte, metadata *types.ERC20Metadata) error
- func (bigtable *Bigtable) SaveERC20TokenPrices(prices []*types.ERC20TokenPrice) error
- func (bigtable *Bigtable) SaveGasNowHistory(slow, standard, rapid, fast *big.Int) error
- func (bigtable *Bigtable) SaveMachineMetric(process string, userID uint64, machine string, data []byte) error
- func (bigtable *Bigtable) SaveProposal(block *types.Block) error
- func (bigtable *Bigtable) SaveProposalAssignments(epoch uint64, assignments map[uint64]uint64) error
- func (bigtable *Bigtable) SaveSignatureImportStatus(status types.SignatureImportStatus, st types.SignatureType) error
- func (bigtable *Bigtable) SaveSignatures(signatures []types.Signature, st types.SignatureType) error
- func (bigtable *Bigtable) SaveSyncComitteeDuties(duties map[types.Slot]map[types.ValidatorIndex]bool) error
- func (bigtable *Bigtable) SaveValidatorBalances(epoch uint64, validators []*types.Validator) error
- func (bigtable *Bigtable) SaveValidatorIncomeDetails(epoch uint64, rewards map[uint64]*itypes.ValidatorEpochIncome) error
- func (bigtable *Bigtable) SearchForAddress(addressPrefix []byte, limit int) ([]*types.Eth1AddressSearchItem, error)
- func (bigtable *Bigtable) SetLastAttestationSlot(validator uint64, lastAttestationSlot uint64) error
- func (bigtable *Bigtable) SetLastBlockInBlocksTable(lastBlock int64) error
- func (bigtable *Bigtable) SetLastBlockInDataTable(lastBlock int64) error
- func (bigtable *Bigtable) TransformBlobTx(blk *types.Eth1Block, cache *freecache.Cache) (bulkData *types.BulkMutations, bulkMetadataUpdates *types.BulkMutations, ...)
- func (bigtable *Bigtable) TransformBlock(block *types.Eth1Block, cache *freecache.Cache) (bulkData *types.BulkMutations, bulkMetadataUpdates *types.BulkMutations, ...)
- func (bigtable *Bigtable) TransformContract(blk *types.Eth1Block, cache *freecache.Cache) (bulkData *types.BulkMutations, bulkMetadataUpdates *types.BulkMutations, ...)
- func (bigtable *Bigtable) TransformERC1155(blk *types.Eth1Block, cache *freecache.Cache) (bulkData *types.BulkMutations, bulkMetadataUpdates *types.BulkMutations, ...)
- func (bigtable *Bigtable) TransformERC20(blk *types.Eth1Block, cache *freecache.Cache) (bulkData *types.BulkMutations, bulkMetadataUpdates *types.BulkMutations, ...)
- func (bigtable *Bigtable) TransformERC721(blk *types.Eth1Block, cache *freecache.Cache) (bulkData *types.BulkMutations, bulkMetadataUpdates *types.BulkMutations, ...)
- func (bigtable *Bigtable) TransformEnsNameRegistered(blk *types.Eth1Block, cache *freecache.Cache) (bulkData *types.BulkMutations, bulkMetadataUpdates *types.BulkMutations, ...)
- func (bigtable *Bigtable) TransformItx(blk *types.Eth1Block, cache *freecache.Cache) (bulkData *types.BulkMutations, bulkMetadataUpdates *types.BulkMutations, ...)
- func (bigtable *Bigtable) TransformTx(blk *types.Eth1Block, cache *freecache.Cache) (bulkData *types.BulkMutations, bulkMetadataUpdates *types.BulkMutations, ...)
- func (bigtable *Bigtable) TransformUncle(block *types.Eth1Block, cache *freecache.Cache) (bulkData *types.BulkMutations, bulkMetadataUpdates *types.BulkMutations, ...)
- func (bigtable *Bigtable) TransformWithdrawals(block *types.Eth1Block, cache *freecache.Cache) (bulkData *types.BulkMutations, bulkMetadataUpdates *types.BulkMutations, ...)
- func (bigtable *Bigtable) WriteBulk(mutations *types.BulkMutations, table *gcp_bigtable.Table, batchSize int) error
- type EnsCheckedDictionary
- type GetAllNonFinalizedSlotsRow
- type GetSubscriptionsFilter
- type IndexFilter
- type IndexKeys
- type PremiumResult
- type SortByIndexes
- type WatchlistEntry
- type WatchlistFilter
Constants ¶
const ( DEFAULT_FAMILY = "f" VALIDATOR_BALANCES_FAMILY = "vb" VALIDATOR_HIGHEST_ACTIVE_INDEX_FAMILY = "ha" ATTESTATIONS_FAMILY = "at" PROPOSALS_FAMILY = "pr" SYNC_COMMITTEES_FAMILY = "sc" INCOME_DETAILS_COLUMN_FAMILY = "id" STATS_COLUMN_FAMILY = "stats" MACHINE_METRICS_COLUMN_FAMILY = "mm" SERIES_FAMILY = "series" SUM_COLUMN = "sum" MAX_CL_BLOCK_NUMBER = 1000000000 - 1 MAX_EL_BLOCK_NUMBER = 1000000000 MAX_EPOCH = 1000000000 - 1 MAX_BATCH_MUTATIONS = 100000 DEFAULT_BATCH_INSERTS = 10000 REPORT_TIMEOUT = time.Second * 10 )
const ( DATA_COLUMN = "d" INDEX_COLUMN = "i" DEFAULT_FAMILY_BLOCKS = "default" METADATA_UPDATES_FAMILY_BLOCKS = "blocks" ACCOUNT_METADATA_FAMILY = "a" CONTRACT_METADATA_FAMILY = "c" ERC20_METADATA_FAMILY = "erc20" ERC721_METADATA_FAMILY = "erc721" ERC1155_METADATA_FAMILY = "erc1155" TX_PER_BLOCK_LIMIT = 10_000 ITX_PER_TX_LIMIT = 100_000 MAX_INT = 9223372036854775807 MIN_INT = -9223372036854775808 )
const ( ACCOUNT_COLUMN_NAME = "NAME" ACCOUNT_IS_CONTRACT = "ISCONTRACT" CONTRACT_NAME = "CONTRACTNAME" CONTRACT_ABI = "ABI" ERC20_COLUMN_DECIMALS = "DECIMALS" ERC20_COLUMN_TOTALSUPPLY = "TOTALSUPPLY" ERC20_COLUMN_SYMBOL = "SYMBOL" ERC20_COLUMN_PRICE = "PRICE" ERC20_COLUMN_NAME = "NAME" ERC20_COLUMN_DESCRIPTION = "DESCRIPTION" ERC20_COLUMN_LOGO = "LOGO" ERC20_COLUMN_LOGO_FORMAT = "LOGOFORMAT" ERC20_COLUMN_LINK = "LINK" ERC20_COLUMN_OGIMAGE = "OGIMAGE" ERC20_COLUMN_OGIMAGE_FORMAT = "OGIMAGEFORMAT" )
const ( // see https://cloud.google.com/bigtable/docs/using-filters#timestamp-range TIMESTAMP_GBT_SCALE = 1000 // tests showed it's possible to have 36900+ subcalls per tx, but very unlikely - save a bit TIMESTAMP_TRACE_SCALE = 1 << 15 // 30m gas / 21.000 gas per transfer = 1428 TIMESTAMP_TX_SCALE = 1 << 11 // 64 - (10 bits for TIMESTAMP_GBT_SCALE + TIMESTAMP_TRACE_SCALE + TIMESTAMP_TX_SCALE) // = 28 bits left; with a block time of 12s, that's enough for 50+ years TIMESTAMP_BLOCK_SCALE = 1 << (64 - (10 + 15 + 11)) )
const BlsChangeQueryLimit = 10000
const DefaultInfScrollRows = 25
const (
ECR20TokensPerAddressLimit = uint64(200) // when changing this, you will have to update the swagger docu for func ApiEth1Address too
)
const MaxSqlInteger = 2147483647
const WithdrawalsQueryLimit = 10000
Variables ¶
var ( ERC20TOPIC []byte ERC721TOPIC []byte ERC1155Topic []byte )
var ( GASNOW_RAPID_COLUMN = "RAPI" GASNOW_FAST_COLUMN = "FAST" GASNOW_STANDARD_COLUMN = "STAN" GASNOW_SLOW_COLUMN = "SLOW" )
var DBPGX *pgxpool.Conn
var EmbedMigrations embed.FS
var ErrBlockNotFound = errors.New("block not found")
var ErrNoStats = errors.New("no stats available")
var FrontendReaderDB *sqlx.DB
FrontendWriterDB is a pointer to the auth-database
var FrontendWriterDB *sqlx.DB
var ReaderDb *sqlx.DB
var WriterDb *sqlx.DB
DB is a pointer to the explorer-database
var ZERO_ADDRESS []byte = []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
Functions ¶
func AddAuthorizeCode ¶
AddAuthorizeCode registers a code that can be used in exchange for an access token
func AddSubscription ¶
func AddSubscription(userID uint64, network string, eventName types.EventName, eventFilter string, eventThreshold float64) error
AddSubscription adds a new subscription to the database.
func AddSubscriptionBatch ¶
func AddSubscriptionBatch(userID uint64, network string, eventName types.EventName, eventFilter []string, eventThreshold float64) error
AddSubscription adds a new subscription to the database.
func AddToWatchlist ¶
func AddToWatchlist(watchlist []WatchlistEntry, network string) error
func ApplyEmbeddedDbSchema ¶
func CheckIfDayIsFinalized ¶
func CountSentMail ¶
CountSentMail increases the count of sent mails in the table `mails_sent` for this day.
func CreateAPIKey ¶
CreateAPIKey creates an API key for the user and saves it to the database
func DeleteAllSubscription ¶
func DeleteSubscription ¶
func DeleteSubscription(userID uint64, network string, eventName types.EventName, eventFilter string) error
DeleteSubscription removes a subscription from the database.
func DeleteSubscriptionBatch ¶
func DeleteUserByEmail ¶
DeleteUserByEmail deletes a user.
func GatherStatisticsForDay ¶
func GatherStatisticsForDay(day int64) ([]*types.ValidatorStatsTableDbRow, error)
func GetActiveValidatorCount ¶
GetActiveValidatorCount will return the total-validator-count
func GetAdConfigurations ¶
get all ad configurations
func GetAdConfigurationsForTemplate ¶
get the ad configuration for a specific template that are active
func GetAddressForEnsName ¶
func GetAddressWithdrawalTableData ¶
func GetAddressWithdrawalTableData(address []byte, pageToken string, currency string) (*types.DataTableResponse, error)
GetAddressWithdrawalTableData returns the withdrawal data for an address
func GetAddressWithdrawalsTotal ¶
GetAddressWithdrawalsTotal returns the total withdrawals for an address
func GetAllAppSubscriptions ¶
func GetAllAppSubscriptions() ([]*types.PremiumData, error)
func GetAppDataFromRedirectUri ¶
func GetAppDataFromRedirectUri(callback string) (*types.OAuthAppData, error)
GetAppNameFromRedirectUri receives an oauth redirect_url and returns the registered app name, if exists
func GetAppSubscriptionCount ¶
func GetBLSChangeCount ¶
func GetBLSChanges ¶
func GetBlockNumber ¶
func GetBlockStatus ¶
func GetByRefreshToken ¶
func GetByRefreshToken(claimUserID, claimAppID, claimDeviceID uint64, hashedRefreshToken string) (uint64, error)
GetByRefreshToken basically used to confirm the claimed user id with the refresh token. Returns the userId if successful
func GetCurrentDayClIncome ¶
func GetDashboardWithdrawals ¶
func GetDataTablesState ¶
func GetDataTablesState(user uint64, key string) (*types.DataTableSaveState, error)
GetDataTablesState retrieves the state for a given user and table
func GetEnsExpiration ¶
func GetEnsNameForAddress ¶
func GetEnsNamesForAddress ¶
func GetEpochWithdrawals ¶
func GetEpochWithdrawals(epoch uint64) ([]*types.WithdrawalsNotification, error)
func GetEth2Deposits ¶
func GetExplorerConfigurations ¶
func GetExplorerConfigurations() ([]*types.ExplorerConfig, error)
get all explorer configurations
func GetFirstActivationEpoch ¶
func GetHistoricalPrice ¶
func GetLastWithdrawalEpoch ¶
func GetLatestEpoch ¶
GetLatestEpoch will return the latest epoch from the database
func GetLatestFinalizedEpoch ¶
Get latest finalized epoch
func GetMailsSentCount ¶
GetMailsSentCount returns the number of sent mails for the day of the passed time.
func GetMissedSlots ¶
func GetNodeJobValidatorInfos ¶
func GetNodeJobValidatorInfos(job *types.NodeJob) ([]types.NodeJobValidatorInfo, error)
func GetOrphanedSlots ¶
func GetPendingValidatorCount ¶
GetPendingValidatorCount queries the pending validators currently in the queue
func GetRelayDataForIndexedBlocks ¶
func GetRelayDataForIndexedBlocks(blocks []*types.Eth1BlockIndexed) (map[common.Hash]types.RelaysData, error)
func GetSlashingCount ¶
func GetSlotVizData ¶
func GetSlotVizData(latestEpoch uint64) ([]*types.SlotVizEpochs, error)
func GetSlotWithdrawals ¶
func GetSlotWithdrawals(slot uint64) ([]*types.Withdrawals, error)
func GetSubsForEventFilter ¶
func GetSubscriptions ¶
func GetSubscriptions(filter GetSubscriptionsFilter) ([]*types.Subscription, error)
GetSubscriptions returns the subscriptions filtered by the provided filter.
func GetSyncParticipationBySlotRange ¶
Returns the participation rate for every slot between startSlot and endSlot (both inclusive) as a map with the slot as key
If a slot is missed, the map will not contain an entry for it
func GetTaggedValidators ¶
func GetTaggedValidators(filter WatchlistFilter) ([]*types.TaggedValidators, error)
GetTaggedValidators returns validators that were tagged by a user
func GetTotalAmountDeposited ¶
func GetTotalAmountWithdrawn ¶
func GetTotalBLSChanges ¶
func GetTotalEligibleEther ¶
func GetTotalValidatorsCount ¶
GetTotalValidatorsCount will return the total-validator-count
func GetTotalWithdrawals ¶
func GetUserAPIKeyStatistics ¶
func GetUserAPIKeyStatistics(apikey *string) (*types.ApiStatistics, error)
func GetUserApiKeyById ¶
func GetUserAuthDataByAuthorizationCode ¶
func GetUserAuthDataByAuthorizationCode(code string) (*types.OAuthCodeData, error)
GetUserAuthDataByAuthorizationCode checks an oauth code for validity, consumes the code and returns the userId on success
func GetUserDevicesByUserID ¶
func GetUserDevicesByUserID(userID uint64) ([]types.PairedDevice, error)
func GetUserEmailById ¶
GetUserEmailById returns the email of a user.
func GetUserEmailsByIds ¶
GetUserEmailsByIds returns the emails of users.
func GetUserIdByApiKey ¶
func GetUserIdByApiKey(apiKey string) (*types.UserWithPremium, error)
func GetUserPremiumSubscription ¶
func GetUserPremiumSubscription(id uint64) (types.UserPremiumSubscription, error)
func GetValidatorAttestationHistoryForNotifications ¶
func GetValidatorAttestationHistoryForNotifications(startEpoch uint64, endEpoch uint64) (map[types.Epoch]map[types.ValidatorIndex]bool, error)
Should be used when retrieving data for a very large amount of validators (for the notifications process)
func GetValidatorBLSChange ¶
func GetValidatorDeposits ¶
func GetValidatorDeposits(publicKey []byte) (*types.ValidatorDeposits, error)
GetValidatorDeposits will return eth1- and eth2-deposits for a public key from the database
func GetValidatorIncomePerformance ¶
func GetValidatorIncomePerformance(validators []uint64, incomePerformance *types.ValidatorIncomePerformance) error
GetValidatorIncomePerformance gets all rewards of a validator in WEI for 1d, 7d, 365d and total
func GetValidatorIndex ¶
GetValidatorIndex will return the validator-index for a public key from the database
func GetValidatorIndices ¶
GetValidatorIndices will return the total-validator-indices
func GetValidatorNames ¶
func GetValidatorPropsosals ¶
func GetValidatorPropsosals(validators []uint64, proposals *[]types.ValidatorProposalInfo) error
func GetValidatorPublicKeys ¶
GetValidatorPublicKeys will return the public key for a list of validator indices and or public keys
func GetValidatorWithdrawals ¶
func GetValidatorsBLSChange ¶
func GetValidatorsBLSChange(validators []uint64) ([]*types.ValidatorsBLSChange, error)
GetValidatorsBLSChange returns the BLS change for a list of validators
func GetValidatorsGotSlashed ¶
func GetValidatorsGotSlashed(epoch uint64) ([]struct { Epoch uint64 `db:"epoch"` SlasherIndex uint64 `db:"slasher"` SlasherPubkey string `db:"slasher_pubkey"` SlashedValidatorIndex uint64 `db:"slashedvalidator"` SlashedValidatorPubkey []byte `db:"slashedvalidator_pubkey"` Reason string `db:"reason"` }, error)
GetValidatorsGotSlashed returns the validators that got slashed after `epoch` either by an attestation violation or a proposer violation
func GetWithdrawals ¶
func InitBigtableSchema ¶
func InitBigtableSchema() error
func InsertAdConfigurations ¶
insert new ad configuration
func InsertUserDevice ¶
func InsertUserDevice(userID uint64, hashedRefreshToken string, name string, appID uint64) (uint64, error)
InsertUserDevice Insert user device and return device id
func MobileDeviceDelete ¶
func MustInitDB ¶
func MustInitDB(writer *types.DatabaseConfig, reader *types.DatabaseConfig, driverName string, databaseBrand string)
func MustInitFrontendDB ¶
func MustInitFrontendDB(writer *types.DatabaseConfig, reader *types.DatabaseConfig, driverName string, databaseBrand string)
func NewTransaction ¶
func RemoveFromWatchlist ¶
RemoveFromWatchlist removes a validator for a given user from the users_validators_tag table It also deletes any subscriptions for that bookmarked validator
func SaveChartSeriesPoint ¶
func SaveDataTableState ¶
func SaveDataTableState(user uint64, key string, state types.DataTableSaveState) error
SaveDataTableState saves the state of the current datatable state update
func SaveExplorerConfiguration ¶
func SaveExplorerConfiguration(configs []types.ExplorerConfig) error
save current configurations
func SaveValidatorQueue ¶
func SaveValidatorQueue(validators *types.ValidatorQueue, tx *sqlx.Tx) error
SaveValidatorQueue will save the validator queue into the database
func SaveValidators ¶
func SetBlockStatus ¶
func SetBlockStatus(blocks []*types.CanonBlock) error
func StripeCreateSubscription ¶
func StripeCreateSubscription(tx *sql.Tx, customerID, priceID, subscriptionID string, payload json.RawMessage) error
StripeCreateSubscription inserts a new subscription
func StripeGetCustomerEmail ¶
StripeGetCustomerEmail returns a customers email given their customerID
func StripeGetCustomerUserId ¶
func StripeGetSubscription ¶
func StripeGetSubscription(id string) (*types.StripeSubscription, error)
StripeGetSubscription returns a subscription given a subscription_id
func StripeGetUserSubscription ¶
func StripeGetUserSubscription(id uint64, purchaseGroup string) (types.UserSubscription, error)
StripeGetUserAPISubscription returns a users current subscription
func StripeGetUserSubscriptions ¶
func StripeGetUserSubscriptions(id uint64, purchaseGroup string) ([]types.UserSubscription, error)
StripeGetUserAPISubscriptions returns a users current subscriptions
func StripeRemoveCustomer ¶
StripeRemoveCustomer removes the stripe customer and sets all subscriptions to inactive
func StripeUpdateCustomerID ¶
StripeUpdateCustomerID adds a stripe customer id to a user. It checks if the user already has a stripe customer id.
func StripeUpdateSubscription ¶
func StripeUpdateSubscription(tx *sql.Tx, priceID, subscriptionID string, payload json.RawMessage) error
StripeUpdateSubscription inserts a new subscription
func StripeUpdateSubscriptionStatus ¶
func StripeUpdateSubscriptionStatus(tx *sql.Tx, id string, status bool, payload *json.RawMessage) error
StripeUpdateSubscriptionStatus sets the status of a subscription
func SubmitBLSToExecutionChangesNodeJobs ¶
func SubmitBLSToExecutionChangesNodeJobs() error
func SubmitNodeJobs ¶
func SubmitNodeJobs() error
func SubmitVoluntaryExitNodeJobs ¶
func SubmitVoluntaryExitNodeJobs() error
func UpdateAdConfiguration ¶
update exisiting ad configuration
func UpdateBLSToExecutionChangesNodeJobs ¶
func UpdateBLSToExecutionChangesNodeJobs() error
func UpdateCanonicalBlocks ¶
func UpdateCanonicalBlocks(startEpoch, endEpoch uint64, blocks []*types.MinimalBlock) error
UpdateCanonicalBlocks will update the blocks for an epoch range in the database
func UpdateEpochStatus ¶
func UpdateEpochStatus(stats *types.ValidatorParticipation, tx *sqlx.Tx) error
UpdateEpochStatus will update the epoch status in the database
func UpdateNodeJobs ¶
func UpdateNodeJobs() error
func UpdatePassword ¶
UpdatePassword updates the password of a user.
func UpdateQueueDeposits ¶
func UpdateSubscriptionLastSent ¶
UpdateSubscriptionLastSent updates `last_sent_ts` column of the `users_subscriptions` table.
func UpdateSubscriptionsLastSent ¶
func UpdateSubscriptionsLastSent(subscriptionIDs []uint64, sent time.Time, epoch uint64, useDB *sqlx.DB) error
UpdateSubscriptionsLastSent updates `last_sent_ts` column of the `users_subscriptions` table.
func UpdateUserSubscription ¶
func UpdateVoluntaryExitNodeJobs ¶
func UpdateVoluntaryExitNodeJobs() error
func WriteChartSeriesForDay ¶
Types ¶
type Bigtable ¶
type Bigtable struct { LastAttestationCache map[uint64]uint64 LastAttestationCacheMux *sync.Mutex // contains filtered or unexported fields }
var BigtableClient *Bigtable
func InitBigtable ¶
func (*Bigtable) CheckForGapsInBlocksTable ¶
func (*Bigtable) CheckForGapsInDataTable ¶
func (*Bigtable) ClearByPrefix ¶
func (*Bigtable) DeleteBlock ¶
Deletes all block data from bigtable
func (*Bigtable) DeleteEpoch ¶
Deletes all block data from bigtable
func (*Bigtable) GetAddressBlobTableData ¶
func (*Bigtable) GetAddressBlocksMinedTableData ¶
func (*Bigtable) GetAddressContractInteractionsAt ¶
func (bigtable *Bigtable) GetAddressContractInteractionsAt(requests []contractInteractionAtRequest) ([]types.ContractInteractionType, error)
returns account state after the given execution state -1 is latest (e.g. "txIdx" = -1 returns the contract state after execution of "block", "block" = -1 returns the state at chain head)
func (*Bigtable) GetAddressContractInteractionsAtBlock ¶
func (bigtable *Bigtable) GetAddressContractInteractionsAtBlock(block *types.Eth1Block) ([]types.ContractInteractionType, error)
convenience function to get contract interaction status per transaction of a block
func (*Bigtable) GetAddressContractInteractionsAtITransactions ¶
func (bigtable *Bigtable) GetAddressContractInteractionsAtITransactions(itransactions []*types.Eth1InternalTransactionIndexed, idxs [][2]int64) ([][2]types.ContractInteractionType, error)
convenience function to get contract interaction status per subtransaction of a transaction 2nd parameter specifies [tx_idx, trace_idx] for each internal tx
func (*Bigtable) GetAddressContractInteractionsAtParityTraces ¶
func (bigtable *Bigtable) GetAddressContractInteractionsAtParityTraces(traces []*rpc.ParityTraceResult) ([][2]types.ContractInteractionType, error)
convenience function to get contract interaction status per parity trace
func (*Bigtable) GetAddressContractInteractionsAtTransactions ¶
func (bigtable *Bigtable) GetAddressContractInteractionsAtTransactions(transactions []*types.Eth1TransactionIndexed, idxs []int64) ([]types.ContractInteractionType, error)
convenience function to get contract interaction status per transaction
func (*Bigtable) GetAddressErc1155TableData ¶
func (*Bigtable) GetAddressErc20TableData ¶
func (*Bigtable) GetAddressErc721TableData ¶
func (*Bigtable) GetAddressInternalTableData ¶
func (*Bigtable) GetAddressLabel ¶
func (bigtable *Bigtable) GetAddressLabel(id string, invoke_overwrite types.ContractInteractionType) string
get a method label for its byte signature with defaults
func (*Bigtable) GetAddressName ¶
func (*Bigtable) GetAddressNames ¶
func (*Bigtable) GetAddressTransactionsTableData ¶
func (*Bigtable) GetAddressUnclesMinedTableData ¶
func (*Bigtable) GetAddressesNamesArMetadata ¶
func (*Bigtable) GetAggregatedValidatorIncomeDetailsHistory ¶
func (bigtable *Bigtable) GetAggregatedValidatorIncomeDetailsHistory(validators []uint64, startEpoch uint64, endEpoch uint64) (map[uint64]*itypes.ValidatorEpochIncome, error)
GetAggregatedValidatorIncomeDetailsHistory returns aggregated validator income details startEpoch & endEpoch are inclusive
func (*Bigtable) GetArbitraryTokenTransfersForTransaction ¶
func (bigtable *Bigtable) GetArbitraryTokenTransfersForTransaction(transaction []byte) ([]*types.Transfer, error)
currently only erc20
func (*Bigtable) GetBalanceForAddress ¶
func (*Bigtable) GetBlockFromBlocksTable ¶
func (*Bigtable) GetBlockKeys ¶
func (*Bigtable) GetBlocksDescending ¶
func (bigtable *Bigtable) GetBlocksDescending(start, limit uint64) ([]*types.Eth1BlockIndexed, error)
GetBlocksDescending gets a given amount of Eth1BlockIndexed starting at block start from tableData
start: highest block number to be returned limit: amount of blocks to be returned - if limit > start + 1, limit will be set to start + 1 - if limit = start + 1, block 0 will be included as last block (special handling for broken padding is implemented) - if limit = start, block 0 will of course not be included
func (*Bigtable) GetBlocksIndexedMultiple ¶
func (*Bigtable) GetClient ¶
func (bigtable *Bigtable) GetClient() *gcp_bigtable.Client
func (*Bigtable) GetContractMetadata ¶
func (bigtable *Bigtable) GetContractMetadata(address []byte) (*types.ContractMetadata, error)
func (*Bigtable) GetERC20MetadataForAddress ¶
func (bigtable *Bigtable) GetERC20MetadataForAddress(address []byte) (*types.ERC20Metadata, error)
func (*Bigtable) GetEth1BlocksForAddress ¶
func (*Bigtable) GetEth1BtxForAddress ¶
func (*Bigtable) GetEth1ERC1155ForAddress ¶
func (*Bigtable) GetEth1ERC20ForAddress ¶
func (*Bigtable) GetEth1ERC721ForAddress ¶
func (*Bigtable) GetEth1ItxsForAddress ¶
func (*Bigtable) GetEth1TxForToken ¶
func (*Bigtable) GetEth1TxsForAddress ¶
func (*Bigtable) GetEth1UnclesForAddress ¶
func (*Bigtable) GetEventLabel ¶
get an event label for its byte signature with defaults
func (*Bigtable) GetFullBlocksDescending ¶
func (bigtable *Bigtable) GetFullBlocksDescending(stream chan<- *types.Eth1Block, high, low uint64) error
GetFullBlocksDescending streams blocks ranging from high to low (both borders are inclusive) in the correct descending order via a channel.
Special handling for block 0 is implemented.
- stream: channel the function will use for streaming
- high: highest (max) block number
- low: lowest (min) block number
func (*Bigtable) GetGasNowHistory ¶
func (*Bigtable) GetIndexedEth1Transaction ¶
func (bigtable *Bigtable) GetIndexedEth1Transaction(txHash []byte) (*types.Eth1TransactionIndexed, error)
func (*Bigtable) GetInternalTransfersForTransaction ¶
func (bigtable *Bigtable) GetInternalTransfersForTransaction(transaction []byte, from []byte, parityTrace []*rpc.ParityTraceResult, currency string) ([]types.ITransaction, error)
func (*Bigtable) GetLastAttestationSlots ¶
func (*Bigtable) GetLastBlockInBlocksTable ¶
func (*Bigtable) GetLastBlockInDataTable ¶
func (Bigtable) GetMachineMetricsForNotifications ¶
func (bigtable Bigtable) GetMachineMetricsForNotifications(rowKeys gcp_bigtable.RowList) (map[uint64]map[string]*types.MachineMetricSystemUser, error)
Returns a map[userID]map[machineName]machineData machineData contains the latest machine data in CurrentData and 5 minute old data in fiveMinuteOldData (defined in limit) as well as the insert timestamps of both
func (Bigtable) GetMachineMetricsMachineCount ¶
func (Bigtable) GetMachineMetricsMachineNames ¶
func (Bigtable) GetMachineMetricsNode ¶
func (Bigtable) GetMachineMetricsSystem ¶
func (Bigtable) GetMachineMetricsValidator ¶
func (Bigtable) GetMachineRowKey ¶
func (*Bigtable) GetMaxValidatorindexForEpoch ¶
GetMaxValidatorindexForEpoch returns the higest validatorindex with a balance at that epoch
func (*Bigtable) GetMetadata ¶
func (*Bigtable) GetMetadataForAddress ¶
func (*Bigtable) GetMetadataUpdates ¶
func (*Bigtable) GetMethodLabel ¶
func (bigtable *Bigtable) GetMethodLabel(data []byte, interaction types.ContractInteractionType) string
get a method label for its byte signature with defaults
func (*Bigtable) GetMostRecentBlockFromDataTable ¶
func (bigtable *Bigtable) GetMostRecentBlockFromDataTable() (*types.Eth1BlockIndexed, error)
func (*Bigtable) GetRowsByPrefix ¶
func (*Bigtable) GetSignature ¶
get a signature by it's hex representation
func (*Bigtable) GetSignatureImportStatus ¶
func (bigtable *Bigtable) GetSignatureImportStatus(st types.SignatureType) (*types.SignatureImportStatus, error)
Get the status of the last signature import run
func (*Bigtable) GetTokenTransactionsTableData ¶
func (*Bigtable) GetTotalValidatorIncomeDetailsHistory ¶
func (bigtable *Bigtable) GetTotalValidatorIncomeDetailsHistory(startEpoch uint64, endEpoch uint64) (map[uint64]*itypes.ValidatorEpochIncome, error)
GetTotalValidatorIncomeDetailsHistory returns the total validator income for a given range of epochs It is considerably faster than fetching the individual income for each validator and aggregating it startEpoch & endEpoch are inclusive
func (*Bigtable) GetValidatorAttestationHistory ¶
func (*Bigtable) GetValidatorBalanceHistory ¶
func (*Bigtable) GetValidatorBalanceStatistics ¶
func (*Bigtable) GetValidatorEffectiveness ¶
func (bigtable *Bigtable) GetValidatorEffectiveness(validators []uint64, epoch uint64) ([]*types.ValidatorEffectiveness, error)
returns the validator attestation effectiveness in %
func (*Bigtable) GetValidatorIncomeDetailsHistory ¶
func (bigtable *Bigtable) GetValidatorIncomeDetailsHistory(validators []uint64, startEpoch uint64, endEpoch uint64) (map[uint64]map[uint64]*itypes.ValidatorEpochIncome, error)
GetValidatorIncomeDetailsHistory returns the validator income details startEpoch & endEpoch are inclusive
func (*Bigtable) GetValidatorMissedAttestationHistory ¶
func (*Bigtable) GetValidatorMissedAttestationsCount ¶
func (*Bigtable) GetValidatorProposalHistory ¶
func (*Bigtable) GetValidatorSyncDutiesHistory ¶
func (bigtable *Bigtable) GetValidatorSyncDutiesHistory(validators []uint64, startSlot uint64, endSlot uint64) (map[uint64]map[uint64]*types.ValidatorSyncParticipation, error)
GetValidatorSyncDutiesHistory returns the sync participation status for the given validators ranging from startSlot to endSlot (both inclusive)
The returned map uses the following keys: [validatorIndex][slot]
The function is able to handle both V1 and V2 schema based on the configured v2SchemaCutOffEpoch
func (*Bigtable) GetValidatorSyncDutiesStatistics ¶
func (*Bigtable) ImportEnsUpdates ¶
func (*Bigtable) IndexEventsWithTransformers ¶
func (*Bigtable) MigrateIncomeDataV1V2Schema ¶
func (*Bigtable) SaveAddressName ¶
func (*Bigtable) SaveAttestationDuties ¶
func (*Bigtable) SaveBalances ¶
func (bigtable *Bigtable) SaveBalances(balances []*types.Eth1AddressBalance, deleteKeys []string) error
func (*Bigtable) SaveBlockKeys ¶
func (*Bigtable) SaveContractMetadata ¶
func (bigtable *Bigtable) SaveContractMetadata(address []byte, metadata *types.ContractMetadata) error
func (*Bigtable) SaveERC20Metadata ¶
func (bigtable *Bigtable) SaveERC20Metadata(address []byte, metadata *types.ERC20Metadata) error
func (*Bigtable) SaveERC20TokenPrices ¶
func (bigtable *Bigtable) SaveERC20TokenPrices(prices []*types.ERC20TokenPrice) error
func (*Bigtable) SaveGasNowHistory ¶
func (*Bigtable) SaveMachineMetric ¶
func (*Bigtable) SaveProposalAssignments ¶
func (*Bigtable) SaveSignatureImportStatus ¶
func (bigtable *Bigtable) SaveSignatureImportStatus(status types.SignatureImportStatus, st types.SignatureType) error
Save the status of the last signature import run
func (*Bigtable) SaveSignatures ¶
func (bigtable *Bigtable) SaveSignatures(signatures []types.Signature, st types.SignatureType) error
Save a list of signatures
func (*Bigtable) SaveSyncComitteeDuties ¶
func (*Bigtable) SaveValidatorBalances ¶
func (*Bigtable) SaveValidatorIncomeDetails ¶
func (*Bigtable) SearchForAddress ¶
func (*Bigtable) SetLastAttestationSlot ¶
func (bigtable *Bigtable) SetLastAttestationSlot(validator uint64, lastAttestationSlot uint64) error
This method is only to be used for migrating the last attestation slot to bigtable and should not be used for any other purpose
func (*Bigtable) SetLastBlockInBlocksTable ¶
func (*Bigtable) SetLastBlockInDataTable ¶
func (*Bigtable) TransformBlobTx ¶
func (bigtable *Bigtable) TransformBlobTx(blk *types.Eth1Block, cache *freecache.Cache) (bulkData *types.BulkMutations, bulkMetadataUpdates *types.BulkMutations, err error)
TransformBlobTx extracts transactions from bigtable more specifically from the table blocks.
func (*Bigtable) TransformBlock ¶
func (bigtable *Bigtable) TransformBlock(block *types.Eth1Block, cache *freecache.Cache) (bulkData *types.BulkMutations, bulkMetadataUpdates *types.BulkMutations, err error)
TransformBlock extracts blocks from bigtable more specifically from the table blocks. It transforms the block and strips any information that is not necessary for a blocks view It writes blocks to table data: Row: <chainID>:B:<reversePaddedBlockNumber> Family: f Column: data Cell: Proto<Eth1BlockIndexed>
It indexes blocks by: Row: <chainID>:I:B:<Miner>:<reversePaddedBlockNumber> Family: f Column: <chainID>:B:<reversePaddedBlockNumber> Cell: nil
func (*Bigtable) TransformContract ¶
func (bigtable *Bigtable) TransformContract(blk *types.Eth1Block, cache *freecache.Cache) (bulkData *types.BulkMutations, bulkMetadataUpdates *types.BulkMutations, err error)
func (*Bigtable) TransformERC1155 ¶
func (bigtable *Bigtable) TransformERC1155(blk *types.Eth1Block, cache *freecache.Cache) (bulkData *types.BulkMutations, bulkMetadataUpdates *types.BulkMutations, err error)
TransformERC1155 accepts an eth1 block and creates bigtable mutations for erc1155 transfer events. Example: https://etherscan.io/tx/0xcffdd4b44ba9361a769a559c360293333d09efffeab79c36125bb4b20bd04270#eventlog It transforms the logs contained within a block and writes the transformed logs to bigtable It writes erc1155 events to the table data: Row: <chainID>:ERC1155:<txHash>:<paddedLogIndex> Family: f Column: data Cell: Proto<Eth1ERC1155Indexed> Example scan: "1:ERC1155:cffdd4b44ba9361a769a559c360293333d09efffeab79c36125bb4b20bd04270" returns mainnet erc1155 event(s) for transaction 0xcffdd4b44ba9361a769a559c360293333d09efffeab79c36125bb4b20bd04270
It indexes erc1155 events by: Row: <chainID>:I:ERC1155:<FROM_ADDRESS>:TIME:<reversePaddedBigtableTimestamp>:<paddedTxIndex>:<PaddedLogIndex> Family: f Column: <chainID>:ERC1155:<txHash>:<paddedLogIndex> Cell: nil
Row: <chainID>:I:ERC1155:<TO_ADDRESS>:TIME:<reversePaddedBigtableTimestamp>:<paddedTxIndex>:<PaddedLogIndex> Family: f Column: <chainID>:ERC1155:<txHash>:<paddedLogIndex> Cell: nil
Row: <chainID>:I:ERC1155:<TOKEN_ADDRESS>:TIME:<reversePaddedBigtableTimestamp>:<paddedTxIndex>:<PaddedLogIndex> Family: f Column: <chainID>:ERC1155:<txHash>:<paddedLogIndex> Cell: nil
Row: <chainID>:I:ERC1155:<TO_ADDRESS>:TO:<FROM_ADDRESS>:<reversePaddedBigtableTimestamp>:<paddedTxIndex>:<PaddedLogIndex> Family: f Column: <chainID>:ERC1155:<txHash>:<paddedLogIndex> Cell: nil
Row: <chainID>:I:ERC1155:<FROM_ADDRESS>:FROM:<TO_ADDRESS>:<reversePaddedBigtableTimestamp>:<paddedTxIndex>:<PaddedLogIndex> Family: f Column: <chainID>:ERC1155:<txHash>:<paddedLogIndex> Cell: nil
Row: <chainID>:I:ERC1155:<FROM_ADDRESS>:TOKEN_SENT:<TOKEN_ADDRESS>:<reversePaddedBigtableTimestamp>:<paddedTxIndex>:<PaddedLogIndex> Family: f Column: <chainID>:ERC1155:<txHash>:<paddedLogIndex> Cell: nil
Row: <chainID>:I:ERC1155:<TO_ADDRESS>:TOKEN_RECEIVED:<TOKEN_ADDRESS>:<reversePaddedBigtableTimestamp>:<paddedTxIndex>:<PaddedLogIndex> Family: f Column: <chainID>:ERC1155:<txHash>:<paddedLogIndex> Cell: nil
func (*Bigtable) TransformERC20 ¶
func (bigtable *Bigtable) TransformERC20(blk *types.Eth1Block, cache *freecache.Cache) (bulkData *types.BulkMutations, bulkMetadataUpdates *types.BulkMutations, err error)
https://etherscan.io/tx/0xb10588bde42cb8eb14e72d24088bd71ad3903857d23d50b3ba4187c0cb7d3646#eventlog TransformERC20 accepts an eth1 block and creates bigtable mutations for ERC20 transfer events. It transforms the logs contained within a block and writes the transformed logs to bigtable It writes ERC20 events to the table data: Row: <chainID>:ERC20:<txHash>:<paddedLogIndex> Family: f Column: data Cell: Proto<Eth1ERC20Indexed> Example scan: "1:ERC20:b10588bde42cb8eb14e72d24088bd71ad3903857d23d50b3ba4187c0cb7d3646" returns mainnet ERC20 event(s) for transaction 0xb10588bde42cb8eb14e72d24088bd71ad3903857d23d50b3ba4187c0cb7d3646
It indexes ERC20 events by: Row: <chainID>:I:ERC20:<TOKEN_ADDRESS>:TIME:<reversePaddedBigtableTimestamp>:<paddedTxIndex>:<PaddedLogIndex> Family: f Column: <chainID>:ERC20:<txHash>:<paddedLogIndex> Cell: nil
Row: <chainID>:I:ERC20:<FROM_ADDRESS>:TIME:<reversePaddedBigtableTimestamp>:<paddedTxIndex>:<PaddedLogIndex> Family: f Column: <chainID>:ERC20:<txHash>:<paddedLogIndex> Cell: nil
Row: <chainID>:I:ERC20:<TO_ADDRESS>:TIME:<reversePaddedBigtableTimestamp>:<paddedTxIndex>:<PaddedLogIndex> Family: f Column: <chainID>:ERC20:<txHash>:<paddedLogIndex> Cell: nil
Row: <chainID>:I:ERC20:<FROM_ADDRESS>:TO:<TO_ADDRESS>:<reversePaddedBigtableTimestamp>:<paddedTxIndex>:<PaddedLogIndex> Family: f Column: <chainID>:ERC20:<txHash>:<paddedLogIndex> Cell: nil
Row: <chainID>:I:ERC20:<TO_ADDRESS>:FROM:<FROM_ADDRESS>:<reversePaddedBigtableTimestamp>:<paddedTxIndex>:<PaddedLogIndex> Family: f Column: <chainID>:ERC20:<txHash>:<paddedLogIndex> Cell: nil
Row: <chainID>:I:ERC20:<FROM_ADDRESS>:TOKEN_SENT:<TOKEN_ADDRESS>:<reversePaddedBigtableTimestamp>:<paddedTxIndex>:<PaddedLogIndex> Family: f Column: <chainID>:ERC20:<txHash>:<paddedLogIndex> Cell: nil
Row: <chainID>:I:ERC20:<TO_ADDRESS>:TOKEN_RECEIVED:<TOKEN_ADDRESS>:<reversePaddedBigtableTimestamp>:<paddedTxIndex>:<PaddedLogIndex> Family: f Column: <chainID>:ERC20:<txHash>:<paddedLogIndex> Cell: nil
func (*Bigtable) TransformERC721 ¶
func (bigtable *Bigtable) TransformERC721(blk *types.Eth1Block, cache *freecache.Cache) (bulkData *types.BulkMutations, bulkMetadataUpdates *types.BulkMutations, err error)
example: https://etherscan.io/tx/0x4d3a6c56cecb40637c070601c275df9cc7b599b5dc1d5ac2473c92c7a9e62c64#eventlog TransformERC721 accepts an eth1 block and creates bigtable mutations for erc721 transfer events. It transforms the logs contained within a block and writes the transformed logs to bigtable It writes erc721 events to the table data: Row: <chainID>:ERC721:<txHash>:<paddedLogIndex> Family: f Column: data Cell: Proto<Eth1ERC721Indexed> Example scan: "1:ERC721:4d3a6c56cecb40637c070601c275df9cc7b599b5dc1d5ac2473c92c7a9e62c64" returns mainnet ERC721 event(s) for transaction 0x4d3a6c56cecb40637c070601c275df9cc7b599b5dc1d5ac2473c92c7a9e62c64
It indexes ERC721 events by: Row: <chainID>:I:ERC721:<FROM_ADDRESS>:TIME:<reversePaddedBigtableTimestamp>:<paddedTxIndex>:<PaddedLogIndex> Family: f Column: <chainID>:ERC721:<txHash>:<paddedLogIndex> Cell: nil
Row: <chainID>:I:ERC721:<TO_ADDRESS>:TIME:<reversePaddedBigtableTimestamp>:<paddedTxIndex>:<PaddedLogIndex> Family: f Column: <chainID>:ERC721:<txHash>:<paddedLogIndex> Cell: nil
Row: <chainID>:I:ERC721:<TOKEN_ADDRESS>:TIME:<reversePaddedBigtableTimestamp>:<paddedTxIndex>:<PaddedLogIndex> Family: f Column: <chainID>:ERC721:<txHash>:<paddedLogIndex> Cell: nil
Row: <chainID>:I:ERC721:<FROM_ADDRESS>:TO:<TO_ADDRESS>:<reversePaddedBigtableTimestamp>:<paddedTxIndex>:<PaddedLogIndex> Family: f Column: <chainID>:ERC721:<txHash>:<paddedLogIndex> Cell: nil
Row: <chainID>:I:ERC721:<TO_ADDRESS>:FROM:<FROM_ADDRESS>:<reversePaddedBigtableTimestamp>:<paddedTxIndex>:<PaddedLogIndex> Family: f Column: <chainID>:ERC721:<txHash>:<paddedLogIndex> Cell: nil
Row: <chainID>:I:ERC721:<FROM_ADDRESS>:TOKEN_SENT:<TOKEN_ADDRESS>:<reversePaddedBigtableTimestamp>:<paddedTxIndex>:<PaddedLogIndex> Family: f Column: <chainID>:ERC721:<txHash>:<paddedLogIndex> Cell: nil
Row: <chainID>:I:ERC721:<TO_ADDRESS>:TOKEN_RECEIVED:<TOKEN_ADDRESS>:<reversePaddedBigtableTimestamp>:<paddedTxIndex>:<PaddedLogIndex> Family: f Column: <chainID>:ERC721:<txHash>:<paddedLogIndex> Cell: nil
func (*Bigtable) TransformEnsNameRegistered ¶
func (bigtable *Bigtable) TransformEnsNameRegistered(blk *types.Eth1Block, cache *freecache.Cache) (bulkData *types.BulkMutations, bulkMetadataUpdates *types.BulkMutations, err error)
func (*Bigtable) TransformItx ¶
func (bigtable *Bigtable) TransformItx(blk *types.Eth1Block, cache *freecache.Cache) (bulkData *types.BulkMutations, bulkMetadataUpdates *types.BulkMutations, err error)
TransformItx extracts internal transactions from bigtable more specifically from the table blocks. It transforms the internal transactions contained within a block and strips any information that is not necessary for our frontend views It writes internal transactions to table data: Row: <chainID>:ITX:<TX_HASH>:<paddedITXIndex> Family: f Column: data Cell: Proto<Eth1InternalTransactionIndexed>
It indexes internal transactions by: Row: <chainID>:I:ITX:<FROM_ADDRESS>:TIME:<reversePaddedBigtableTimestamp>:<paddedTxIndex>:<paddedITXIndex> Family: f Column: <chainID>:ITX:<HASH>:<paddedITXIndex> Cell: nil Row: <chainID>:I:ITX:<TO_ADDRESS>:TIME:<reversePaddedBigtableTimestamp>:<paddedTxIndex>:<paddedITXIndex> Family: f Column: <chainID>:ITX:<HASH>:<paddedITXIndex> Cell: nil Row: <chainID>:I:ITX:<FROM_ADDRESS>:TO:<TO_ADDRESS>:<reversePaddedBigtableTimestamp>:<paddedTxIndex>:<paddedITXIndex> Family: f Column: <chainID>:ITX:<HASH>:<paddedITXIndex> Cell: nil Row: <chainID>:I:ITX:<TO_ADDRESS>:FROM:<FROM_ADDRESS>:<reversePaddedBigtableTimestamp>:<paddedTxIndex>:<paddedITXIndex> Family: f Column: <chainID>:ITX:<HASH>:<paddedITXIndex> Cell: nil
func (*Bigtable) TransformTx ¶
func (bigtable *Bigtable) TransformTx(blk *types.Eth1Block, cache *freecache.Cache) (bulkData *types.BulkMutations, bulkMetadataUpdates *types.BulkMutations, err error)
TransformTx extracts transactions from bigtable more specifically from the table blocks.
func (*Bigtable) TransformUncle ¶
func (bigtable *Bigtable) TransformUncle(block *types.Eth1Block, cache *freecache.Cache) (bulkData *types.BulkMutations, bulkMetadataUpdates *types.BulkMutations, err error)
TransformUncle accepts an eth1 block and creates bigtable mutations. It transforms the uncles contained within a block, extracts the necessary information to create a view and writes that information to bigtable It writes uncles to table data: Row: <chainID>:U:<reversePaddedNumber> Family: f Column: data Cell: Proto<Eth1UncleIndexed> Example scan: "1:U:" returns mainnet uncles mined in desc order Example scan: "1:U:984886725" returns mainnet uncles mined after block 15113275 (1000000000 - 984886725)
It indexes uncles by: Row: <chainID>:I:U:<Miner>:TIME:<reversePaddedBigtableTimestamp> Family: f Column: <chainID>:U:<reversePaddedNumber> Cell: nil Example lookup: "1:I:U:ea674fdde714fd979de3edf0f56aa9716b898ec8:TIME:" returns mainnet uncles mined by ethermine in desc order
func (*Bigtable) TransformWithdrawals ¶
func (bigtable *Bigtable) TransformWithdrawals(block *types.Eth1Block, cache *freecache.Cache) (bulkData *types.BulkMutations, bulkMetadataUpdates *types.BulkMutations, err error)
TransformWithdrawals accepts an eth1 block and creates bigtable mutations. It transforms the withdrawals contained within a block, extracts the necessary information to create a view and writes that information to bigtable It writes uncles to table data: Row: <chainID>:W:<reversePaddedNumber>:<reversedWithdrawalIndex> Family: f Column: data Cell: Proto<Eth1WithdrawalIndexed> Example scan: "1:W:" returns withdrawals in desc order Example scan: "1:W:984886725" returns mainnet withdrawals included after block 15113275 (1000000000 - 984886725)
It indexes withdrawals by: Row: <chainID>:I:W:<Address>:TIME:<reversePaddedBigtableTimestamp> Family: f Column: <chainID>:W:<reversePaddedNumber> Cell: nil Example lookup: "1:I:W:ea674fdde714fd979de3edf0f56aa9716b898ec8:TIME:" returns withdrawals received by ethermine in desc order
func (*Bigtable) WriteBulk ¶
func (bigtable *Bigtable) WriteBulk(mutations *types.BulkMutations, table *gcp_bigtable.Table, batchSize int) error
type EnsCheckedDictionary ¶
type EnsCheckedDictionary struct {
// contains filtered or unexported fields
}
type GetAllNonFinalizedSlotsRow ¶
type GetAllNonFinalizedSlotsRow struct { Slot uint64 `db:"slot"` BlockRoot []byte `db:"blockroot"` Finalized bool `db:"finalized"` Status string `db:"status"` }
func GetAllNonFinalizedSlots ¶
func GetAllNonFinalizedSlots() ([]*GetAllNonFinalizedSlotsRow, error)
type GetSubscriptionsFilter ¶
type GetSubscriptionsFilter struct { EventNames *[]types.EventName UserIDs *[]uint64 EventFilters *[]string Search string Limit uint64 Offset uint64 JoinValidator bool }
GetSubscriptionsFilter can be passed to GetSubscriptions() to filter subscriptions.
type IndexFilter ¶
type IndexFilter string
const ( FILTER_TIME IndexFilter = "TIME" FILTER_TO IndexFilter = "TO" FILTER_FROM IndexFilter = "FROM" FILTER_TOKEN_RECEIVED IndexFilter = "TOKEN_RECEIVED" FILTER_TOKEN_SENT IndexFilter = "TOKEN_SENT" FILTER_METHOD IndexFilter = "METHOD" FILTER_CONTRACT IndexFilter = "CONTRACT" FILTER_ERROR IndexFilter = "ERROR" )
type PremiumResult ¶
func GetUserPremiumPackage ¶
func GetUserPremiumPackage(userID uint64) (PremiumResult, error)
type SortByIndexes ¶
type SortByIndexes IndexKeys
func (SortByIndexes) Len ¶
func (sbi SortByIndexes) Len() int
func (SortByIndexes) Less ¶
func (sbi SortByIndexes) Less(i, j int) bool
func (SortByIndexes) Swap ¶
func (sbi SortByIndexes) Swap(i, j int)