datasource

package
v0.18.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2024 License: Apache-2.0, MIT Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComputeGasOutputs added in v0.12.0

func ComputeGasOutputs(ctx context.Context, block *types.BlockHeader, message *types.Message, receipt *types.MessageReceipt, shouldBurnFn lens.ShouldBurnFn) (vm.GasOutputs, error)

func GetActorStateChanges

func GetActorStateChanges(ctx context.Context, store adt.Store, current, executed *types.TipSet) (tasks.ActorStateChangeDiff, error)

func GetGenesisActors

func GetGenesisActors(_ context.Context, store adt.Store, genesis *types.TipSet) (tasks.ActorStateChangeDiff, error)

Types

type DataSource

type DataSource struct {
	// contains filtered or unexported fields
}

func NewDataSource

func NewDataSource(node lens.API) (*DataSource, error)

func (*DataSource) Actor

func (t *DataSource) Actor(ctx context.Context, addr address.Address, tsk types.TipSetKey) (*types.Actor, error)

func (*DataSource) ActorInfo added in v0.17.1

func (t *DataSource) ActorInfo(ctx context.Context, addr address.Address, tsk types.TipSetKey) (*tasks.ActorInfo, error)

ActorInfo retrieves information about an actor at the given address within the context of a specific tipset. It first checks a cache for the requested information and returns it if available, otherwise it fetches the actor's details from the statetree. The retrieved actor information is cached for future access. If the actor information is successfully retrieved, it includes the actor's state and relevant metadata such as family and name. If the actor is not found or an error occurs during retrieval, the function returns an error.

func (*DataSource) ActorState

func (t *DataSource) ActorState(ctx context.Context, addr address.Address, ts *types.TipSet) (*api.ActorState, error)

func (*DataSource) ActorStateChanges

func (t *DataSource) ActorStateChanges(ctx context.Context, ts, pts *types.TipSet) (tasks.ActorStateChangeDiff, error)

func (*DataSource) ChainGetMessagesInTipset added in v0.17.0

func (t *DataSource) ChainGetMessagesInTipset(ctx context.Context, tsk types.TipSetKey) ([]api.Message, error)

func (*DataSource) CirculatingSupply

func (t *DataSource) CirculatingSupply(ctx context.Context, ts *types.TipSet) (api.CirculatingSupply, error)

func (*DataSource) ComputeBaseFee added in v0.12.0

func (t *DataSource) ComputeBaseFee(ctx context.Context, ts *types.TipSet) (abi.TokenAmount, error)

func (*DataSource) DiffPreCommits

func (t *DataSource) DiffPreCommits(ctx context.Context, addr address.Address, ts, pts *types.TipSet, pre, cur miner.State) (*miner.PreCommitChanges, error)

func (*DataSource) DiffPreCommitsV8 added in v0.13.0

func (t *DataSource) DiffPreCommitsV8(ctx context.Context, addr address.Address, ts, pts *types.TipSet, pre, cur miner.State) (*miner.PreCommitChangesV8, error)

func (*DataSource) DiffSectors

func (t *DataSource) DiffSectors(ctx context.Context, addr address.Address, ts, pts *types.TipSet, pre, cur miner.State) (*miner.SectorChanges, error)

func (*DataSource) EthGetBlockByHash added in v0.17.0

func (t *DataSource) EthGetBlockByHash(ctx context.Context, blkHash ethtypes.EthHash, fullTxInfo bool) (ethtypes.EthBlock, error)

func (*DataSource) EthGetTransactionByHash added in v0.17.0

func (t *DataSource) EthGetTransactionByHash(ctx context.Context, txHash *ethtypes.EthHash) (*ethtypes.EthTx, error)

func (*DataSource) EthGetTransactionReceipt added in v0.17.0

func (t *DataSource) EthGetTransactionReceipt(ctx context.Context, txHash ethtypes.EthHash) (*api.EthTxReceipt, error)

func (*DataSource) GetActorEventsRaw added in v0.18.0

func (t *DataSource) GetActorEventsRaw(ctx context.Context, filter *types.ActorEventFilter) ([]*types.ActorEvent, error)

func (*DataSource) LookupRobustAddress added in v0.17.2

func (t *DataSource) LookupRobustAddress(ctx context.Context, idAddr address.Address, tsk types.TipSetKey) (address.Address, error)

func (*DataSource) MessageExecutions

func (t *DataSource) MessageExecutions(ctx context.Context, ts, pts *types.TipSet) ([]*lens.MessageExecution, error)

func (*DataSource) MessageReceiptEvents added in v0.14.0

func (t *DataSource) MessageReceiptEvents(ctx context.Context, root cid.Cid) ([]types.Event, error)

func (*DataSource) MessagesWithDeduplicationForTipSet added in v0.17.2

func (t *DataSource) MessagesWithDeduplicationForTipSet(ctx context.Context, ts *types.TipSet) (map[cid.Cid]types.ChainMsg, error)

func (*DataSource) MinerLoad added in v0.10.1

func (t *DataSource) MinerLoad(store adt.Store, act *types.Actor) (miner.State, error)

func (*DataSource) MinerPower

func (t *DataSource) MinerPower(ctx context.Context, addr address.Address, ts *types.TipSet) (*api.MinerPower, error)

func (*DataSource) SetIdRobustAddressMap added in v0.17.2

func (t *DataSource) SetIdRobustAddressMap(ctx context.Context, tsk types.TipSetKey) error

func (*DataSource) ShouldBurnFn added in v0.12.0

func (t *DataSource) ShouldBurnFn(ctx context.Context, ts *types.TipSet) (lens.ShouldBurnFn, error)

func (*DataSource) StateListActors added in v0.17.1

func (t *DataSource) StateListActors(ctx context.Context, tsk types.TipSetKey) ([]address.Address, error)

func (*DataSource) Store

func (t *DataSource) Store() adt.Store

func (*DataSource) TipSet

func (t *DataSource) TipSet(ctx context.Context, tsk types.TipSetKey) (*types.TipSet, error)

func (*DataSource) TipSetBlockMessages added in v0.12.0

func (t *DataSource) TipSetBlockMessages(ctx context.Context, ts *types.TipSet) ([]*lens.BlockMessages, error)

func (*DataSource) TipSetMessageReceipts added in v0.12.0

func (t *DataSource) TipSetMessageReceipts(ctx context.Context, ts, pts *types.TipSet) ([]*lens.BlockMessageReceipts, error)

TipSetMessageReceipts returns the blocks and messages in `pts` and their corresponding receipts from `ts` matching block order in tipset (`pts`). TODO replace with lotus chainstore method when https://github.com/filecoin-project/lotus/pull/9186 lands

type KeyPrefix added in v0.17.1

type KeyPrefix struct {
	Prefix string
}

func (KeyPrefix) String added in v0.17.1

func (k KeyPrefix) String() string

type StateTreeMeta added in v0.14.0

type StateTreeMeta struct {
	// Root is the root of Map
	Root cid.Cid
	// Tree is the actual StateTree
	Tree *state.StateTree
}

func LoadStateTreeMeta added in v0.14.0

func LoadStateTreeMeta(ctx context.Context, s adt.Store, ts *types.TipSet) (*StateTreeMeta, error)

func (*StateTreeMeta) LoadMap added in v0.14.0

func (s *StateTreeMeta) LoadMap(store adt.Store) (adt.Map, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL