Documentation ¶
Index ¶
- func ExtractChainPower(ec *PowerStateExtractionContext) (*powermodel.ChainPower, error)
- func ExtractClaimedPower(ctx context.Context, ec *PowerStateExtractionContext) (powermodel.PowerActorClaimList, error)
- func ExtractMarketDealProposals(ctx context.Context, ec *MarketStateExtractionContext) (marketmodel.MarketDealProposals, error)
- func ExtractMarketDealStates(ctx context.Context, ec *MarketStateExtractionContext) (marketmodel.MarketDealStates, error)
- func ExtractMinerCurrentDeadlineInfo(ctx context.Context, a ActorInfo, ec *MinerStateExtractionContext) (*minermodel.MinerCurrentDeadlineInfo, error)
- func ExtractMinerFeeDebt(ctx context.Context, a ActorInfo, ec *MinerStateExtractionContext) (*minermodel.MinerFeeDebt, error)
- func ExtractMinerInfo(ctx context.Context, a ActorInfo, ec *MinerStateExtractionContext) (*minermodel.MinerInfo, error)
- func ExtractMinerLockedFunds(ctx context.Context, a ActorInfo, ec *MinerStateExtractionContext) (*minermodel.MinerLockedFund, error)
- func ExtractMinerPoSts(ctx context.Context, actor *ActorInfo, ec *MinerStateExtractionContext, ...) (minermodel.MinerSectorPostList, error)
- func ExtractMinerSectorData(ctx context.Context, ec *MinerStateExtractionContext, a ActorInfo, ...) (minermodel.MinerPreCommitInfoList, minermodel.MinerSectorInfoList, ...)
- func ExtractMultisigTransactions(ctx context.Context, a ActorInfo, ec *MsigExtractionContext) (multisigmodel.MultisigTransactionList, error)
- func ExtractVerifiedClients(ctx context.Context, ec *VerifiedRegistryExtractionContext) (verifregmodel.VerifiedRegistryVerifiedClientsList, error)
- func ExtractVerifiers(ctx context.Context, ec *VerifiedRegistryExtractionContext) (verifregmodel.VerifiedRegistryVerifiersList, error)
- func Register(code cid.Cid, e ActorStateExtractor)
- type AccountExtractor
- type ActorExtractor
- type ActorExtractorFilter
- type ActorExtractorMap
- type ActorInfo
- type ActorStateAPI
- type ActorStateError
- type ActorStateExtractor
- type ActorStateResult
- type InitExtractor
- type MarketStateExtractionContext
- type MinerStateExtractionContext
- type MsigExtractionContext
- type MultiSigActorExtractor
- type PartitionStatus
- type PowerStateExtractionContext
- type RawActorExtractorMap
- type RewardExtractor
- type StorageMarketExtractor
- type StorageMinerExtractor
- type StoragePowerExtractor
- type Task
- type TypedActorExtractorMap
- type VerifiedRegistryExtractionContext
- type VerifiedRegistryExtractor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractChainPower ¶
func ExtractChainPower(ec *PowerStateExtractionContext) (*powermodel.ChainPower, error)
func ExtractClaimedPower ¶
func ExtractClaimedPower(ctx context.Context, ec *PowerStateExtractionContext) (powermodel.PowerActorClaimList, error)
func ExtractMarketDealProposals ¶
func ExtractMarketDealProposals(ctx context.Context, ec *MarketStateExtractionContext) (marketmodel.MarketDealProposals, error)
func ExtractMarketDealStates ¶
func ExtractMarketDealStates(ctx context.Context, ec *MarketStateExtractionContext) (marketmodel.MarketDealStates, error)
func ExtractMinerCurrentDeadlineInfo ¶
func ExtractMinerCurrentDeadlineInfo(ctx context.Context, a ActorInfo, ec *MinerStateExtractionContext) (*minermodel.MinerCurrentDeadlineInfo, error)
func ExtractMinerFeeDebt ¶
func ExtractMinerFeeDebt(ctx context.Context, a ActorInfo, ec *MinerStateExtractionContext) (*minermodel.MinerFeeDebt, error)
func ExtractMinerInfo ¶
func ExtractMinerInfo(ctx context.Context, a ActorInfo, ec *MinerStateExtractionContext) (*minermodel.MinerInfo, error)
func ExtractMinerLockedFunds ¶
func ExtractMinerLockedFunds(ctx context.Context, a ActorInfo, ec *MinerStateExtractionContext) (*minermodel.MinerLockedFund, error)
func ExtractMinerPoSts ¶
func ExtractMinerPoSts(ctx context.Context, actor *ActorInfo, ec *MinerStateExtractionContext, emsgs []*lens.ExecutedMessage, node ActorStateAPI) (minermodel.MinerSectorPostList, error)
func ExtractMinerSectorData ¶
func ExtractMinerSectorData(ctx context.Context, ec *MinerStateExtractionContext, a ActorInfo, node ActorStateAPI) (minermodel.MinerPreCommitInfoList, minermodel.MinerSectorInfoList, minermodel.MinerSectorDealList, minermodel.MinerSectorEventList, error)
func ExtractMultisigTransactions ¶
func ExtractMultisigTransactions(ctx context.Context, a ActorInfo, ec *MsigExtractionContext) (multisigmodel.MultisigTransactionList, error)
func ExtractVerifiedClients ¶
func ExtractVerifiedClients(ctx context.Context, ec *VerifiedRegistryExtractionContext) (verifregmodel.VerifiedRegistryVerifiedClientsList, error)
func ExtractVerifiers ¶
func ExtractVerifiers(ctx context.Context, ec *VerifiedRegistryExtractionContext) (verifregmodel.VerifiedRegistryVerifiersList, error)
func Register ¶
func Register(code cid.Cid, e ActorStateExtractor)
Register adds an actor state extractor
Types ¶
type AccountExtractor ¶
type AccountExtractor struct{}
AccountExtractor is a state extractor that deals with Account actors.
func (AccountExtractor) Extract ¶
func (AccountExtractor) Extract(ctx context.Context, a ActorInfo, emsgs []*lens.ExecutedMessage, node ActorStateAPI) (model.Persistable, error)
Extract will create persistable data for a given actor's state.
type ActorExtractor ¶
type ActorExtractor struct{}
ActorExtractor extracts common actor state
func (ActorExtractor) Extract ¶
func (ActorExtractor) Extract(ctx context.Context, a ActorInfo, emsgs []*lens.ExecutedMessage, node ActorStateAPI) (model.Persistable, error)
type ActorExtractorFilter ¶
type ActorExtractorMap ¶
type ActorExtractorMap interface { Allow(code cid.Cid) bool GetExtractor(code cid.Cid) (ActorStateExtractor, bool) }
An ActorExtractorMap controls which actor types may be extracted.
type ActorInfo ¶
type ActorInfo struct { Actor types.Actor ChangeType lens.ChangeType Address address.Address ParentStateRoot cid.Cid Epoch abi.ChainEpoch TipSet *types.TipSet ParentTipSet *types.TipSet }
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 StateGetActor(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 StateMinerPower(ctx context.Context, addr address.Address, tsk types.TipSetKey) (*api.MinerPower, error) // TODO(optimize): StateReadState looks up the tipset and actor that we already have available StateReadState(ctx context.Context, addr address.Address, tsk types.TipSetKey) (*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 }
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, emsgs []*lens.ExecutedMessage, node ActorStateAPI) (model.Persistable, error)
}
An ActorStateExtractor extracts actor state into a persistable format
func GetActorStateExtractor ¶
func GetActorStateExtractor(code cid.Cid) (ActorStateExtractor, bool)
type ActorStateResult ¶
type ActorStateResult struct { Code cid.Cid Head cid.Cid Address string Error error SkippedParse bool Data model.Persistable }
type InitExtractor ¶
type InitExtractor struct{}
InitExtractor extracts init actor state
func (InitExtractor) Extract ¶
func (InitExtractor) Extract(ctx context.Context, a ActorInfo, emsgs []*lens.ExecutedMessage, node ActorStateAPI) (model.Persistable, error)
type MarketStateExtractionContext ¶
type MarketStateExtractionContext struct { PrevState market.State PrevTs *types.TipSet CurrActor *types.Actor CurrState market.State CurrTs *types.TipSet Store adt.Store }
func NewMarketStateExtractionContext ¶
func NewMarketStateExtractionContext(ctx context.Context, a ActorInfo, node ActorStateAPI) (*MarketStateExtractionContext, error)
func (*MarketStateExtractionContext) IsGenesis ¶
func (m *MarketStateExtractionContext) IsGenesis() bool
type MinerStateExtractionContext ¶
type MinerStateExtractionContext struct { PrevState miner.State PrevTs *types.TipSet CurrActor *types.Actor CurrState miner.State CurrTs *types.TipSet }
func NewMinerStateExtractionContext ¶
func NewMinerStateExtractionContext(ctx context.Context, a ActorInfo, node ActorStateAPI) (*MinerStateExtractionContext, error)
func (*MinerStateExtractionContext) HasPreviousState ¶
func (m *MinerStateExtractionContext) HasPreviousState() bool
type MsigExtractionContext ¶
type MsigExtractionContext struct { PrevState multisig.State CurrActor *types.Actor CurrState multisig.State CurrTs *types.TipSet Store adt.Store }
func NewMultiSigExtractionContext ¶
func NewMultiSigExtractionContext(ctx context.Context, a ActorInfo, node ActorStateAPI) (*MsigExtractionContext, error)
func (*MsigExtractionContext) HasPreviousState ¶
func (m *MsigExtractionContext) HasPreviousState() bool
type MultiSigActorExtractor ¶
type MultiSigActorExtractor struct{}
func (MultiSigActorExtractor) Extract ¶
func (m MultiSigActorExtractor) Extract(ctx context.Context, a ActorInfo, emsgs []*lens.ExecutedMessage, node ActorStateAPI) (model.Persistable, error)
type PartitionStatus ¶
type PartitionStatus struct { Removed bitfield.BitField Faulted bitfield.BitField Recovering bitfield.BitField Recovered bitfield.BitField }
PartitionStatus contains bitfileds of sectorID's that are removed, faulted, recovered and recovering.
type PowerStateExtractionContext ¶
type PowerStateExtractionContext struct { PrevState power.State CurrState power.State CurrTs *types.TipSet Store adt.Store }
func NewPowerStateExtractionContext ¶
func NewPowerStateExtractionContext(ctx context.Context, a ActorInfo, node ActorStateAPI) (*PowerStateExtractionContext, error)
func (*PowerStateExtractionContext) HasPreviousState ¶
func (p *PowerStateExtractionContext) HasPreviousState() bool
type RawActorExtractorMap ¶
type RawActorExtractorMap struct{}
A RawActorExtractorMap extracts all types of actors using basic actor extraction which only parses shallow state.
func (RawActorExtractorMap) Allow ¶
func (RawActorExtractorMap) Allow(code cid.Cid) bool
func (RawActorExtractorMap) GetExtractor ¶
func (RawActorExtractorMap) GetExtractor(code cid.Cid) (ActorStateExtractor, bool)
type RewardExtractor ¶
type RewardExtractor struct{}
RewardExtractor extracts reward actor state
func (RewardExtractor) Extract ¶
func (RewardExtractor) Extract(ctx context.Context, a ActorInfo, emsgs []*lens.ExecutedMessage, node ActorStateAPI) (model.Persistable, error)
type StorageMarketExtractor ¶
type StorageMarketExtractor struct{}
StorageMarketExtractor extracts market actor state
func (StorageMarketExtractor) Extract ¶
func (m StorageMarketExtractor) Extract(ctx context.Context, a ActorInfo, emsgs []*lens.ExecutedMessage, node ActorStateAPI) (model.Persistable, error)
type StorageMinerExtractor ¶
type StorageMinerExtractor struct{}
StorageMinerExtractor extracts miner actor state
func (StorageMinerExtractor) Extract ¶
func (m StorageMinerExtractor) Extract(ctx context.Context, a ActorInfo, emsgs []*lens.ExecutedMessage, node ActorStateAPI) (model.Persistable, error)
type StoragePowerExtractor ¶
type StoragePowerExtractor struct{}
StoragePowerExtractor extracts power actor state
func (StoragePowerExtractor) Extract ¶
func (StoragePowerExtractor) Extract(ctx context.Context, a ActorInfo, emsgs []*lens.ExecutedMessage, node ActorStateAPI) (model.Persistable, error)
type Task ¶
type Task struct {
// contains filtered or unexported fields
}
A Task processes the extraction of actor state according the allowed types in its extracter map.
func (*Task) ProcessActors ¶
func (t *Task) ProcessActors(ctx context.Context, ts *types.TipSet, pts *types.TipSet, candidates map[string]lens.ActorStateChange, emsgs []*lens.ExecutedMessage) (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) *TypedActorExtractorMap
func (*TypedActorExtractorMap) Allow ¶
func (t *TypedActorExtractorMap) Allow(code cid.Cid) bool
func (*TypedActorExtractorMap) GetExtractor ¶
func (t *TypedActorExtractorMap) GetExtractor(code cid.Cid) (ActorStateExtractor, bool)
type VerifiedRegistryExtractionContext ¶
type VerifiedRegistryExtractionContext struct {
PrevState, CurrState verifreg.State
PrevTs, CurrTs *types.TipSet
Store adt.Store
}
func NewVerifiedRegistryExtractorContext ¶
func NewVerifiedRegistryExtractorContext(ctx context.Context, a ActorInfo, node ActorStateAPI) (*VerifiedRegistryExtractionContext, error)
func (*VerifiedRegistryExtractionContext) HasPreviousState ¶
func (v *VerifiedRegistryExtractionContext) HasPreviousState() bool
type VerifiedRegistryExtractor ¶
type VerifiedRegistryExtractor struct{}
func (VerifiedRegistryExtractor) Extract ¶
func (VerifiedRegistryExtractor) Extract(ctx context.Context, a ActorInfo, emsgs []*lens.ExecutedMessage, node ActorStateAPI) (model.Persistable, error)