Documentation
¶
Index ¶
- Constants
- type BlockPubsub
- type ChallengeStats
- type ETLService
- func (e *ETLService) GetBlockPubsub() *BlockPubsub
- func (e *ETLService) GetBlocks(context.Context, *connect.Request[v1.GetBlocksRequest]) (*connect.Response[v1.GetBlocksResponse], error)
- func (e *ETLService) GetDB() *db.Queries
- func (e *ETLService) GetHealth(context.Context, *connect.Request[v1.GetHealthRequest]) (*connect.Response[v1.GetHealthResponse], error)
- func (e *ETLService) GetLocation(context.Context, *connect.Request[v1.GetLocationRequest]) (*connect.Response[v1.GetLocationResponse], error)
- func (e *ETLService) GetLocationDB() *location.LocationService
- func (e *ETLService) GetManageEntities(context.Context, *connect.Request[v1.GetManageEntitiesRequest]) (*connect.Response[v1.GetManageEntitiesResponse], error)
- func (e *ETLService) GetPlayPubsub() *PlayPubsub
- func (e *ETLService) GetPlays(context.Context, *connect.Request[v1.GetPlaysRequest]) (*connect.Response[v1.GetPlaysResponse], error)
- func (e *ETLService) GetTransactions(context.Context, *connect.Request[v1.GetTransactionsRequest]) (*connect.Response[v1.GetTransactionsResponse], error)
- func (e *ETLService) GetValidators(context.Context, *connect.Request[v1.GetValidatorsRequest]) (*connect.Response[v1.GetValidatorsResponse], error)
- func (e *ETLService) InitializeChainID(ctx context.Context) error
- func (e *ETLService) Ping(context.Context, *connect.Request[v1.PingRequest]) (*connect.Response[v1.PingResponse], error)
- func (etl *ETLService) Run() error
- func (e *ETLService) SetCheckReadiness(checkReadiness bool)
- func (e *ETLService) SetDBURL(dbURL string)
- func (e *ETLService) SetEndingBlockHeight(endingBlockHeight int64)
- func (e *ETLService) SetRunDownMigrations(runDownMigrations bool)
- func (e *ETLService) SetStartingBlockHeight(startingBlockHeight int64)
- type MaterializedViewRefresher
- type PlayPubsub
- type Pubsub
- type StorageProofEntry
- type StorageProofState
Constants ¶
const ( TxTypePlay = "play" TxTypeManageEntity = "manage_entity" TxTypeValidatorRegistration = "validator_registration" TxTypeValidatorDeregistration = "validator_deregistration" TxTypeValidatorRegistrationLegacy = "validator_registration_legacy" TxTypeSlaRollup = "sla_rollup" TxTypeValidatorMisbehaviorDeregistration = "validator_misbehavior_deregistration" TxTypeStorageProof = "storage_proof" TxTypeStorageProofVerification = "storage_proof_verification" TxTypeRelease = "release" )
const ( BlockTopic = "block-subscriber" PlayTopic = "play-subscriber" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockPubsub ¶
type ChallengeStats ¶
ChallengeStats represents storage proof challenge statistics for a validator
type ETLService ¶
type ETLService struct {
ChainID string
// contains filtered or unexported fields
}
func NewETLService ¶
func NewETLService(core corev1connect.CoreServiceClient, logger *zap.Logger) *ETLService
func (*ETLService) GetBlockPubsub ¶
func (e *ETLService) GetBlockPubsub() *BlockPubsub
GetBlockPubsub returns the block pubsub instance
func (*ETLService) GetBlocks ¶
func (e *ETLService) GetBlocks(context.Context, *connect.Request[v1.GetBlocksRequest]) (*connect.Response[v1.GetBlocksResponse], error)
GetBlocks implements v1connect.ETLServiceHandler.
func (*ETLService) GetDB ¶
func (e *ETLService) GetDB() *db.Queries
func (*ETLService) GetHealth ¶
func (e *ETLService) GetHealth(context.Context, *connect.Request[v1.GetHealthRequest]) (*connect.Response[v1.GetHealthResponse], error)
GetHealth implements v1connect.ETLServiceHandler.
func (*ETLService) GetLocation ¶
func (e *ETLService) GetLocation(context.Context, *connect.Request[v1.GetLocationRequest]) (*connect.Response[v1.GetLocationResponse], error)
GetLocation implements v1connect.ETLServiceHandler.
func (*ETLService) GetLocationDB ¶
func (e *ETLService) GetLocationDB() *location.LocationService
GetLocationDB returns the location service instance
func (*ETLService) GetManageEntities ¶
func (e *ETLService) GetManageEntities(context.Context, *connect.Request[v1.GetManageEntitiesRequest]) (*connect.Response[v1.GetManageEntitiesResponse], error)
GetManageEntities implements v1connect.ETLServiceHandler.
func (*ETLService) GetPlayPubsub ¶
func (e *ETLService) GetPlayPubsub() *PlayPubsub
GetPlayPubsub returns the play pubsub instance
func (*ETLService) GetPlays ¶
func (e *ETLService) GetPlays(context.Context, *connect.Request[v1.GetPlaysRequest]) (*connect.Response[v1.GetPlaysResponse], error)
GetPlays implements v1connect.ETLServiceHandler.
func (*ETLService) GetTransactions ¶
func (e *ETLService) GetTransactions(context.Context, *connect.Request[v1.GetTransactionsRequest]) (*connect.Response[v1.GetTransactionsResponse], error)
GetTransactions implements v1connect.ETLServiceHandler.
func (*ETLService) GetValidators ¶
func (e *ETLService) GetValidators(context.Context, *connect.Request[v1.GetValidatorsRequest]) (*connect.Response[v1.GetValidatorsResponse], error)
GetValidators implements v1connect.ETLServiceHandler.
func (*ETLService) InitializeChainID ¶
func (e *ETLService) InitializeChainID(ctx context.Context) error
InitializeChainID fetches and caches the chain ID from the core service
func (*ETLService) Ping ¶
func (e *ETLService) Ping(context.Context, *connect.Request[v1.PingRequest]) (*connect.Response[v1.PingResponse], error)
Ping implements v1connect.ETLServiceHandler.
func (*ETLService) Run ¶
func (etl *ETLService) Run() error
func (*ETLService) SetCheckReadiness ¶
func (e *ETLService) SetCheckReadiness(checkReadiness bool)
func (*ETLService) SetDBURL ¶
func (e *ETLService) SetDBURL(dbURL string)
func (*ETLService) SetEndingBlockHeight ¶
func (e *ETLService) SetEndingBlockHeight(endingBlockHeight int64)
func (*ETLService) SetRunDownMigrations ¶
func (e *ETLService) SetRunDownMigrations(runDownMigrations bool)
func (*ETLService) SetStartingBlockHeight ¶
func (e *ETLService) SetStartingBlockHeight(startingBlockHeight int64)
type MaterializedViewRefresher ¶
type MaterializedViewRefresher struct {
// contains filtered or unexported fields
}
MaterializedViewRefresher refreshes dashboard materialized views periodically
func NewMaterializedViewRefresher ¶
func NewMaterializedViewRefresher(database db.DBTX, logger *zap.Logger) *MaterializedViewRefresher
NewMaterializedViewRefresher creates a new refresher service
func (*MaterializedViewRefresher) Start ¶
func (r *MaterializedViewRefresher) Start(ctx context.Context) error
Start begins the periodic refresh cycle (every 2 minutes) This method blocks and should be run in a goroutine (e.g., via errgroup)
func (*MaterializedViewRefresher) Stop ¶
func (r *MaterializedViewRefresher) Stop()
Stop stops the refresher
type PlayPubsub ¶
type Pubsub ¶
type Pubsub[Message any] struct { // contains filtered or unexported fields }
func (*Pubsub[Message]) HasSubscribers ¶
HasSubscribers checks if there are any active subscribers for a topic
func (*Pubsub[Message]) Subscribe ¶
Subscribe subscribes to a specific topic and returns a channel to receive messages.
func (*Pubsub[Message]) Unsubscribe ¶
Unsubscribe removes a subscriber from a topic and closes the channel.
type StorageProofEntry ¶
type StorageProofState ¶
type StorageProofState struct {
Height int64
Proofs map[string]*StorageProofEntry // address -> proof entry
ProverAddresses map[string]int // address -> vote count for who should be provers
Resolved bool
}
StorageProofState tracks storage proof challenges and their resolution