Documentation ¶
Index ¶
- Constants
- Variables
- func NewAccountActivitySeqCreatorTask(cfg *config.Config, db *store.Store) *accountActivitySeqCreatorTask
- func NewAccountActivitySeqPersistorTask(db *store.Store) pipeline.Task
- func NewBackfillSource(cfg *config.Config, db *store.Store, client client.Client, indexVersion int64) (*backfillSource, error)
- func NewBlockFetcherTask(client figmentclient.Client) pipeline.Task
- func NewBlockSeqCreatorTask(db *store.Store) *blockSeqCreatorTask
- func NewBlockSeqPersistorTask(db *store.Store) pipeline.Task
- func NewConfigParser(file string) (*configParser, error)
- func NewGovernanceActivitySeqCreatorTask(cfg *config.Config, db *store.Store) *governanceActivitySeqCreatorTask
- func NewGovernanceActivitySeqPersistorTask(db *store.Store) pipeline.Task
- func NewGovernanceLogsParserTask() *governanceLogsParserTask
- func NewHeightMetaRetrieverTask(c figmentclient.Client) *heightMetaRetrieverTask
- func NewIndexSource(cfg *config.Config, db *store.Store, client figmentclient.Client, ...) (*indexSource, error)
- func NewLogger() pipeline.Logger
- func NewMainSyncerTask(db *store.Store) pipeline.Task
- func NewPayloadFactory() *payloadFactory
- func NewPipeline(cfg *config.Config, db *store.Store, client figmentclient.Client) (*indexingPipeline, error)
- func NewProposalAggCreatorTask(db *store.Store) *proposalAggCreatorTask
- func NewProposalAggPersistorTask(db *store.Store) pipeline.Task
- func NewSink(db *store.Store, versionNumber int64) *sink
- func NewSyncerPersistorTask(db *store.Store) pipeline.Task
- func NewSystemEventCreatorTask(cfg *config.Config, db *store.Store) *systemEventCreatorTask
- func NewSystemEventPersistorTask(db *store.Store) pipeline.Task
- func NewTransactionFetcherTask(client figmentclient.Client) pipeline.Task
- func NewValidatorAggCreatorTask(db *store.Store) *validatorAggCreatorTask
- func NewValidatorAggPersistorTask(db *store.Store) pipeline.Task
- func NewValidatorFetcherTask(client figmentclient.Client) pipeline.Task
- func NewValidatorGroupAggCreatorTask(db *store.Store) *validatorGroupAggCreatorTask
- func NewValidatorGroupAggPersistorTask(db *store.Store) pipeline.Task
- func NewValidatorGroupFetcherTask(client figmentclient.Client) pipeline.Task
- func NewValidatorGroupSeqCreatorTask(cfg *config.Config, db *store.Store) *validatorGroupSeqCreatorTask
- func NewValidatorGroupSeqPersistorTask(db *store.Store) pipeline.Task
- func NewValidatorSeqCreatorTask(cfg *config.Config, db *store.Store) *validatorSeqCreatorTask
- func NewValidatorSeqPersistorTask(db *store.Store) pipeline.Task
- func ToAccountActivitySequence(syncable *model.Syncable, rawTransactions []*figmentclient.Transaction) ([]model.AccountActivitySeq, error)
- func ToBlockSequence(syncable *model.Syncable, rawBlock *figmentclient.Block) (*model.BlockSeq, error)
- func ToGovernanceActivitySequence(syncable *model.Syncable, parsedGovernanceLogs []*ParsedGovernanceLogs) ([]model.GovernanceActivitySeq, error)
- func ToValidatorGroupSequence(syncable *model.Syncable, rawValidatorGroups []*figmentclient.ValidatorGroup, ...) ([]model.ValidatorGroupSeq, error)
- func ToValidatorSequence(syncable *model.Syncable, rawValidators []*figmentclient.Validator) ([]model.ValidatorSeq, error)
- type BackfillConfig
- type BlockFetcherTask
- type ConfigParser
- type HeightMeta
- type IndexConfig
- type IndexSourceConfig
- type ParsedGovernanceLogs
- type PipelineSyncableStore
- type ReportStore
- type RunConfig
- type TransactionsFetcherTask
- type ValidatorGroupsFetcherTask
- type ValidatorsFetcherTask
Constants ¶
const ( ValidatorAggCreatorTaskName = "ValidatorAggCreator" ValidatorGroupAggCreatorTaskName = "ValidatorGroupAggCreator" ProposalAggCreatorTaskName = "ProposalAggCreator" )
const ( TargetIndexBlockSequences = iota + 1 TargetIndexValidatorSequences TargetIndexValidatorGroupSequences TargetIndexValidatorAggregates TargetIndexValidatorGroupAggregates )
const ( TaskNameBlockFetcher = "BlockFetcher" TaskNameValidatorsFetcher = "ValidatorsFetcher" TaskNameValidatorGroupsFetcher = "ValidatorGroupsFetcher" TaskNameTransactionsFetcher = "TransactionsFetcher" )
const ( SyncerPersistorTaskName = "SyncerPersistor" BlockSeqPersistorTaskName = "BlockSeqPersistor" ValidatorSeqPersistorTaskName = "ValidatorSeqPersistor" ValidatorGroupSeqPersistorTaskName = "ValidatorGroupSeqPersistor" AccountActivitySeqPersistorTaskName = "AccountActivitySeqPersistor" ValidatorAggPersistorTaskName = "ValidatorAggPersistor" ValidatorGroupAggPersistorTaskName = "ValidatorGroupAggPersistor" ProposalAggPersistorTaskName = "ProposalAggPersistor" TaskNameSystemEventPersistor = "SystemEventPersistor" GovernanceActivitySeqPersistorTaskName = "GovernanceActivitySeqPersistor" )
const ( BlockSeqCreatorTaskName = "BlockSeqCreator" ValidatorSeqCreatorTaskName = "ValidatorSeqCreator" ValidatorGroupSeqCreatorTaskName = "ValidatorGroupSeqCreator" AccountActivitySeqCreatorTaskName = "AccountActivitySeqCreator" GovernanceActivitySeqCreatorTaskName = "GovernanceActivitySeqCreator" )
const (
CtxReport = "context_report"
)
const (
MainSyncerTaskName = "MainSyncer"
)
const (
TaskNameGovernanceLogsParser = "GovernanceLogsParser"
)
const (
TaskNameHeightMetaRetriever = "HeightMetaRetriever"
)
const (
TaskNameSystemEventCreator = "SystemEventCreator"
)
Variables ¶
var ( ErrGroupRewardOutsideOfRange = errors.New("group reward is outside of specified buckets") MaxValidatorSequences int64 = 1000 MissedForMaxThreshold int64 = 50 MissedInRowThreshold int64 = 50 )
var ( OperationTypeInternalTransferReceived = fmt.Sprintf("%sReceived", figmentclient.OperationTypeInternalTransfer) OperationTypeInternalTransferSent = fmt.Sprintf("%sSent", figmentclient.OperationTypeInternalTransfer) OperationTypeValidatorGroupVoteCastReceived = fmt.Sprintf("%sReceived", figmentclient.OperationTypeValidatorGroupVoteCast) OperationTypeValidatorGroupVoteCastSent = fmt.Sprintf("%sSent", figmentclient.OperationTypeValidatorGroupVoteCast) OperationTypeValidatorGroupVoteActivatedReceived = fmt.Sprintf("%sReceived", figmentclient.OperationTypeValidatorGroupVoteActivated) OperationTypeValidatorGroupVoteActivatedSent = fmt.Sprintf("%sSent", figmentclient.OperationTypeValidatorGroupVoteActivated) OperationTypeValidatorGroupPendingVoteRevokedReceived = fmt.Sprintf("%sReceived", figmentclient.OperationTypeValidatorGroupPendingVoteRevoked) OperationTypeValidatorGroupPendingVoteRevokedSent = fmt.Sprintf("%sSent", figmentclient.OperationTypeValidatorGroupPendingVoteRevoked) OperationTypeValidatorGroupActiveVoteRevokedReceived = fmt.Sprintf("%sReceived", figmentclient.OperationTypeValidatorGroupActiveVoteRevoked) OperationTypeValidatorGroupActiveVoteRevokedSent = fmt.Sprintf("%sSent", figmentclient.OperationTypeValidatorGroupActiveVoteRevoked) OperationTypeValidatorEpochPaymentDistributedForGroup = fmt.Sprintf("%sForGroup", figmentclient.OperationTypeValidatorEpochPaymentDistributed) OperationTypeValidatorEpochPaymentDistributedForValidator = fmt.Sprintf("%sForValidator", figmentclient.OperationTypeValidatorEpochPaymentDistributed) ErrBlockSequenceNotValid = errors.New("block sequence not valid") ErrValidatorSequenceNotValid = errors.New("validator sequence not valid") ErrValidatorGroupSequenceNotValid = errors.New("validator group sequence not valid") )
var ( StageAnalyzer pipeline.StageName = "stage_analyzer" 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 NewAccountActivitySeqCreatorTask ¶ added in v0.1.0
func NewAccountActivitySeqCreatorTask(cfg *config.Config, db *store.Store) *accountActivitySeqCreatorTask
NewAccountActivitySeqCreatorTask creates account activity sequences
func NewAccountActivitySeqPersistorTask ¶ added in v0.1.0
NewAccountActivitySeqPersistorTask is responsible for storing validator info to persistence layer
func NewBackfillSource ¶
func NewBlockFetcherTask ¶
func NewBlockFetcherTask(client figmentclient.Client) pipeline.Task
func NewBlockSeqCreatorTask ¶
NewBlockSeqCreatorTask creates block sequences
func NewBlockSeqPersistorTask ¶
NewBlockSeqPersistorTask is responsible for storing block to persistence layer
func NewConfigParser ¶
func NewGovernanceActivitySeqCreatorTask ¶ added in v0.1.0
func NewGovernanceActivitySeqCreatorTask(cfg *config.Config, db *store.Store) *governanceActivitySeqCreatorTask
NewGovernanceActivitySeqCreatorTask creates account activity sequences
func NewGovernanceActivitySeqPersistorTask ¶ added in v0.1.0
NewGovernanceActivitySeqPersistorTask is responsible for storing validator info to persistence layer
func NewGovernanceLogsParserTask ¶ added in v0.1.0
func NewGovernanceLogsParserTask() *governanceLogsParserTask
NewGovernanceLogsParserTask parses transaction logs to data about governance
func NewHeightMetaRetrieverTask ¶
func NewHeightMetaRetrieverTask(c figmentclient.Client) *heightMetaRetrieverTask
func NewIndexSource ¶
func NewIndexSource(cfg *config.Config, db *store.Store, client figmentclient.Client, sourceCfg *IndexSourceConfig) (*indexSource, error)
func NewPayloadFactory ¶
func NewPayloadFactory() *payloadFactory
func NewPipeline ¶
func NewProposalAggCreatorTask ¶ added in v0.1.0
func NewProposalAggPersistorTask ¶ added in v0.1.0
NewProposalAggPersistorTask store validator aggregate to persistence layer
func NewSyncerPersistorTask ¶
NewSyncerPersistorTask is responsible for storing syncable to persistence layer
func NewSystemEventCreatorTask ¶ added in v0.1.0
NewSystemEventCreatorTask creates system events
func NewSystemEventPersistorTask ¶ added in v0.1.0
NewSystemEventPersistorTask store system events to persistance layer
func NewTransactionFetcherTask ¶ added in v0.1.0
func NewTransactionFetcherTask(client figmentclient.Client) pipeline.Task
func NewValidatorAggPersistorTask ¶
NewValidatorAggPersistorTask store validator aggregate to persistence layer
func NewValidatorFetcherTask ¶
func NewValidatorFetcherTask(client figmentclient.Client) pipeline.Task
func NewValidatorGroupAggPersistorTask ¶
NewValidatorGroupAggPersistorTask store validator group aggregate to persistence layer
func NewValidatorGroupFetcherTask ¶
func NewValidatorGroupFetcherTask(client figmentclient.Client) pipeline.Task
func NewValidatorGroupSeqCreatorTask ¶
func NewValidatorGroupSeqCreatorTask(cfg *config.Config, db *store.Store) *validatorGroupSeqCreatorTask
NewValidatorGroupSeqCreatorTask creates validator era sequences
func NewValidatorGroupSeqPersistorTask ¶
NewValidatorGroupSeqPersistorTask is responsible for storing validator era info to persistence layer
func NewValidatorSeqCreatorTask ¶
NewValidatorSeqCreatorTask creates validator sequences
func NewValidatorSeqPersistorTask ¶
NewValidatorSeqPersistorTask is responsible for storing validator info to persistence layer
func ToAccountActivitySequence ¶ added in v0.1.0
func ToAccountActivitySequence(syncable *model.Syncable, rawTransactions []*figmentclient.Transaction) ([]model.AccountActivitySeq, error)
func ToBlockSequence ¶
func ToGovernanceActivitySequence ¶ added in v0.1.0
func ToGovernanceActivitySequence(syncable *model.Syncable, parsedGovernanceLogs []*ParsedGovernanceLogs) ([]model.GovernanceActivitySeq, error)
func ToValidatorGroupSequence ¶
func ToValidatorGroupSequence(syncable *model.Syncable, rawValidatorGroups []*figmentclient.ValidatorGroup, rawValidators []*figmentclient.Validator) ([]model.ValidatorGroupSeq, error)
func ToValidatorSequence ¶
func ToValidatorSequence(syncable *model.Syncable, rawValidators []*figmentclient.Validator) ([]model.ValidatorSeq, error)
Types ¶
type BackfillConfig ¶
type BlockFetcherTask ¶
type BlockFetcherTask struct {
// contains filtered or unexported fields
}
func (*BlockFetcherTask) GetName ¶
func (t *BlockFetcherTask) GetName() string
type ConfigParser ¶
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 HeightMeta ¶
type IndexConfig ¶
type IndexSourceConfig ¶
type ParsedGovernanceLogs ¶ added in v0.1.0
type PipelineSyncableStore ¶
type ReportStore ¶
type TransactionsFetcherTask ¶ added in v0.1.0
type TransactionsFetcherTask struct {
// contains filtered or unexported fields
}
func (*TransactionsFetcherTask) GetName ¶ added in v0.1.0
func (t *TransactionsFetcherTask) GetName() string
type ValidatorGroupsFetcherTask ¶
type ValidatorGroupsFetcherTask struct {
// contains filtered or unexported fields
}
func (*ValidatorGroupsFetcherTask) GetName ¶
func (t *ValidatorGroupsFetcherTask) GetName() string
type ValidatorsFetcherTask ¶
type ValidatorsFetcherTask struct {
// contains filtered or unexported fields
}
func (*ValidatorsFetcherTask) GetName ¶
func (t *ValidatorsFetcherTask) GetName() string
Source Files ¶
- aggregator_tasks.go
- analyzer_tasks.go
- config_parser.go
- fetcher_tasks.go
- logger.go
- mappers.go
- metric.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
- syncer_tasks.go