Documentation ¶
Index ¶
- Constants
- Variables
- func NewAccountEraSeqCreatorTask(cfg *config.Config, accountEraSeqDb store.AccountEraSeq, ...) *accountEraSeqCreatorTask
- func NewAccountEraSeqPersistorTask(accountEraSeqDb store.AccountEraSeq) pipeline.Task
- func NewBackfillSource(cfg *config.Config, syncablesDb store.Syncables, client *client.Client, ...) (*backfillSource, error)
- func NewBlockParserTask() *blockParserTask
- func NewBlockSeqCreatorTask(blockSeqDb store.BlockSeq) *blockSeqCreatorTask
- func NewBlockSeqPersistorTask(blockSeqDb store.BlockSeq) pipeline.Task
- func NewConfigParser(file string) (*configParser, error)
- func NewEraSystemEventCreatorTask(cfg *config.Config, accountEraSeqDb store.AccountEraSeq, ...) *eraSystemEventCreatorTask
- func NewEventSeqCreatorTask(eventSeqDb store.EventSeq) *eventSeqCreatorTask
- func NewEventSeqPersistorTask(eventSeqDb store.EventSeq) pipeline.Task
- func NewFetcherTask(client FetcherClient) pipeline.Task
- func NewIndexSource(cfg *config.Config, syncablesDb store.Syncables, client *client.Client, ...) (*indexSource, error)
- func NewLogger() pipeline.Logger
- func NewMainSyncerTask(syncablesDb store.Syncables) pipeline.Task
- func NewPayloadFactory() *payloadFactory
- func NewPipeline(cfg *config.Config, cli *client.Client, accountDb store.Accounts, ...) (*indexingPipeline, error)
- func NewRewardEraSeqCreatorTask(cfg *config.Config, syncablesDb store.Syncables) *rewardEraSeqCreatorTask
- func NewRewardEraSeqPersistorTask(rewardsDb store.Rewards) pipeline.Task
- func NewSessionSystemEventCreatorTask(cfg *config.Config, syncablesDb store.Syncables, ...) *sessionSystemEventCreatorTask
- func NewSink(databaseDb store.Database, syncablesDb store.Syncables, versionNumber int64) *sink
- func NewSyncerPersistorTask(syncablesDb store.Syncables) pipeline.Task
- func NewSystemEventCreatorTask(cfg *config.Config, validatorSeqDb store.ValidatorSeq) *systemEventCreatorTask
- func NewSystemEventPersistorTask(systemEventDb store.SystemEvents) pipeline.Task
- func NewTransactionSeqCreatorTask(transactionSeqDb store.TransactionSeq) *transactionSeqCreatorTask
- func NewTransactionSeqPersistorTask(transactionSeqDb store.TransactionSeq) pipeline.Task
- func NewValidatorAggCreatorTask(validatorAggDb store.ValidatorAgg) *validatorAggCreatorTask
- func NewValidatorAggPersistorTask(validatorAggDb store.ValidatorAgg) pipeline.Task
- func NewValidatorEraSeqCreatorTask(cfg *config.Config, syncablesDb store.Syncables, ...) *validatorEraSeqCreatorTask
- func NewValidatorEraSeqPersistorTask(validatorEraSeqDb store.ValidatorEraSeq) pipeline.Task
- func NewValidatorFetcherTask(client client.ValidatorClient) pipeline.Task
- func NewValidatorSeqCreatorTask(validatorSeqDb store.ValidatorSeq) *validatorSeqCreatorTask
- func NewValidatorSeqPersistorTask(ValidatorSeqDb store.ValidatorSeq) pipeline.Task
- func NewValidatorSessionSeqCreatorTask(cfg *config.Config, syncablesDb store.Syncables, ...) *validatorSessionSeqCreatorTask
- func NewValidatorSessionSeqPersistorTask(validatorSessionSeqDb store.ValidatorSessionSeq) pipeline.Task
- func NewValidatorsParserTask(cfg *config.Config, accountClient client.AccountClient, ...) *validatorsParserTask
- func ToAccountEraSequence(syncable *model.Syncable, firstHeight int64, ...) ([]model.AccountEraSeq, error)
- func ToBlockSequence(syncable *model.Syncable, rawBlock *blockpb.Block, ...) (*model.BlockSeq, error)
- func ToEventSequence(syncable *model.Syncable, rawEvents []*eventpb.Event) ([]model.EventSeq, error)
- func ToTransactionSequence(syncable *model.Syncable, rawTransactions []*transactionpb.Annotated) ([]model.TransactionSeq, error)
- func ToValidatorEraSequence(syncable *model.Syncable, firstHeight int64, ...) ([]model.ValidatorEraSeq, error)
- func ToValidatorSequence(syncable *model.Syncable, rawValidators []*validatorpb.Validator) ([]model.ValidatorSeq, error)
- func ToValidatorSessionSequence(syncable *model.Syncable, firstHeight int64, ...) ([]model.ValidatorSessionSeq, error)
- type BackfillConfig
- type ConfigParser
- type FetcherClient
- type FetcherTask
- type HeightMeta
- type IndexConfig
- type IndexSourceConfig
- type ParsedBlockData
- type ParsedValidatorsData
- type RewardEraSeqPersistorTask
- type RewardsCalculator
- type RewardsClaim
- type RunConfig
- type ValidatorFetcherTask
Constants ¶
const ( TaskNameEraSystemEventCreator = "EraSystemEventCreator" TaskNameSessionSystemEventCreator = "SessionSystemEventCreator" TaskNameSystemEventCreator = "SystemEventCreator" )
const ( TargetIndexBlockSequences = iota + 1 TargetIndexValidatorSessionSequences TargetIndexValidatorEraSequences TargetIndexValidatorAggregates TargetIndexEventSequences )
const ( FetcherTaskName = "Fetcher" ValidatorFetcherTaskName = "ValidatorFetcher" )
const ( BlockParserTaskName = "BlockParser" ValidatorsParserTaskName = "ValidatorsParser" )
const ( SyncerPersistorTaskName = "SyncerPersistor" BlockSeqPersistorTaskName = "BlockSeqPersistor" ValidatorSessionSeqPersistorTaskName = "ValidatorSessionSeqPersistor" ValidatorEraSeqPersistorTaskName = "ValidatorEraSeqPersistor" ValidatorAggPersistorTaskName = "ValidatorAggPersistor" EventSeqPersistorTaskName = "EventSeqPersistor" AccountEraSeqPersistorTaskName = "AccountEraSeqPersistor" TransactionSeqPersistorTaskName = "TransactionSeqPersistor" ValidatorSeqPersistorTaskName = "ValidatorSeqPersistor" SystemEventPersistorTaskName = "SystemEventPersistor" RewardEraSeqPersistorTaskName = "RewardEraSeqPersistor" )
const ( CtxReport = "context_report" StageAnalyzer = "AnalyzerStage" )
const ( BlockSeqCreatorTaskName = "BlockSeqCreator" ValidatorSeqCreatorTaskName = "ValidatorSeqCreator" ValidatorSessionSeqCreatorTaskName = "ValidatorSessionSeqCreator" ValidatorEraSeqCreatorTaskName = "ValidatorEraSeqCreator" EventSeqCreatorTaskName = "EventSeqCreator" AccountEraSeqCreatorTaskName = "AccountEraSeqCreator" TransactionSeqCreatorTaskName = "TransactionSeqCreator" RewardEraSeqCreatorTaskName = "RewardEraSeqCreator" ClaimedRewardEraSeqCreatorTaskName = "ClaimedRewardEraSeqCreator" )
const (
MainSyncerTaskName = "MainSyncer"
)
const (
ValidatorAggCreatorTaskName = "ValidatorAggCreator"
)
Variables ¶
var ( ErrActiveBalanceOutsideOfRange = errors.New("active balance is outside of specified buckets") ErrCommissionOutsideOfRange = errors.New("commission is outside of specified buckets") )
var ( ErrBlockSequenceNotValid = errors.New("block sequence not valid") ErrValidatorSequenceNotValid = errors.New("validator sequence not valid") ErrValidatorSessionSequenceNotValid = errors.New("validator session sequence not valid") ErrValidatorEraSequenceNotValid = errors.New("validator era sequence not valid") ErrAccountEraSequenceNotValid = errors.New("account era sequence not valid") ErrEventSequenceNotValid = errors.New("event sequence not valid") ErrTransactionSequenceNotValid = errors.New("transaction sequence not valid") )
var ( ErrIsPristine = errors.New("cannot run because database is empty") ErrIndexCannotBeRun = errors.New("cannot run index process") ErrBackfillCannotBeRun = errors.New("cannot run backfill process") )
var (
ErrNothingToProcess = errors.New("nothing to process")
)
Functions ¶
func NewAccountEraSeqCreatorTask ¶ added in v0.3.0
func NewAccountEraSeqCreatorTask(cfg *config.Config, accountEraSeqDb store.AccountEraSeq, syncablesDb store.Syncables) *accountEraSeqCreatorTask
NewAccountEraSeqCreatorTask creates account era sequences
func NewAccountEraSeqPersistorTask ¶ added in v0.3.0
func NewAccountEraSeqPersistorTask(accountEraSeqDb store.AccountEraSeq) pipeline.Task
NewAccountEraSeqPersistorTask is responsible for storing account era info to persistence layer
func NewBackfillSource ¶
func NewBlockParserTask ¶
func NewBlockParserTask() *blockParserTask
func NewBlockSeqCreatorTask ¶
NewBlockSeqCreatorTask creates block sequences
func NewBlockSeqPersistorTask ¶
NewBlockSeqPersistorTask is responsible for storing block to persistence layer
func NewConfigParser ¶ added in v0.2.0
func NewEraSystemEventCreatorTask ¶ added in v0.5.0
func NewEraSystemEventCreatorTask(cfg *config.Config, accountEraSeqDb store.AccountEraSeq, validatorEraSeqDb store.ValidatorEraSeq) *eraSystemEventCreatorTask
NewEraSystemEventCreatorTask creates system events
func NewEventSeqCreatorTask ¶ added in v0.1.2
NewEventSeqCreatorTask creates block sequences
func NewEventSeqPersistorTask ¶ added in v0.1.2
NewEventSeqPersistorTask is responsible for storing events info to persistence layer
func NewFetcherTask ¶ added in v0.1.2
func NewFetcherTask(client FetcherClient) pipeline.Task
func NewIndexSource ¶
func NewPayloadFactory ¶
func NewPayloadFactory() *payloadFactory
func NewPipeline ¶
func NewPipeline(cfg *config.Config, cli *client.Client, accountDb store.Accounts, blockDb store.Blocks, databaseDb store.Database, eventDb store.Events, reportDb store.Reports, rewardDb store.Rewards, syncableDb store.Syncables, systemEventDb store.SystemEvents, transactionDb store.Transactions, validatorDb store.Validators, ) (*indexingPipeline, error)
func NewRewardEraSeqCreatorTask ¶ added in v0.6.0
func NewRewardEraSeqCreatorTask(cfg *config.Config, syncablesDb store.Syncables) *rewardEraSeqCreatorTask
NewRewardEraSeqCreatorTask creates rewards
func NewRewardEraSeqPersistorTask ¶ added in v0.6.0
func NewSessionSystemEventCreatorTask ¶ added in v0.5.0
func NewSessionSystemEventCreatorTask(cfg *config.Config, syncablesDb store.Syncables, systemEventDb store.SystemEvents, validatorSeqDb store.ValidatorSeq, validatorSessionSeqDb store.ValidatorSessionSeq, ) *sessionSystemEventCreatorTask
NewSessionSystemEventCreatorTask creates system events
func NewSyncerPersistorTask ¶
NewSyncerPersistorTask is responsible for storing syncable to persistence layer
func NewSystemEventCreatorTask ¶ added in v0.5.0
func NewSystemEventCreatorTask(cfg *config.Config, validatorSeqDb store.ValidatorSeq) *systemEventCreatorTask
NewSystemEventCreatorTask creates system events
func NewSystemEventPersistorTask ¶ added in v0.5.0
func NewSystemEventPersistorTask(systemEventDb store.SystemEvents) pipeline.Task
func NewTransactionSeqCreatorTask ¶ added in v0.4.4
func NewTransactionSeqCreatorTask(transactionSeqDb store.TransactionSeq) *transactionSeqCreatorTask
NewTransactionSeqCreatorTask creates block sequences
func NewTransactionSeqPersistorTask ¶ added in v0.4.4
func NewTransactionSeqPersistorTask(transactionSeqDb store.TransactionSeq) pipeline.Task
NewTransactionSeqPersistorTask is responsible for storing transaction info to persistence layer
func NewValidatorAggCreatorTask ¶ added in v0.1.2
func NewValidatorAggCreatorTask(validatorAggDb store.ValidatorAgg) *validatorAggCreatorTask
func NewValidatorAggPersistorTask ¶ added in v0.1.2
func NewValidatorAggPersistorTask(validatorAggDb store.ValidatorAgg) pipeline.Task
func NewValidatorEraSeqCreatorTask ¶ added in v0.1.2
func NewValidatorEraSeqCreatorTask(cfg *config.Config, syncablesDb store.Syncables, validatorEraSeqDb store.ValidatorEraSeq) *validatorEraSeqCreatorTask
NewValidatorEraSeqCreatorTask creates validator era sequences
func NewValidatorEraSeqPersistorTask ¶ added in v0.1.2
func NewValidatorEraSeqPersistorTask(validatorEraSeqDb store.ValidatorEraSeq) pipeline.Task
NewValidatorEraSeqPersistorTask is responsible for storing validator era info to persistence layer
func NewValidatorFetcherTask ¶ added in v0.5.0
func NewValidatorFetcherTask(client client.ValidatorClient) pipeline.Task
func NewValidatorSeqCreatorTask ¶ added in v0.5.0
func NewValidatorSeqCreatorTask(validatorSeqDb store.ValidatorSeq) *validatorSeqCreatorTask
NewValidatorSeqCreatorTask creates validator sequences
func NewValidatorSeqPersistorTask ¶ added in v0.5.0
func NewValidatorSeqPersistorTask(ValidatorSeqDb store.ValidatorSeq) pipeline.Task
NewValidatorSeqPersistorTask is responsible for storing transaction info to persistence layer
func NewValidatorSessionSeqCreatorTask ¶ added in v0.1.2
func NewValidatorSessionSeqCreatorTask(cfg *config.Config, syncablesDb store.Syncables, validatorSessionSeqDb store.ValidatorSessionSeq) *validatorSessionSeqCreatorTask
NewValidatorSessionSeqCreatorTask creates validator session sequences
func NewValidatorSessionSeqPersistorTask ¶ added in v0.1.2
func NewValidatorSessionSeqPersistorTask(validatorSessionSeqDb store.ValidatorSessionSeq) pipeline.Task
NewValidatorSessionSeqPersistorTask is responsible for storing validator session info to persistence layer
func NewValidatorsParserTask ¶ added in v0.1.2
func NewValidatorsParserTask(cfg *config.Config, accountClient client.AccountClient, rewardsDb store.Rewards, syncablesDb store.Syncables, validatorDb store.ValidatorEraSeq) *validatorsParserTask
func ToAccountEraSequence ¶ added in v0.3.0
func ToBlockSequence ¶ added in v0.1.2
func ToEventSequence ¶ added in v0.3.0
func ToTransactionSequence ¶ added in v0.4.4
func ToTransactionSequence(syncable *model.Syncable, rawTransactions []*transactionpb.Annotated) ([]model.TransactionSeq, error)
func ToValidatorEraSequence ¶ added in v0.1.2
func ToValidatorSequence ¶ added in v0.5.0
func ToValidatorSequence(syncable *model.Syncable, rawValidators []*validatorpb.Validator) ([]model.ValidatorSeq, error)
func ToValidatorSessionSequence ¶ added in v0.1.2
func ToValidatorSessionSequence(syncable *model.Syncable, firstHeight int64, rawValidatorPerformance []*validatorperformancepb.Validator) ([]model.ValidatorSessionSeq, error)
Types ¶
type BackfillConfig ¶
type ConfigParser ¶ added in v0.2.0
type ConfigParser interface { GetCurrentVersionId() int64 IsLastInSession() bool IsLastInEra() bool GetTransactionKinds() []model.TransactionKind GetAllVersionedVersionIds() []int64 IsAnyVersionSequential(versionIds []int64) bool GetAllAvailableTasks() []pipeline.TaskName GetAllVersionedTasks() ([]pipeline.TaskName, error) GetTasksByVersionIds([]int64) ([]pipeline.TaskName, error) GetTasksByTargetIds([]int64) ([]pipeline.TaskName, error) }
type FetcherClient ¶ added in v0.1.2
type FetcherClient interface {
GetAll(int64) (*heightpb.GetAllResponse, error)
}
type FetcherTask ¶ added in v0.1.2
type FetcherTask struct {
// contains filtered or unexported fields
}
func (*FetcherTask) GetName ¶ added in v0.1.2
func (t *FetcherTask) GetName() string
type HeightMeta ¶
type IndexConfig ¶ added in v0.2.0
type IndexSourceConfig ¶
type ParsedBlockData ¶
type ParsedValidatorsData ¶ added in v0.1.2
type ParsedValidatorsData map[string]parsedValidator
ParsedValidatorsData normalized validator data
type RewardEraSeqPersistorTask ¶ added in v0.6.0
type RewardEraSeqPersistorTask struct {
// contains filtered or unexported fields
}
func (*RewardEraSeqPersistorTask) GetName ¶ added in v0.6.0
func (t *RewardEraSeqPersistorTask) GetName() string
type RewardsCalculator ¶ added in v0.6.0
type RewardsCalculator interface {
// contains filtered or unexported methods
}
type RewardsClaim ¶ added in v0.6.0
type ValidatorFetcherTask ¶ added in v0.5.0
type ValidatorFetcherTask struct {
// contains filtered or unexported fields
}
func (*ValidatorFetcherTask) GetName ¶ added in v0.5.0
func (t *ValidatorFetcherTask) GetName() string
Source Files ¶
- aggregator_tasks.go
- analyzer_tasks.go
- config_parser.go
- fetcher_tasks.go
- logger.go
- mappers.go
- parser_tasks.go
- payload.go
- persistor_tasks.go
- pipeline.go
- pipeline_options_creator.go
- pipeline_status_checker.go
- report_creator.go
- rewards_calculator.go
- sequencer_tasks.go
- sink.go
- source_backfill.go
- source_index.go
- syncer_tasks.go