Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Indexer ¶
Indexer handles ingestion of new execution data available and uses the execution data indexer module to index the data. The processing of new available data is done by creating a jobqueue that uses the execution data reader to obtain new jobs. The worker also implements the `highestConsecutiveHeight` method which is used by the execution data reader, so it doesn't surpass the highest sealed block height when fetching the data. The execution state worker has a callback that is used by the upstream queues which download new execution data to notify new data is available and kick off indexing.
func NewIndexer ¶
func NewIndexer( log zerolog.Logger, initHeight uint64, registers storage.RegisterIndex, indexer *IndexerCore, executionCache *cache.ExecutionDataCache, executionDataLatestHeight func() (uint64, error), processedHeight storage.ConsumerProgress, ) *Indexer
NewIndexer creates a new execution worker.
func (*Indexer) HighestIndexedHeight ¶
HighestIndexedHeight returns the highest height indexed by the execution indexer.
func (*Indexer) LowestIndexedHeight ¶
LowestIndexedHeight returns the lowest height indexed by the execution indexer.
func (*Indexer) OnExecutionData ¶
func (i *Indexer) OnExecutionData(_ *execution_data.BlockExecutionDataEntity)
OnExecutionData is used to notify when new execution data is downloaded by the execution data requester jobqueue.
func (*Indexer) Start ¶
func (i *Indexer) Start(ctx irrecoverable.SignalerContext)
Start the worker jobqueue to consume the available data.
type IndexerCore ¶
type IndexerCore struct {
// contains filtered or unexported fields
}
IndexerCore indexes the execution state.
func New ¶
func New( log zerolog.Logger, metrics module.ExecutionStateIndexerMetrics, batcher bstorage.BatchBuilder, registers storage.RegisterIndex, headers storage.Headers, events storage.Events, results storage.LightTransactionResults, ) (*IndexerCore, error)
New execution state indexer used to ingest block execution data and index it by height. The passed RegisterIndex storage must be populated to include the first and last height otherwise the indexer won't be initialized to ensure we have bootstrapped the storage first.
func (*IndexerCore) IndexBlockData ¶
func (c *IndexerCore) IndexBlockData(data *execution_data.BlockExecutionDataEntity) error
IndexBlockData indexes all execution block data by height. This method shouldn't be used concurrently. Expected errors: - storage.ErrNotFound if the block for execution data was not found
func (*IndexerCore) RegisterValues ¶
func (c *IndexerCore) RegisterValues(IDs flow.RegisterIDs, height uint64) ([]flow.RegisterValue, error)
RegisterValues retrieves register values by the register IDs at the provided block height. Even if the register wasn't indexed at the provided height, returns the highest height the register was indexed at. Expected errors: - storage.ErrNotFound if the register by the ID was never indexed