Documentation
¶
Index ¶
- func RunMigrations(logger *zap.Logger, pgConnectionString string, downFirst bool) error
- type DBTX
- type DeregisterValidatorParams
- type EtlAddress
- type EtlBlock
- type EtlManageEntity
- type EtlPlay
- type EtlProofStatus
- type EtlSlaNodeReport
- type EtlSlaRollup
- type EtlStorageProof
- type EtlStorageProofVerification
- type EtlTransaction
- type EtlValidator
- type EtlValidatorDeregistration
- type EtlValidatorMisbehaviorDeregistration
- type EtlValidatorRegistration
- type GetActiveValidatorsParams
- type GetAllActiveValidatorsWithRecentRollupsRow
- type GetBlockRangeFirstParams
- type GetBlockRangeLastParams
- type GetBlocksByPageParams
- type GetChallengeStatisticsForBlockRangeParams
- type GetChallengeStatisticsForBlockRangeRow
- type GetHealthyValidatorCountsForRollupsRow
- type GetManageEntitiesByBlockHeightCursorParams
- type GetPlaysByBlockHeightCursorParams
- type GetSlaNodeReportsByAddressParams
- type GetSlaNodeReportsByBlockHeightCursorParams
- type GetSlaRollupsByBlockHeightCursorParams
- type GetSlaRollupsWithPaginationParams
- type GetStorageProofVerificationsByBlockHeightCursorParams
- type GetStorageProofsByBlockHeightCursorParams
- type GetTransactionCountByAddressParams
- type GetTransactionsByAddressParams
- type GetTransactionsByAddressRow
- type GetTransactionsByBlockHeightCursorParams
- type GetTransactionsByPageParams
- type GetValidatorDeregistrationsByBlockHeightCursorParams
- type GetValidatorDeregistrationsParams
- type GetValidatorDeregistrationsRow
- type GetValidatorMisbehaviorDeregistrationsByBlockHeightCursorParams
- type GetValidatorRegistrationsByBlockHeightCursorParams
- type GetValidatorRegistrationsParams
- type GetValidatorRegistrationsRow
- type GetValidatorsForSlaRollupRow
- type InsertAddressParams
- type InsertBlockParams
- type InsertFailedStorageProofParams
- type InsertManageEntityParams
- type InsertPlayParams
- type InsertPlaysParams
- type InsertSlaNodeReportParams
- type InsertSlaRollupParams
- type InsertSlaRollupReturningIdParams
- type InsertStorageProofParams
- type InsertStorageProofVerificationParams
- type InsertTransactionParams
- type InsertValidatorDeregistrationParams
- type InsertValidatorMisbehaviorDeregistrationParams
- type InsertValidatorRegistrationParams
- type MaterializedViewManager
- func (m *MaterializedViewManager) ForceRefreshIfStale(ctx context.Context, maxAge time.Duration) error
- func (m *MaterializedViewManager) GetViewRefreshStatus(ctx context.Context) (map[string]time.Time, error)
- func (m *MaterializedViewManager) HealthCheck(ctx context.Context) error
- func (m *MaterializedViewManager) RefreshSlaRollupViews(ctx context.Context) error
- func (m *MaterializedViewManager) StartPeriodicRefresh(ctx context.Context, interval time.Duration)
- type MvDashboardTransactionStat
- type MvDashboardTransactionType
- type NullEtlProofStatus
- type Queries
- func (q *Queries) DeregisterValidator(ctx context.Context, arg DeregisterValidatorParams) error
- func (q *Queries) GetActiveValidatorCount(ctx context.Context) (int64, error)
- func (q *Queries) GetActiveValidators(ctx context.Context, arg GetActiveValidatorsParams) ([]EtlValidator, error)
- func (q *Queries) GetAllActiveValidatorsWithRecentRollups(ctx context.Context) ([]GetAllActiveValidatorsWithRecentRollupsRow, error)
- func (q *Queries) GetBlockByHeight(ctx context.Context, blockHeight int64) (EtlBlock, error)
- func (q *Queries) GetBlockRangeFirst(ctx context.Context, arg GetBlockRangeFirstParams) (EtlBlock, error)
- func (q *Queries) GetBlockRangeLast(ctx context.Context, arg GetBlockRangeLastParams) (EtlBlock, error)
- func (q *Queries) GetBlockTransactionCount(ctx context.Context, blockHeight int64) (int64, error)
- func (q *Queries) GetBlocksByPage(ctx context.Context, arg GetBlocksByPageParams) ([]EtlBlock, error)
- func (q *Queries) GetChallengeStatisticsForBlockRange(ctx context.Context, arg GetChallengeStatisticsForBlockRangeParams) ([]GetChallengeStatisticsForBlockRangeRow, error)
- func (q *Queries) GetDashboardTransactionStats(ctx context.Context) (MvDashboardTransactionStat, error)
- func (q *Queries) GetDashboardTransactionTypes(ctx context.Context) ([]MvDashboardTransactionType, error)
- func (q *Queries) GetHealthyValidatorCountsForRollups(ctx context.Context, dollar_1 []int32) ([]GetHealthyValidatorCountsForRollupsRow, error)
- func (q *Queries) GetLatestIndexedBlock(ctx context.Context) (int64, error)
- func (q *Queries) GetLatestSlaRollup(ctx context.Context) (EtlSlaRollup, error)
- func (q *Queries) GetManageEntitiesByBlockHeightCursor(ctx context.Context, arg GetManageEntitiesByBlockHeightCursorParams) ([]EtlManageEntity, error)
- func (q *Queries) GetManageEntityByTxHash(ctx context.Context, txHash string) (EtlManageEntity, error)
- func (q *Queries) GetPlaysByBlockHeightCursor(ctx context.Context, arg GetPlaysByBlockHeightCursorParams) ([]EtlPlay, error)
- func (q *Queries) GetPlaysByTxHash(ctx context.Context, txHash string) ([]EtlPlay, error)
- func (q *Queries) GetRelationTypesByAddress(ctx context.Context, lower string) ([]interface{}, error)
- func (q *Queries) GetSlaNodeReportsByAddress(ctx context.Context, arg GetSlaNodeReportsByAddressParams) ([]EtlSlaNodeReport, error)
- func (q *Queries) GetSlaNodeReportsByBlockHeightCursor(ctx context.Context, arg GetSlaNodeReportsByBlockHeightCursorParams) ([]EtlSlaNodeReport, error)
- func (q *Queries) GetSlaRollupById(ctx context.Context, id int32) (EtlSlaRollup, error)
- func (q *Queries) GetSlaRollupByTxHash(ctx context.Context, txHash string) (EtlSlaRollup, error)
- func (q *Queries) GetSlaRollupsByBlockHeightCursor(ctx context.Context, arg GetSlaRollupsByBlockHeightCursorParams) ([]EtlSlaRollup, error)
- func (q *Queries) GetSlaRollupsWithPagination(ctx context.Context, arg GetSlaRollupsWithPaginationParams) ([]EtlSlaRollup, error)
- func (q *Queries) GetStorageProofByTxHash(ctx context.Context, txHash string) (EtlStorageProof, error)
- func (q *Queries) GetStorageProofVerificationByTxHash(ctx context.Context, txHash string) (EtlStorageProofVerification, error)
- func (q *Queries) GetStorageProofVerificationsByBlockHeightCursor(ctx context.Context, arg GetStorageProofVerificationsByBlockHeightCursorParams) ([]EtlStorageProofVerification, error)
- func (q *Queries) GetStorageProofsByBlockHeightCursor(ctx context.Context, arg GetStorageProofsByBlockHeightCursorParams) ([]EtlStorageProof, error)
- func (q *Queries) GetStorageProofsForHeight(ctx context.Context, height int64) ([]EtlStorageProof, error)
- func (q *Queries) GetTotalTransactions(ctx context.Context) (int32, error)
- func (q *Queries) GetTransactionByHash(ctx context.Context, txHash string) (EtlTransaction, error)
- func (q *Queries) GetTransactionCountByAddress(ctx context.Context, arg GetTransactionCountByAddressParams) (int64, error)
- func (q *Queries) GetTransactionsByAddress(ctx context.Context, arg GetTransactionsByAddressParams) ([]GetTransactionsByAddressRow, error)
- func (q *Queries) GetTransactionsByBlockHeightCursor(ctx context.Context, arg GetTransactionsByBlockHeightCursorParams) ([]EtlTransaction, error)
- func (q *Queries) GetTransactionsByPage(ctx context.Context, arg GetTransactionsByPageParams) ([]EtlTransaction, error)
- func (q *Queries) GetValidatorByAddress(ctx context.Context, lower string) (EtlValidator, error)
- func (q *Queries) GetValidatorDeregistrationByTxHash(ctx context.Context, txHash string) (EtlValidatorDeregistration, error)
- func (q *Queries) GetValidatorDeregistrations(ctx context.Context, arg GetValidatorDeregistrationsParams) ([]GetValidatorDeregistrationsRow, error)
- func (q *Queries) GetValidatorDeregistrationsByBlockHeightCursor(ctx context.Context, arg GetValidatorDeregistrationsByBlockHeightCursorParams) ([]EtlValidatorDeregistration, error)
- func (q *Queries) GetValidatorMisbehaviorDeregistrationsByBlockHeightCursor(ctx context.Context, ...) ([]EtlValidatorMisbehaviorDeregistration, error)
- func (q *Queries) GetValidatorRegistrationByTxHash(ctx context.Context, txHash string) (EtlValidatorRegistration, error)
- func (q *Queries) GetValidatorRegistrations(ctx context.Context, arg GetValidatorRegistrationsParams) ([]GetValidatorRegistrationsRow, error)
- func (q *Queries) GetValidatorRegistrationsByBlockHeightCursor(ctx context.Context, arg GetValidatorRegistrationsByBlockHeightCursorParams) ([]EtlValidatorRegistration, error)
- func (q *Queries) GetValidatorsForSlaRollup(ctx context.Context, slaRollupID int32) ([]GetValidatorsForSlaRollupRow, error)
- func (q *Queries) InsertAddress(ctx context.Context, arg InsertAddressParams) error
- func (q *Queries) InsertBlock(ctx context.Context, arg InsertBlockParams) error
- func (q *Queries) InsertFailedStorageProof(ctx context.Context, arg InsertFailedStorageProofParams) error
- func (q *Queries) InsertManageEntity(ctx context.Context, arg InsertManageEntityParams) error
- func (q *Queries) InsertPlay(ctx context.Context, arg InsertPlayParams) error
- func (q *Queries) InsertPlays(ctx context.Context, arg InsertPlaysParams) error
- func (q *Queries) InsertSlaNodeReport(ctx context.Context, arg InsertSlaNodeReportParams) error
- func (q *Queries) InsertSlaRollup(ctx context.Context, arg InsertSlaRollupParams) error
- func (q *Queries) InsertSlaRollupReturningId(ctx context.Context, arg InsertSlaRollupReturningIdParams) (int32, error)
- func (q *Queries) InsertStorageProof(ctx context.Context, arg InsertStorageProofParams) error
- func (q *Queries) InsertStorageProofVerification(ctx context.Context, arg InsertStorageProofVerificationParams) error
- func (q *Queries) InsertTransaction(ctx context.Context, arg InsertTransactionParams) error
- func (q *Queries) InsertValidatorDeregistration(ctx context.Context, arg InsertValidatorDeregistrationParams) error
- func (q *Queries) InsertValidatorMisbehaviorDeregistration(ctx context.Context, arg InsertValidatorMisbehaviorDeregistrationParams) error
- func (q *Queries) InsertValidatorRegistration(ctx context.Context, arg InsertValidatorRegistrationParams) error
- func (q *Queries) RegisterValidator(ctx context.Context, arg RegisterValidatorParams) error
- func (q *Queries) UpdateStorageProofStatus(ctx context.Context, arg UpdateStorageProofStatusParams) error
- func (q *Queries) WithTx(tx pgx.Tx) *Queries
- type RegisterValidatorParams
- type UpdateStorageProofStatusParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EtlAddress ¶
type EtlManageEntity ¶
type EtlManageEntity struct {
ID int32 `json:"id"`
Address string `json:"address"`
EntityType string `json:"entity_type"`
EntityID int64 `json:"entity_id"`
Action string `json:"action"`
Metadata pgtype.Text `json:"metadata"`
Signature string `json:"signature"`
Signer string `json:"signer"`
Nonce string `json:"nonce"`
BlockHeight int64 `json:"block_height"`
TxHash string `json:"tx_hash"`
CreatedAt pgtype.Timestamp `json:"created_at"`
}
type EtlPlay ¶
type EtlPlay struct {
ID int32 `json:"id"`
UserID string `json:"user_id"`
TrackID string `json:"track_id"`
City string `json:"city"`
Region string `json:"region"`
Country string `json:"country"`
PlayedAt pgtype.Timestamp `json:"played_at"`
BlockHeight int64 `json:"block_height"`
TxHash string `json:"tx_hash"`
ListenedAt pgtype.Timestamp `json:"listened_at"`
RecordedAt pgtype.Timestamp `json:"recorded_at"`
}
type EtlProofStatus ¶
type EtlProofStatus string
const ( EtlProofStatusUnresolved EtlProofStatus = "unresolved" EtlProofStatusPass EtlProofStatus = "pass" EtlProofStatusFail EtlProofStatus = "fail" )
func (*EtlProofStatus) Scan ¶
func (e *EtlProofStatus) Scan(src interface{}) error
type EtlSlaNodeReport ¶
type EtlSlaNodeReport struct {
ID int32 `json:"id"`
SlaRollupID int32 `json:"sla_rollup_id"`
Address string `json:"address"`
NumBlocksProposed int32 `json:"num_blocks_proposed"`
ChallengesReceived int32 `json:"challenges_received"`
ChallengesFailed int32 `json:"challenges_failed"`
BlockHeight int64 `json:"block_height"`
TxHash string `json:"tx_hash"`
CreatedAt pgtype.Timestamp `json:"created_at"`
}
type EtlSlaRollup ¶
type EtlSlaRollup struct {
ID int32 `json:"id"`
BlockStart int64 `json:"block_start"`
BlockEnd int64 `json:"block_end"`
BlockHeight int64 `json:"block_height"`
ValidatorCount int32 `json:"validator_count"`
BlockQuota int32 `json:"block_quota"`
Bps float64 `json:"bps"`
Tps float64 `json:"tps"`
TxHash string `json:"tx_hash"`
CreatedAt pgtype.Timestamp `json:"created_at"`
}
type EtlStorageProof ¶
type EtlStorageProof struct {
ID int32 `json:"id"`
Height int64 `json:"height"`
Address string `json:"address"`
ProverAddresses []string `json:"prover_addresses"`
Cid string `json:"cid"`
ProofSignature []byte `json:"proof_signature"`
Proof []byte `json:"proof"`
Status EtlProofStatus `json:"status"`
BlockHeight int64 `json:"block_height"`
TxHash string `json:"tx_hash"`
CreatedAt pgtype.Timestamp `json:"created_at"`
}
type EtlTransaction ¶
type EtlValidator ¶
type EtlValidator struct {
ID int32 `json:"id"`
Address string `json:"address"`
Endpoint string `json:"endpoint"`
CometAddress string `json:"comet_address"`
NodeType string `json:"node_type"`
Spid string `json:"spid"`
VotingPower int64 `json:"voting_power"`
Status string `json:"status"`
RegisteredAt int64 `json:"registered_at"`
DeregisteredAt pgtype.Int8 `json:"deregistered_at"`
CreatedAt pgtype.Timestamp `json:"created_at"`
UpdatedAt pgtype.Timestamp `json:"updated_at"`
}
type EtlValidatorRegistration ¶
type EtlValidatorRegistration struct {
ID int32 `json:"id"`
Address string `json:"address"`
Endpoint string `json:"endpoint"`
CometAddress string `json:"comet_address"`
EthBlock string `json:"eth_block"`
NodeType string `json:"node_type"`
Spid string `json:"spid"`
CometPubkey []byte `json:"comet_pubkey"`
VotingPower int64 `json:"voting_power"`
BlockHeight int64 `json:"block_height"`
TxHash string `json:"tx_hash"`
}
type GetAllActiveValidatorsWithRecentRollupsRow ¶
type GetAllActiveValidatorsWithRecentRollupsRow struct {
ID int32 `json:"id"`
Address string `json:"address"`
Endpoint string `json:"endpoint"`
CometAddress string `json:"comet_address"`
NodeType string `json:"node_type"`
Spid string `json:"spid"`
VotingPower int64 `json:"voting_power"`
Status string `json:"status"`
RegisteredAt int64 `json:"registered_at"`
DeregisteredAt pgtype.Int8 `json:"deregistered_at"`
CreatedAt pgtype.Timestamp `json:"created_at"`
UpdatedAt pgtype.Timestamp `json:"updated_at"`
SlaRollupID pgtype.Int4 `json:"sla_rollup_id"`
NumBlocksProposed pgtype.Int4 `json:"num_blocks_proposed"`
ChallengesReceived pgtype.Int4 `json:"challenges_received"`
ChallengesFailed pgtype.Int4 `json:"challenges_failed"`
ReportBlockHeight pgtype.Int8 `json:"report_block_height"`
ReportCreatedAt pgtype.Timestamp `json:"report_created_at"`
}
type GetBlockRangeLastParams ¶
type GetBlocksByPageParams ¶
type GetHealthyValidatorCountsForRollupsRow ¶
type GetHealthyValidatorCountsForRollupsRow struct {
RollupID int32 `json:"rollup_id"`
HealthyValidators interface{} `json:"healthy_validators"`
}
type GetTransactionsByAddressRow ¶
type GetTransactionsByAddressRow struct {
ID int32 `json:"id"`
TxHash string `json:"tx_hash"`
BlockHeight int64 `json:"block_height"`
TxIndex int32 `json:"tx_index"`
TxType string `json:"tx_type"`
Address pgtype.Text `json:"address"`
CreatedAt pgtype.Timestamp `json:"created_at"`
Relation interface{} `json:"relation"`
}
type GetValidatorDeregistrationsRow ¶
type GetValidatorDeregistrationsRow struct {
ID int32 `json:"id"`
CometAddress string `json:"comet_address"`
CometPubkey []byte `json:"comet_pubkey"`
BlockHeight int64 `json:"block_height"`
TxHash string `json:"tx_hash"`
Endpoint pgtype.Text `json:"endpoint"`
NodeType pgtype.Text `json:"node_type"`
Spid pgtype.Text `json:"spid"`
VotingPower pgtype.Int8 `json:"voting_power"`
Status pgtype.Text `json:"status"`
}
type GetValidatorRegistrationsRow ¶
type GetValidatorRegistrationsRow struct {
ID int32 `json:"id"`
Address string `json:"address"`
Endpoint string `json:"endpoint"`
CometAddress string `json:"comet_address"`
EthBlock string `json:"eth_block"`
NodeType string `json:"node_type"`
Spid string `json:"spid"`
CometPubkey []byte `json:"comet_pubkey"`
VotingPower int64 `json:"voting_power"`
BlockHeight int64 `json:"block_height"`
TxHash string `json:"tx_hash"`
Endpoint_2 pgtype.Text `json:"endpoint_2"`
NodeType_2 pgtype.Text `json:"node_type_2"`
Spid_2 pgtype.Text `json:"spid_2"`
VotingPower_2 pgtype.Int8 `json:"voting_power_2"`
Status pgtype.Text `json:"status"`
}
type GetValidatorsForSlaRollupRow ¶
type GetValidatorsForSlaRollupRow struct {
ID int32 `json:"id"`
Address string `json:"address"`
Endpoint string `json:"endpoint"`
CometAddress string `json:"comet_address"`
NodeType string `json:"node_type"`
Spid string `json:"spid"`
VotingPower int64 `json:"voting_power"`
Status string `json:"status"`
RegisteredAt int64 `json:"registered_at"`
DeregisteredAt pgtype.Int8 `json:"deregistered_at"`
CreatedAt pgtype.Timestamp `json:"created_at"`
UpdatedAt pgtype.Timestamp `json:"updated_at"`
NumBlocksProposed pgtype.Int4 `json:"num_blocks_proposed"`
ChallengesReceived pgtype.Int4 `json:"challenges_received"`
ChallengesFailed pgtype.Int4 `json:"challenges_failed"`
}
type InsertAddressParams ¶
type InsertBlockParams ¶
type InsertManageEntityParams ¶
type InsertManageEntityParams struct {
Address string `json:"address"`
EntityType string `json:"entity_type"`
EntityID int64 `json:"entity_id"`
Action string `json:"action"`
Metadata pgtype.Text `json:"metadata"`
Signature string `json:"signature"`
Signer string `json:"signer"`
Nonce string `json:"nonce"`
BlockHeight int64 `json:"block_height"`
TxHash string `json:"tx_hash"`
CreatedAt pgtype.Timestamp `json:"created_at"`
}
type InsertPlayParams ¶
type InsertPlayParams struct {
UserID string `json:"user_id"`
TrackID string `json:"track_id"`
City string `json:"city"`
Region string `json:"region"`
Country string `json:"country"`
PlayedAt pgtype.Timestamp `json:"played_at"`
BlockHeight int64 `json:"block_height"`
TxHash string `json:"tx_hash"`
ListenedAt pgtype.Timestamp `json:"listened_at"`
RecordedAt pgtype.Timestamp `json:"recorded_at"`
}
type InsertPlaysParams ¶
type InsertPlaysParams struct {
Column1 []string `json:"column_1"`
Column2 []string `json:"column_2"`
Column3 []string `json:"column_3"`
Column4 []string `json:"column_4"`
Column5 []string `json:"column_5"`
Column6 []pgtype.Timestamp `json:"column_6"`
Column7 []int64 `json:"column_7"`
Column8 []string `json:"column_8"`
Column9 []pgtype.Timestamp `json:"column_9"`
Column10 []pgtype.Timestamp `json:"column_10"`
}
type InsertSlaNodeReportParams ¶
type InsertSlaNodeReportParams struct {
SlaRollupID int32 `json:"sla_rollup_id"`
Address string `json:"address"`
NumBlocksProposed int32 `json:"num_blocks_proposed"`
ChallengesReceived int32 `json:"challenges_received"`
ChallengesFailed int32 `json:"challenges_failed"`
BlockHeight int64 `json:"block_height"`
TxHash string `json:"tx_hash"`
CreatedAt pgtype.Timestamp `json:"created_at"`
}
type InsertSlaRollupParams ¶
type InsertSlaRollupParams struct {
BlockStart int64 `json:"block_start"`
BlockEnd int64 `json:"block_end"`
BlockHeight int64 `json:"block_height"`
ValidatorCount int32 `json:"validator_count"`
BlockQuota int32 `json:"block_quota"`
Bps float64 `json:"bps"`
Tps float64 `json:"tps"`
TxHash string `json:"tx_hash"`
CreatedAt pgtype.Timestamp `json:"created_at"`
}
type InsertSlaRollupReturningIdParams ¶
type InsertSlaRollupReturningIdParams struct {
BlockStart int64 `json:"block_start"`
BlockEnd int64 `json:"block_end"`
BlockHeight int64 `json:"block_height"`
ValidatorCount int32 `json:"validator_count"`
BlockQuota int32 `json:"block_quota"`
Bps float64 `json:"bps"`
Tps float64 `json:"tps"`
TxHash string `json:"tx_hash"`
CreatedAt pgtype.Timestamp `json:"created_at"`
}
type InsertStorageProofParams ¶
type InsertStorageProofParams struct {
Height int64 `json:"height"`
Address string `json:"address"`
ProverAddresses []string `json:"prover_addresses"`
Cid string `json:"cid"`
ProofSignature []byte `json:"proof_signature"`
Proof []byte `json:"proof"`
Status EtlProofStatus `json:"status"`
BlockHeight int64 `json:"block_height"`
TxHash string `json:"tx_hash"`
CreatedAt pgtype.Timestamp `json:"created_at"`
}
type InsertTransactionParams ¶
type InsertValidatorRegistrationParams ¶
type InsertValidatorRegistrationParams struct {
Address string `json:"address"`
Endpoint string `json:"endpoint"`
CometAddress string `json:"comet_address"`
EthBlock string `json:"eth_block"`
NodeType string `json:"node_type"`
Spid string `json:"spid"`
CometPubkey []byte `json:"comet_pubkey"`
VotingPower int64 `json:"voting_power"`
BlockHeight int64 `json:"block_height"`
TxHash string `json:"tx_hash"`
}
type MaterializedViewManager ¶
type MaterializedViewManager struct {
// contains filtered or unexported fields
}
MaterializedViewManager handles refreshing materialized views for optimal performance
func NewMaterializedViewManager ¶
func NewMaterializedViewManager(db *pgxpool.Pool, logger *slog.Logger) *MaterializedViewManager
NewMaterializedViewManager creates a new manager for materialized views
func (*MaterializedViewManager) ForceRefreshIfStale ¶
func (m *MaterializedViewManager) ForceRefreshIfStale(ctx context.Context, maxAge time.Duration) error
ForceRefreshIfStale refreshes views if they haven't been refreshed recently
func (*MaterializedViewManager) GetViewRefreshStatus ¶
func (m *MaterializedViewManager) GetViewRefreshStatus(ctx context.Context) (map[string]time.Time, error)
GetViewRefreshStatus returns information about when views were last refreshed
func (*MaterializedViewManager) HealthCheck ¶
func (m *MaterializedViewManager) HealthCheck(ctx context.Context) error
Health check for materialized views - useful for monitoring
func (*MaterializedViewManager) RefreshSlaRollupViews ¶
func (m *MaterializedViewManager) RefreshSlaRollupViews(ctx context.Context) error
RefreshSlaRollupViews refreshes all SLA rollup related materialized views
func (*MaterializedViewManager) StartPeriodicRefresh ¶
func (m *MaterializedViewManager) StartPeriodicRefresh(ctx context.Context, interval time.Duration)
StartPeriodicRefresh starts a background goroutine that refreshes materialized views periodically
type MvDashboardTransactionStat ¶
type MvDashboardTransactionStat struct {
Transactions24h int64 `json:"transactions_24h"`
TransactionsPrevious24h int64 `json:"transactions_previous_24h"`
Transactions7d int64 `json:"transactions_7d"`
Transactions30d int64 `json:"transactions_30d"`
TotalTransactions int64 `json:"total_transactions"`
}
type NullEtlProofStatus ¶
type NullEtlProofStatus struct {
EtlProofStatus EtlProofStatus `json:"etl_proof_status"`
Valid bool `json:"valid"` // Valid is true if EtlProofStatus is not NULL
}
func (*NullEtlProofStatus) Scan ¶
func (ns *NullEtlProofStatus) Scan(value interface{}) error
Scan implements the Scanner interface.
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) DeregisterValidator ¶
func (q *Queries) DeregisterValidator(ctx context.Context, arg DeregisterValidatorParams) error
func (*Queries) GetActiveValidatorCount ¶
func (*Queries) GetActiveValidators ¶
func (q *Queries) GetActiveValidators(ctx context.Context, arg GetActiveValidatorsParams) ([]EtlValidator, error)
func (*Queries) GetAllActiveValidatorsWithRecentRollups ¶
func (q *Queries) GetAllActiveValidatorsWithRecentRollups(ctx context.Context) ([]GetAllActiveValidatorsWithRecentRollupsRow, error)
func (*Queries) GetBlockByHeight ¶
func (*Queries) GetBlockRangeFirst ¶
func (*Queries) GetBlockRangeLast ¶
func (*Queries) GetBlockTransactionCount ¶
func (*Queries) GetBlocksByPage ¶
func (*Queries) GetChallengeStatisticsForBlockRange ¶
func (q *Queries) GetChallengeStatisticsForBlockRange(ctx context.Context, arg GetChallengeStatisticsForBlockRangeParams) ([]GetChallengeStatisticsForBlockRangeRow, error)
func (*Queries) GetDashboardTransactionStats ¶
func (q *Queries) GetDashboardTransactionStats(ctx context.Context) (MvDashboardTransactionStat, error)
Dashboard materialized view queries
func (*Queries) GetDashboardTransactionTypes ¶
func (q *Queries) GetDashboardTransactionTypes(ctx context.Context) ([]MvDashboardTransactionType, error)
func (*Queries) GetHealthyValidatorCountsForRollups ¶
func (*Queries) GetLatestIndexedBlock ¶
get latest indexed block height
func (*Queries) GetLatestSlaRollup ¶
func (q *Queries) GetLatestSlaRollup(ctx context.Context) (EtlSlaRollup, error)
func (*Queries) GetManageEntitiesByBlockHeightCursor ¶
func (q *Queries) GetManageEntitiesByBlockHeightCursor(ctx context.Context, arg GetManageEntitiesByBlockHeightCursorParams) ([]EtlManageEntity, error)
func (*Queries) GetManageEntityByTxHash ¶
func (*Queries) GetPlaysByBlockHeightCursor ¶
func (*Queries) GetPlaysByTxHash ¶
Transaction content queries by hash
func (*Queries) GetRelationTypesByAddress ¶
func (*Queries) GetSlaNodeReportsByAddress ¶
func (q *Queries) GetSlaNodeReportsByAddress(ctx context.Context, arg GetSlaNodeReportsByAddressParams) ([]EtlSlaNodeReport, error)
func (*Queries) GetSlaNodeReportsByBlockHeightCursor ¶
func (q *Queries) GetSlaNodeReportsByBlockHeightCursor(ctx context.Context, arg GetSlaNodeReportsByBlockHeightCursorParams) ([]EtlSlaNodeReport, error)
func (*Queries) GetSlaRollupById ¶
func (*Queries) GetSlaRollupByTxHash ¶
func (*Queries) GetSlaRollupsByBlockHeightCursor ¶
func (q *Queries) GetSlaRollupsByBlockHeightCursor(ctx context.Context, arg GetSlaRollupsByBlockHeightCursorParams) ([]EtlSlaRollup, error)
func (*Queries) GetSlaRollupsWithPagination ¶
func (q *Queries) GetSlaRollupsWithPagination(ctx context.Context, arg GetSlaRollupsWithPaginationParams) ([]EtlSlaRollup, error)
func (*Queries) GetStorageProofByTxHash ¶
func (*Queries) GetStorageProofVerificationByTxHash ¶
func (*Queries) GetStorageProofVerificationsByBlockHeightCursor ¶
func (q *Queries) GetStorageProofVerificationsByBlockHeightCursor(ctx context.Context, arg GetStorageProofVerificationsByBlockHeightCursorParams) ([]EtlStorageProofVerification, error)
func (*Queries) GetStorageProofsByBlockHeightCursor ¶
func (q *Queries) GetStorageProofsByBlockHeightCursor(ctx context.Context, arg GetStorageProofsByBlockHeightCursorParams) ([]EtlStorageProof, error)
func (*Queries) GetStorageProofsForHeight ¶
func (q *Queries) GetStorageProofsForHeight(ctx context.Context, height int64) ([]EtlStorageProof, error)
Storage proof consensus queries
func (*Queries) GetTotalTransactions ¶
func (*Queries) GetTransactionByHash ¶
func (*Queries) GetTransactionCountByAddress ¶
func (*Queries) GetTransactionsByAddress ¶
func (q *Queries) GetTransactionsByAddress(ctx context.Context, arg GetTransactionsByAddressParams) ([]GetTransactionsByAddressRow, error)
Account transaction queries
func (*Queries) GetTransactionsByBlockHeightCursor ¶
func (q *Queries) GetTransactionsByBlockHeightCursor(ctx context.Context, arg GetTransactionsByBlockHeightCursorParams) ([]EtlTransaction, error)
func (*Queries) GetTransactionsByPage ¶
func (q *Queries) GetTransactionsByPage(ctx context.Context, arg GetTransactionsByPageParams) ([]EtlTransaction, error)
func (*Queries) GetValidatorByAddress ¶
func (*Queries) GetValidatorDeregistrationByTxHash ¶
func (*Queries) GetValidatorDeregistrations ¶
func (q *Queries) GetValidatorDeregistrations(ctx context.Context, arg GetValidatorDeregistrationsParams) ([]GetValidatorDeregistrationsRow, error)
func (*Queries) GetValidatorDeregistrationsByBlockHeightCursor ¶
func (q *Queries) GetValidatorDeregistrationsByBlockHeightCursor(ctx context.Context, arg GetValidatorDeregistrationsByBlockHeightCursorParams) ([]EtlValidatorDeregistration, error)
func (*Queries) GetValidatorMisbehaviorDeregistrationsByBlockHeightCursor ¶
func (q *Queries) GetValidatorMisbehaviorDeregistrationsByBlockHeightCursor(ctx context.Context, arg GetValidatorMisbehaviorDeregistrationsByBlockHeightCursorParams) ([]EtlValidatorMisbehaviorDeregistration, error)
func (*Queries) GetValidatorRegistrationByTxHash ¶
func (*Queries) GetValidatorRegistrations ¶
func (q *Queries) GetValidatorRegistrations(ctx context.Context, arg GetValidatorRegistrationsParams) ([]GetValidatorRegistrationsRow, error)
func (*Queries) GetValidatorRegistrationsByBlockHeightCursor ¶
func (q *Queries) GetValidatorRegistrationsByBlockHeightCursor(ctx context.Context, arg GetValidatorRegistrationsByBlockHeightCursorParams) ([]EtlValidatorRegistration, error)
func (*Queries) GetValidatorsForSlaRollup ¶
func (*Queries) InsertAddress ¶
func (q *Queries) InsertAddress(ctx context.Context, arg InsertAddressParams) error
func (*Queries) InsertBlock ¶
func (q *Queries) InsertBlock(ctx context.Context, arg InsertBlockParams) error
func (*Queries) InsertFailedStorageProof ¶
func (q *Queries) InsertFailedStorageProof(ctx context.Context, arg InsertFailedStorageProofParams) error
func (*Queries) InsertManageEntity ¶
func (q *Queries) InsertManageEntity(ctx context.Context, arg InsertManageEntityParams) error
func (*Queries) InsertPlay ¶
func (q *Queries) InsertPlay(ctx context.Context, arg InsertPlayParams) error
func (*Queries) InsertPlays ¶
func (q *Queries) InsertPlays(ctx context.Context, arg InsertPlaysParams) error
func (*Queries) InsertSlaNodeReport ¶
func (q *Queries) InsertSlaNodeReport(ctx context.Context, arg InsertSlaNodeReportParams) error
func (*Queries) InsertSlaRollup ¶
func (q *Queries) InsertSlaRollup(ctx context.Context, arg InsertSlaRollupParams) error
func (*Queries) InsertSlaRollupReturningId ¶
func (*Queries) InsertStorageProof ¶
func (q *Queries) InsertStorageProof(ctx context.Context, arg InsertStorageProofParams) error
func (*Queries) InsertStorageProofVerification ¶
func (q *Queries) InsertStorageProofVerification(ctx context.Context, arg InsertStorageProofVerificationParams) error
func (*Queries) InsertTransaction ¶
func (q *Queries) InsertTransaction(ctx context.Context, arg InsertTransactionParams) error
func (*Queries) InsertValidatorDeregistration ¶
func (q *Queries) InsertValidatorDeregistration(ctx context.Context, arg InsertValidatorDeregistrationParams) error
func (*Queries) InsertValidatorMisbehaviorDeregistration ¶
func (q *Queries) InsertValidatorMisbehaviorDeregistration(ctx context.Context, arg InsertValidatorMisbehaviorDeregistrationParams) error
func (*Queries) InsertValidatorRegistration ¶
func (q *Queries) InsertValidatorRegistration(ctx context.Context, arg InsertValidatorRegistrationParams) error
func (*Queries) RegisterValidator ¶
func (q *Queries) RegisterValidator(ctx context.Context, arg RegisterValidatorParams) error
func (*Queries) UpdateStorageProofStatus ¶
func (q *Queries) UpdateStorageProofStatus(ctx context.Context, arg UpdateStorageProofStatusParams) error
type RegisterValidatorParams ¶
type RegisterValidatorParams struct {
Address string `json:"address"`
Endpoint string `json:"endpoint"`
CometAddress string `json:"comet_address"`
NodeType string `json:"node_type"`
Spid string `json:"spid"`
VotingPower int64 `json:"voting_power"`
Status string `json:"status"`
RegisteredAt int64 `json:"registered_at"`
DeregisteredAt pgtype.Int8 `json:"deregistered_at"`
CreatedAt pgtype.Timestamp `json:"created_at"`
UpdatedAt pgtype.Timestamp `json:"updated_at"`
}
type UpdateStorageProofStatusParams ¶
type UpdateStorageProofStatusParams struct {
Status EtlProofStatus `json:"status"`
Proof []byte `json:"proof"`
Height int64 `json:"height"`
Address string `json:"address"`
}