 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActorDataTransformer ¶ added in v0.16.0
type ActorDataTransformer interface {
	Transform(ctx context.Context, data model.PersistableList) (model.PersistableList, error)
}
    type ActorExtractorFilter ¶
type ActorExtractorMap ¶
type ActorExtractorMap interface {
	Allow(code cid.Cid) bool
	GetExtractors(code cid.Cid) ([]ActorStateExtractor, bool)
}
    An ActorExtractorMap controls which actor types may be extracted.
type ActorInfo ¶
type ActorInfo struct {
	Actor      types.Actor
	ChangeType tasks.ChangeType
	Address    address.Address
	Current    *types.TipSet
	Executed   *types.TipSet
}
    func (ActorInfo) Attributes ¶ added in v0.9.0
func (ActorInfo) MarshalLogObject ¶ added in v0.9.0
func (a ActorInfo) MarshalLogObject(enc zapcore.ObjectEncoder) error
type ActorStateAPI ¶
type ActorStateAPI interface {
	// TODO(optimize): StateGetActor is just a wrapper around StateManager.LoadActor with a lookup of the tipset which we already have
	Actor(ctx context.Context, addr address.Address, tsk types.TipSetKey) (*types.Actor, error)
	// TODO(optimize): StateMinerPower is just a wrapper for stmgr.GetPowerRaw which loads the power actor as we do in StoragePowerExtractor
	MinerPower(ctx context.Context, addr address.Address, ts *types.TipSet) (*api.MinerPower, error)
	// TODO(optimize): StateReadState looks up the tipset and actor that we already have available
	ActorState(ctx context.Context, addr address.Address, ts *types.TipSet) (*api.ActorState, error)
	// TODO(remove): StateMinerSectors loads the actor and then calls miner.Load which StorageMinerExtractor already has available
	// StateMinerSectors(ctx context.Context, addr address.Address, bf *bitfield.BitField, tsk types.TipSetKey) ([]*miner.SectorOnChainInfo, error)
	Store() adt.Store
	TipSetMessageReceipts(ctx context.Context, ts, pts *types.TipSet) ([]*lens.BlockMessageReceipts, error)
	DiffSectors(ctx context.Context, addr address.Address, ts, pts *types.TipSet, pre, cur miner.State) (*miner.SectorChanges, error)
	DiffPreCommits(ctx context.Context, addr address.Address, ts, pts *types.TipSet, pre, cur miner.State) (*miner.PreCommitChanges, error)
	DiffPreCommitsV8(ctx context.Context, addr address.Address, ts, pts *types.TipSet, pre, cur miner.State) (*miner.PreCommitChangesV8, error)
	MinerLoad(store adt.Store, act *types.Actor) (miner.State, error)
	LookupRobustAddress(ctx context.Context, idAddr address.Address, tsk types.TipSetKey) (address.Address, error)
}
    ActorStateAPI is the minimal subset of lens.API that is needed for actor state extraction
type ActorStateError ¶
type ActorStateExtractor ¶
type ActorStateExtractor interface {
	Extract(ctx context.Context, a ActorInfo, node ActorStateAPI) (model.Persistable, error)
}
    An ActorStateExtractor extracts actor state into a persistable format
type ActorStateResult ¶
type ActorStateResult struct {
	Code         cid.Cid
	Head         cid.Cid
	Address      address.Address
	Error        error
	SkippedParse bool
	Data         model.Persistable
}
    type CustomTypedActorExtractorMap ¶ added in v0.9.0
type CustomTypedActorExtractorMap struct {
	// contains filtered or unexported fields
}
    A CustomTypedActorExtractorMap extracts a single type of actor using full parsing of actor state
func NewCustomTypedActorExtractorMap ¶ added in v0.9.0
func NewCustomTypedActorExtractorMap(extractors map[cid.Cid][]ActorStateExtractor) *CustomTypedActorExtractorMap
func (*CustomTypedActorExtractorMap) Allow ¶ added in v0.9.0
func (c *CustomTypedActorExtractorMap) Allow(code cid.Cid) bool
func (*CustomTypedActorExtractorMap) GetExtractors ¶ added in v0.9.0
func (c *CustomTypedActorExtractorMap) GetExtractors(code cid.Cid) ([]ActorStateExtractor, bool)
type RawActorExtractorMap ¶
type RawActorExtractorMap struct {
	// contains filtered or unexported fields
}
    A RawActorExtractorMap extracts all types of actors using basic actor extraction which only parses shallow state.
func (*RawActorExtractorMap) Allow ¶
func (r *RawActorExtractorMap) Allow(_ cid.Cid) bool
func (*RawActorExtractorMap) GetExtractors ¶ added in v0.9.0
func (r *RawActorExtractorMap) GetExtractors(_ cid.Cid) ([]ActorStateExtractor, bool)
func (*RawActorExtractorMap) Register ¶ added in v0.9.0
func (r *RawActorExtractorMap) Register(ase ActorStateExtractor)
type Task ¶
type Task struct {
	// contains filtered or unexported fields
}
    A Task processes the extraction of actor state according the allowed types in its extractor map.
func NewTask ¶
func NewTask(node tasks.DataSource, extractorMap ActorExtractorMap) *Task
func NewTaskWithTransformer ¶ added in v0.16.0
func NewTaskWithTransformer(node tasks.DataSource, extractorMap ActorExtractorMap, dataTransformer ActorDataTransformer) *Task
func (*Task) ProcessActors ¶
func (t *Task) ProcessActors(ctx context.Context, current *types.TipSet, executed *types.TipSet, candidates tasks.ActorStateChangeDiff) (model.Persistable, *visormodel.ProcessingReport, error)
type TypedActorExtractorMap ¶
type TypedActorExtractorMap struct {
	// contains filtered or unexported fields
}
    A TypedActorExtractorMap extracts a single type of actor using full parsing of actor state
func NewTypedActorExtractorMap ¶
func NewTypedActorExtractorMap(codes []cid.Cid, ase ...ActorStateExtractor) *TypedActorExtractorMap
func (*TypedActorExtractorMap) Allow ¶
func (t *TypedActorExtractorMap) Allow(code cid.Cid) bool
func (*TypedActorExtractorMap) GetExtractors ¶ added in v0.9.0
func (t *TypedActorExtractorMap) GetExtractors(code cid.Cid) ([]ActorStateExtractor, bool)
 Click to show internal directories. 
   Click to hide internal directories.