Documentation ¶
Index ¶
- Constants
- Variables
- func BlockToSequence(syncable *model.Syncable, blockParsedData ParsedBlockData) (*model.BlockSeq, error)
- func DebondingDelegationToSequence(syncable *model.Syncable, rawState *statepb.State) ([]model.DebondingDelegationSeq, error)
- func DelegationToSequence(syncable *model.Syncable, rawState *statepb.State) ([]model.DelegationSeq, error)
- func NewAccountAggCreatorTask(db AccountAggCreatorTaskStore) *accountAggCreatorTask
- func NewBackfillSource(cfg *config.Config, db BackfillSourceStore, civ int64) (*backfillSource, error)
- func NewBalanceEventPersistorTask(db BalanceEventPersistorTaskStore) pipeline.Task
- func NewBalanceParserTask() *balanceParserTask
- func NewBlockFetcherTask(client client.BlockClient) pipeline.Task
- func NewBlockParserTask() *blockParserTask
- func NewBlockSeqCreatorTask(db BlockSeqCreatorTaskStore) *blockSeqCreatorTask
- func NewBlockSeqPersistorTask(db BlockSeqPersistorTaskStore) pipeline.Task
- func NewConfigParser(file string) (*configParser, error)
- func NewDebondingDelegationsSeqCreatorTask(db DebondingDelegationSeqCreatorTaskStore) *debondingDelegationSeqCreatorTask
- func NewDelegationsSeqCreatorTask(db DelegationSeqCreatorTaskStore) *delegationSeqCreatorTask
- func NewEventsFetcherTask(client client.EventClient) pipeline.Task
- func NewHeightMetaRetrieverTask(c client.ChainClient) pipeline.Task
- func NewIndexSource(cfg *config.Config, db SourceIndexStore, client client.ChainClient, ...) (*indexSource, error)
- func NewLogger() pipeline.Logger
- func NewMainSyncerTask(db SyncerTaskStore) pipeline.Task
- func NewPayloadFactory(constants *chainpb.GetConstantsResponse) *payloadFactory
- func NewPipeline(cfg *config.Config, db *store.Store, client *client.Client) (*indexingPipeline, error)
- func NewReindexSource(cfg *config.Config, db ReindexSourceStore, startHeight, endHeight int64) (*reindexSource, error)
- func NewSink(db *store.Store, versionNumber int64) *sink
- func NewStakingSeqCreatorTask(db StakingSeqCreatorTaskStore) *stakingSeqCreatorTask
- func NewStakingStateFetcherTask(client client.StateClient) pipeline.Task
- func NewStateFetcherTask(client client.StateClient) pipeline.Task
- func NewSyncerPersistorTask(db SyncerPersistorTaskStore) pipeline.Task
- func NewSystemEventCreatorTask(cfg *config.Config, s SystemEventCreatorStore) *systemEventCreatorTask
- func NewSystemEventPersistorTask(db SystemEventPersistorTaskStore) pipeline.Task
- func NewTransactionFetcherTask(client client.TransactionClient) pipeline.Task
- func NewTransactionSeqCreatorTask(db TransactionSeqCreatorTaskStore) *transactionSeqCreatorTask
- func NewValidatorAggCreatorTask(db ValidatorAggCreatorTaskStore) *validatorAggCreatorTask
- func NewValidatorAggPersistorTask(db ValidatorAggPersistorTaskStore) pipeline.Task
- func NewValidatorFetcherTask(client client.ValidatorClient) pipeline.Task
- func NewValidatorSeqCreatorTask(db ValidatorSeqCreatorTaskStore) *validatorSeqCreatorTask
- func NewValidatorSeqPersistorTask(db ValidatorSeqPersistorTaskStore) pipeline.Task
- func NewValidatorsParserTask() *validatorsParserTask
- func StakingToSequence(syncable *model.Syncable, rawStaking *statepb.Staking) (*model.StakingSeq, error)
- func TransactionToSequence(syncable *model.Syncable, rawTransactions []*transactionpb.Transaction) ([]model.TransactionSeq, error)
- func ValidatorToSequence(syncable *model.Syncable, rawValidators []*validatorpb.Validator, ...) ([]model.ValidatorSeq, error)
- type AccountAggCreatorTaskStore
- type BackfillConfig
- type BackfillSourceStore
- type BalanceEventPersistorTaskStore
- type BlockFetcherTask
- type BlockSeqCreatorTaskStore
- type BlockSeqPersistorTaskStore
- type ConfigParser
- type DebondingDelegationSeqCreatorTaskStore
- type DelegationSeqCreatorTaskStore
- type EventsFetcherTask
- type HeightMeta
- type IndexConfig
- type ParsedBlockData
- type ParsedValidatorsData
- type ReindexConfig
- type ReindexSourceStore
- type RunConfig
- type SourceIndexStore
- type StakingSeqCreatorTaskStore
- type StakingStateFetcherTask
- type StateFetcherTask
- type SyncerPersistorTaskStore
- type SyncerTaskStore
- type SystemEventCreatorStore
- type SystemEventPersistorTaskStore
- type TransactionFetcherTask
- type TransactionSeqCreatorTaskStore
- type ValidatorAggCreatorTaskStore
- type ValidatorAggPersistorTaskStore
- type ValidatorFetcherTask
- type ValidatorSeqCreatorTaskStore
- type ValidatorSeqPersistorTaskStore
Constants ¶
View Source
const ( TaskNameAccountAggCreator = "AccountAggCreator" TaskNameValidatorAggCreator = "ValidatorAggCreator" )
View Source
const ( IndexTargetBlockSequences = iota + 1 IndexTargetValidatorSequences IndexTargetValidatorAggregates IndexTargetSystemEvents IndexValidatorRewards IndexBalanceEvents )
View Source
const ( TaskNameBlockFetcher = "BlockFetcher" TaskNameTransactionFetcher = "TransactionFetcher" TaskNameEventFetcher = "EventsFetcher" TaskNameStateFetcher = "StateFetcher" TaskNameStakingStateFetcher = "StakingStateFetcher" TaskNameValidatorFetcher = "ValidatorFetcher" )
View Source
const ( TaskNameBlockParser = "BlockParser" TaskNameValidatorsParser = "ValidatorsParser" TaskNameBalanceParser = "BalanceParser" )
View Source
const ( TaskNameBalanceEventPersistor = "BalanceEventPersistor" TaskNameSyncerPersistor = "SyncerPersistor" TaskNameBlockSeqPersistor = "BlockSeqPersistor" TaskNameValidatorSeqPersistor = "ValidatorSeqPersistor" TaskNameValidatorAggPersistor = "ValidatorAggPersistor" TaskNameSystemEventPersistor = "SystemEventPersistor" )
View Source
const ( CtxReport = "context_report" StageAnalyzer = "AnalyzerStage" )
View Source
const ( TaskNameBlockSeqCreator = "BlockSeqCreator" TaskNameValidatorSeqCreator = "ValidatorSeqCreator" TaskNameTransactionSeqCreator = "TransactionSeqCreator" TaskNameStakingSeqCreator = "StakingSeqCreator" TaskNameDelegationSeqCreator = "DelegationSeqCreator" TaskNameDebondingDelegationSeqCreator = "DebondingDelegationSeqCreator" )
View Source
const (
TaskNameHeightMetaRetriever = "HeightMetaRetriever"
)
View Source
const (
TaskNameMainSyncer = "MainSyncer"
)
View Source
const (
TaskNameSystemEventCreator = "SystemEventCreator"
)
Variables ¶
View Source
var ( ErrActiveEscrowBalanceOutsideOfRange = errors.New("active escrow balance is outside of specified buckets") ErrCommissionOutsideOfRange = errors.New("commission is outside of specified buckets") MaxValidatorSequences int64 = 1000 MissedForMaxThreshold int64 = 50 MissedInRowThreshold int64 = 50 )
View Source
var ( ErrIsPristine = errors.New("cannot run because database is empty") ErrIndexCannotBeRun = errors.New("cannot run index process") ErrBackfillCannotBeRun = errors.New("cannot run backfill process") )
View Source
var (
ErrAccountAggNotValid = errors.New("account aggregator not valid")
)
View Source
var (
ErrNothingToBackfill = errors.New("nothing to backfill")
)
View Source
var (
ErrNothingToProcess = errors.New("nothing to process")
)
Functions ¶
func BlockToSequence ¶
func DelegationToSequence ¶
func NewAccountAggCreatorTask ¶
func NewAccountAggCreatorTask(db AccountAggCreatorTaskStore) *accountAggCreatorTask
func NewBackfillSource ¶ added in v0.4.2
func NewBackfillSource(cfg *config.Config, db BackfillSourceStore, civ int64) (*backfillSource, error)
func NewBalanceEventPersistorTask ¶ added in v0.6.0
func NewBalanceEventPersistorTask(db BalanceEventPersistorTaskStore) pipeline.Task
func NewBalanceParserTask ¶ added in v0.6.0
func NewBalanceParserTask() *balanceParserTask
func NewBlockFetcherTask ¶
func NewBlockFetcherTask(client client.BlockClient) pipeline.Task
func NewBlockParserTask ¶ added in v0.4.0
func NewBlockParserTask() *blockParserTask
func NewBlockSeqCreatorTask ¶
func NewBlockSeqCreatorTask(db BlockSeqCreatorTaskStore) *blockSeqCreatorTask
func NewBlockSeqPersistorTask ¶ added in v0.4.2
func NewBlockSeqPersistorTask(db BlockSeqPersistorTaskStore) pipeline.Task
func NewConfigParser ¶ added in v0.5.0
func NewDebondingDelegationsSeqCreatorTask ¶
func NewDebondingDelegationsSeqCreatorTask(db DebondingDelegationSeqCreatorTaskStore) *debondingDelegationSeqCreatorTask
func NewDelegationsSeqCreatorTask ¶
func NewDelegationsSeqCreatorTask(db DelegationSeqCreatorTaskStore) *delegationSeqCreatorTask
func NewEventsFetcherTask ¶ added in v0.5.2
func NewEventsFetcherTask(client client.EventClient) pipeline.Task
func NewHeightMetaRetrieverTask ¶
func NewHeightMetaRetrieverTask(c client.ChainClient) pipeline.Task
func NewIndexSource ¶ added in v0.4.2
func NewIndexSource(cfg *config.Config, db SourceIndexStore, client client.ChainClient, startHeight int64, batchSize int64) (*indexSource, error)
func NewMainSyncerTask ¶
func NewMainSyncerTask(db SyncerTaskStore) pipeline.Task
func NewPayloadFactory ¶
func NewPayloadFactory(constants *chainpb.GetConstantsResponse) *payloadFactory
func NewPipeline ¶
func NewReindexSource ¶ added in v0.9.0
func NewReindexSource(cfg *config.Config, db ReindexSourceStore, startHeight, endHeight int64) (*reindexSource, error)
func NewStakingSeqCreatorTask ¶
func NewStakingSeqCreatorTask(db StakingSeqCreatorTaskStore) *stakingSeqCreatorTask
func NewStakingStateFetcherTask ¶ added in v0.4.0
func NewStakingStateFetcherTask(client client.StateClient) pipeline.Task
func NewStateFetcherTask ¶
func NewStateFetcherTask(client client.StateClient) pipeline.Task
func NewSyncerPersistorTask ¶ added in v0.4.2
func NewSyncerPersistorTask(db SyncerPersistorTaskStore) pipeline.Task
func NewSystemEventCreatorTask ¶ added in v0.5.0
func NewSystemEventCreatorTask(cfg *config.Config, s SystemEventCreatorStore) *systemEventCreatorTask
NewSystemEventCreatorTask creates system events
func NewSystemEventPersistorTask ¶ added in v0.5.0
func NewSystemEventPersistorTask(db SystemEventPersistorTaskStore) pipeline.Task
func NewTransactionFetcherTask ¶
func NewTransactionFetcherTask(client client.TransactionClient) pipeline.Task
func NewTransactionSeqCreatorTask ¶
func NewTransactionSeqCreatorTask(db TransactionSeqCreatorTaskStore) *transactionSeqCreatorTask
func NewValidatorAggCreatorTask ¶
func NewValidatorAggCreatorTask(db ValidatorAggCreatorTaskStore) *validatorAggCreatorTask
func NewValidatorAggPersistorTask ¶ added in v0.4.2
func NewValidatorAggPersistorTask(db ValidatorAggPersistorTaskStore) pipeline.Task
func NewValidatorFetcherTask ¶
func NewValidatorFetcherTask(client client.ValidatorClient) pipeline.Task
func NewValidatorSeqCreatorTask ¶
func NewValidatorSeqCreatorTask(db ValidatorSeqCreatorTaskStore) *validatorSeqCreatorTask
func NewValidatorSeqPersistorTask ¶ added in v0.4.2
func NewValidatorSeqPersistorTask(db ValidatorSeqPersistorTaskStore) pipeline.Task
func NewValidatorsParserTask ¶ added in v0.4.0
func NewValidatorsParserTask() *validatorsParserTask
func StakingToSequence ¶
func TransactionToSequence ¶
func TransactionToSequence(syncable *model.Syncable, rawTransactions []*transactionpb.Transaction) ([]model.TransactionSeq, error)
func ValidatorToSequence ¶
func ValidatorToSequence(syncable *model.Syncable, rawValidators []*validatorpb.Validator, parsedValidators ParsedValidatorsData) ([]model.ValidatorSeq, error)
Types ¶
type AccountAggCreatorTaskStore ¶ added in v0.5.2
type BackfillConfig ¶ added in v0.4.2
type BackfillSourceStore ¶ added in v0.5.2
type BalanceEventPersistorTaskStore ¶ added in v0.6.0
type BalanceEventPersistorTaskStore interface {
CreateOrUpdate(*model.BalanceEvent) error
}
type BlockFetcherTask ¶
type BlockFetcherTask struct {
// contains filtered or unexported fields
}
func (*BlockFetcherTask) GetName ¶ added in v0.4.0
func (t *BlockFetcherTask) GetName() string
type BlockSeqCreatorTaskStore ¶ added in v0.5.2
type BlockSeqPersistorTaskStore ¶ added in v0.5.2
type ConfigParser ¶ added in v0.5.0
type ConfigParser interface { GetCurrentVersionId() int64 GetAllVersionedVersionIds() []int64 IsAnyVersionSequential(versionIds []int64) bool GetAllAvailableTasks() []pipeline.TaskName GetAllVersionedTasks() ([]pipeline.TaskName, error) GetTasksByVersionIds([]int64) ([]pipeline.TaskName, error) GetTasksByTargetIds([]int64) ([]pipeline.TaskName, error) }
type DebondingDelegationSeqCreatorTaskStore ¶ added in v0.5.2
type DebondingDelegationSeqCreatorTaskStore interface { Create(record interface{}) error FindByHeight(h int64) ([]model.DebondingDelegationSeq, error) }
type DelegationSeqCreatorTaskStore ¶ added in v0.5.2
type DelegationSeqCreatorTaskStore interface { Create(record interface{}) error FindByHeight(h int64) ([]model.DelegationSeq, error) }
type EventsFetcherTask ¶ added in v0.5.2
type EventsFetcherTask struct {
// contains filtered or unexported fields
}
func (*EventsFetcherTask) GetName ¶ added in v0.5.2
func (t *EventsFetcherTask) GetName() string
type HeightMeta ¶
type IndexConfig ¶ added in v0.5.0
type ParsedBlockData ¶
type ParsedValidatorsData ¶
type ParsedValidatorsData map[string]parsedValidator
type ReindexConfig ¶ added in v0.9.0
type ReindexSourceStore ¶ added in v0.9.0
type SourceIndexStore ¶ added in v0.5.2
type StakingSeqCreatorTaskStore ¶ added in v0.5.2
type StakingSeqCreatorTaskStore interface { Create(record interface{}) error FindByHeight(height int64) (*model.StakingSeq, error) }
type StakingStateFetcherTask ¶ added in v0.4.0
type StakingStateFetcherTask struct {
// contains filtered or unexported fields
}
func (*StakingStateFetcherTask) GetName ¶ added in v0.4.0
func (t *StakingStateFetcherTask) GetName() string
type StateFetcherTask ¶
type StateFetcherTask struct {
// contains filtered or unexported fields
}
func (*StateFetcherTask) GetName ¶ added in v0.4.0
func (t *StateFetcherTask) GetName() string
type SyncerPersistorTaskStore ¶ added in v0.5.2
type SyncerTaskStore ¶ added in v0.5.2
type SystemEventCreatorStore ¶ added in v0.5.0
type SystemEventCreatorStore interface { FindByHeight(int64) ([]model.ValidatorSeq, error) FindLastByAddress(string, int64) ([]model.ValidatorSeq, error) }
type SystemEventPersistorTaskStore ¶ added in v0.5.2
type SystemEventPersistorTaskStore interface {
CreateOrUpdate(*model.SystemEvent) error
}
type TransactionFetcherTask ¶
type TransactionFetcherTask struct {
// contains filtered or unexported fields
}
func (*TransactionFetcherTask) GetName ¶ added in v0.4.0
func (t *TransactionFetcherTask) GetName() string
type TransactionSeqCreatorTaskStore ¶ added in v0.5.2
type TransactionSeqCreatorTaskStore interface { Create(record interface{}) error FindByHeight(h int64) ([]model.TransactionSeq, error) }
type ValidatorAggCreatorTaskStore ¶ added in v0.5.2
type ValidatorAggCreatorTaskStore interface {
FindByEntityUID(key string) (*model.ValidatorAgg, error)
}
type ValidatorAggPersistorTaskStore ¶ added in v0.5.2
type ValidatorFetcherTask ¶
type ValidatorFetcherTask struct {
// contains filtered or unexported fields
}
func (*ValidatorFetcherTask) GetName ¶ added in v0.4.0
func (t *ValidatorFetcherTask) GetName() string
type ValidatorSeqCreatorTaskStore ¶ added in v0.5.2
type ValidatorSeqCreatorTaskStore interface {
FindByHeightAndEntityUID(h int64, key string) (*model.ValidatorSeq, error)
}
type ValidatorSeqPersistorTaskStore ¶ added in v0.5.2
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
- sequencer_tasks.go
- setup_tasks.go
- sink.go
- source_backfill.go
- source_index.go
- source_reindex.go
- syncer_tasks.go
Click to show internal directories.
Click to hide internal directories.