Documentation
¶
Index ¶
- Variables
- func Diff(ctx context.Context, store blockstore.Blockstore, left, right ipld.Node) string
- func GetStateRoot(ctx context.Context, c cid.Cid, store blockstore.Blockstore) (ipld.Node, error)
- func LinkDest(n ipld.Node) ipld.NodePrototype
- func Load(ctx context.Context, c cid.Cid, store blockstore.Blockstore, ...) error
- func ParamFor(destType LotusType, msg ipld.Node) (ipld.Node, string, error)
- func ParseParams(params []byte, method int, destType LotusType) (ipld.Node, string, error)
- func StoreFor(ctx context.Context, client api.FullNode) blockstore.Blockstore
- func Transform(ctx context.Context, c cid.Cid, store blockstore.Blockstore, as string) (ipld.Node, error)
- func TypeActorHead(actor ipld.Node) (ipld.Node, error)
- func TypeOfActor(stateroot ipld.Node, actor string) (string, error)
- type CBORBytes
- type Loader
- type LotusType
- type Ref
- type StateRootFunc
Constants ¶
This section is empty.
Variables ¶
var AllowDegradedADLNodes = false
AllowDegradedADLNodes uses adl walks that ignore store.Get fails
var LotusActorCodes = map[string]LotusType{ "bafkqaddgnfwc6mjpon4xg5dfnu": LotusType("systemActor"), "bafkqactgnfwc6mjpnfxgs5a": InitActorState, "bafkqaddgnfwc6mjpojsxoylsmq": RewardActorState, "bafkqactgnfwc6mjpmnzg63q": CronActorState, "bafkqaetgnfwc6mjpon2g64tbm5sxa33xmvza": StoragePowerActorState, "bafkqae3gnfwc6mjpon2g64tbm5sw2ylsnnsxi": MarketActorState, "bafkqaftgnfwc6mjpozsxe2lgnfswi4tfm5uxg5dspe": VerifiedRegistryActorState, "bafkqadlgnfwc6mjpmfrwg33vnz2a": AccountActorState, "bafkqadtgnfwc6mjpnv2wy5djonuwo": MultisigActorState, "bafkqafdgnfwc6mjpobqxs3lfnz2gg2dbnzxgk3a": PaymentChannelActorState, "bafkqaetgnfwc6mjpon2g64tbm5sw22lomvza": StorageMinerActorState, "bafkqaddgnfwc6mrpon4xg5dfnu": LotusType("systemActor"), "bafkqactgnfwc6mrpnfxgs5a": InitActorState, "bafkqaddgnfwc6mrpojsxoylsmq": RewardActorV2State, "bafkqactgnfwc6mrpmnzg63q": CronActorState, "bafkqaetgnfwc6mrpon2g64tbm5sxa33xmvza": StoragePowerActorV2State, "bafkqae3gnfwc6mrpon2g64tbm5sw2ylsnnsxi": MarketActorV2State, "bafkqaftgnfwc6mrpozsxe2lgnfswi4tfm5uxg5dspe": VerifiedRegistryActorState, "bafkqadlgnfwc6mrpmfrwg33vnz2a": AccountActorState, "bafkqadtgnfwc6mrpnv2wy5djonuwo": MultisigActorState, "bafkqafdgnfwc6mrpobqxs3lfnz2gg2dbnzxgk3a": PaymentChannelActorState, "bafkqaetgnfwc6mrpon2g64tbm5sw22lomvza": StorageMinerActorV2State, }
LotusActorCodes for actor states
var LotusPrototypes = map[LotusType]ipld.NodePrototype{ LotusTypeUnknown: types.Type.Any__Repr, LotusTypeTipset: types.Type.LotusBlockHeader__Repr, LotusVersionedStateroot: types.Type.LotusStateRoot__Repr, LotusTypeMsgMeta: types.Type.LotusMsgMeta__Repr, LotusTypeMessage: lotusMessageMap, LotusTypeSignedMessage: types.Type.LotusSignedMessage__Repr, AccountActorState: types.Type.AccountV0State__Repr, CronActorState: types.Type.CronV0State__Repr, InitActorState: types.Type.InitV0State__Repr, MarketActorState: types.Type.MarketV0State__Repr, MarketActorV2State: types.Type.MarketV2State__Repr, MultisigActorState: types.Type.MultisigV0State__Repr, StorageMinerActorState: types.Type.MinerV0State__Repr, StorageMinerActorInfo: types.Type.MinerV0Info__Repr, StorageMinerActorVestingFunds: types.Type.MinerV0VestingFunds__Repr, StorageMinerActorAllocatedSectors: types.Type.BitField__Repr, StorageMinerActorDeadlines: types.Type.MinerV0Deadlines__Repr, StorageMinerActorDeadline: types.Type.MinerV0Deadline__Repr, StorageMinerActorV2State: types.Type.MinerV2State__Repr, StorageMinerActorV2Info: types.Type.MinerV2Info__Repr, StorageMinerActorV2Deadlines: types.Type.MinerV2Deadlines__Repr, StorageMinerActorV2Deadline: types.Type.MinerV2Deadline__Repr, StoragePowerActorState: types.Type.PowerV0State__Repr, StoragePowerActorV2State: types.Type.PowerV2State__Repr, RewardActorState: types.Type.RewardV0State__Repr, RewardActorV2State: types.Type.RewardV2State__Repr, VerifiedRegistryActorState: types.Type.VerifregV0State__Repr, PaymentChannelActorState: types.Type.PaychV0State__Repr, LotusTypeMsgList: types.Type.List__LinkLotusMessage__Repr, LotusTypeStateroot: types.Type.Map__LotusActors__Repr, InitActorAddresses: types.Type.Map__ActorID__Repr, StorageMinerActorPreCommittedSectors: types.Type.Map__SectorPreCommitOnChainInfo__Repr, StorageMinerActorDeadlinePartitionEarly: types.Type.Map__BitField__Repr, StorageMinerActorPreCommittedSectorsExpiry: types.Type.Map__BitField__Repr, StorageMinerActorSectors: types.Type.Map__SectorOnChainInfo__Repr, StorageMinerActorV2Sectors: types.Type.Map__SectorV2OnChainInfo__Repr, StorageMinerActorDeadlinePartitions: types.Type.Map__MinerV0Partition__Repr, StorageMinerActorV2DeadlinePartitions: types.Type.Map__MinerV2Partition__Repr, StorageMinerActorDeadlinePartitionExpiry: types.Type.Map__MinerV0ExpirationSet__Repr, StorageMinerActorDeadlineExpiry: types.Type.Map__BitField__Repr, StoragePowerActorCronEventQueue: types.Type.Multimap__PowerV0CronEvent__Repr, StoragePowerActorClaims: types.Type.Map__PowerV0Claim__Repr, StoragePowerActorV2Claims: types.Type.Map__PowerV2Claim__Repr, VerifiedRegistryActorVerifiers: types.Type.Map__DataCap__Repr, VerifiedRegistryActorVerifiedClients: types.Type.Map__DataCap__Repr, MarketActorPendingProposals: types.Type.Map__MarketV0DealProposal__Repr, MarketActorV2PendingProposals: types.Type.Map__MarketV2DealProposal__Repr, MarketActorProposals: types.Type.Map__MarketV0RawDealProposal__Repr, MarketActorV2Proposals: types.Type.Map__MarketV2RawDealProposal__Repr, MarketActorStates: types.Type.Map__MarketV0DealState__Repr, MarketActorEscrowTable: types.Type.Map__BalanceTable__Repr, MarketActorLockedTable: types.Type.Map__BalanceTable__Repr, MarketActorDealOpsByEpoch: types.Type.Map__List__DealID__Repr, MultisigActorPending: types.Type.Map__MultisigV0Transaction__Repr, PaymentChannelActorLaneStates: types.Type.Map__PaychV0LaneState__Repr, }
LotusPrototypes provide expected node types for each state type.
var LotusTypeAliases = map[string]LotusType{ "tipset.ParentStateRoot": LotusTypeStateroot, "initActor.AddressMap": InitActorAddresses, "storagePowerActor.CronEventQueue": StoragePowerActorCronEventQueue, "storagePowerActorV2.CronEventQueue": StoragePowerActorCronEventQueue, "storagePowerActor.Claims": StoragePowerActorClaims, "storagePowerActorV2.Claims": StoragePowerActorV2Claims, "storageMarketActorV2.States": MarketActorStates, "storageMarketActorV2.EscrowTable": MarketActorEscrowTable, "storageMarketActorV2.LockedTable": MarketActorLockedTable, "storageMarketActorV2.DealOpsByEpoch": MarketActorDealOpsByEpoch, "storageMinerActor.Deadlines.Due.ExpirationEpochs": StorageMinerActorDeadlineExpiry, "storageMinerActor.Deadlines.Due.Partitions.ExpirationEpochs": StorageMinerActorDeadlinePartitionExpiry, "storageMinerActorV2.PreCommittedSectors": StorageMinerActorPreCommittedSectors, "storageMinerActorV2.PreCommittedSectorsExpiry": StorageMinerActorPreCommittedSectorsExpiry, "storageMinerActorV2.AllocatedSectors": StorageMinerActorAllocatedSectors, "storageMinerActorV2.VestingFunds": StorageMinerActorVestingFunds, "storageMinerActorV2.Deadlines.Due.ExpirationEpochs": StorageMinerActorDeadlineExpiry, "storageMinerActorV2.Deadlines.Due.Partitions.ExpirationsEpochs": StorageMinerActorDeadlinePartitionExpiry, "storageMinerActorV2.Deadlines.Due.Partitions.EarlyTerminated": StorageMinerActorDeadlinePartitionEarly, "msgMeta.SecpkMessages": LotusTypeMsgList, }
LotusTypeAliases lists non-direct mapped aliases
var StateRootKey = "stateroot"
Functions ¶
func Diff ¶
func Diff(ctx context.Context, store blockstore.Blockstore, left, right ipld.Node) string
Diff provides a human readable difference between two ipld dags
func GetStateRoot ¶ added in v0.0.6
func GetStateRoot(ctx context.Context, c cid.Cid, store blockstore.Blockstore) (ipld.Node, error)
GetStateRoot gets a stateroot node from a cid The cid can be the block of a tipset, the stateroot itself, or the versioned stateroot
func LinkDest ¶ added in v0.0.6
func LinkDest(n ipld.Node) ipld.NodePrototype
LinkDest fills in a gap in current schema: what type does a `LinkReference` point to
func Load ¶ added in v0.0.6
func Load(ctx context.Context, c cid.Cid, store blockstore.Blockstore, into ipld.NodeAssembler) error
Load will load c into a given assembler.
func ParseParams ¶ added in v0.0.6
func StoreFor ¶
func StoreFor(ctx context.Context, client api.FullNode) blockstore.Blockstore
StoreFor creates a blockstore proxying access to a lotus node.
func Transform ¶ added in v0.0.2
func Transform(ctx context.Context, c cid.Cid, store blockstore.Blockstore, as string) (ipld.Node, error)
Transform will unmarshal cbor data based on a provided type hint.
func TypeActorHead ¶ added in v0.0.6
func TypeActorHead(actor ipld.Node) (ipld.Node, error)
TypeActorHead takes a LotusActor node, and returns a `Link__<actortype>State` link reference corresponding to the untyped `Head` Link when the type can be inferred from the `Code` of the actor.
func TypeOfActor ¶ added in v0.0.6
TypeOfActor returns the type a given actor will be based on its binary address and stateroot.
Types ¶
type CBORBytes ¶ added in v0.0.6
type CBORBytes []byte
CBORBytes wraps already-serialized bytes as CBOR-marshalable.
func (CBORBytes) MarshalCBOR ¶ added in v0.0.6
MarshalCBOR turns these bytes into cbor-prefixed
type Loader ¶ added in v0.0.6
type Loader func(context.Context, cid.Cid, blockstore.Blockstore, ipld.NodeAssembler) error
Loader is the conformer for our wrapper around ADLs
type LotusType ¶ added in v0.0.2
type LotusType string
LotusType represents known types
const ( LotusTypeUnknown LotusType = "unknown" LotusTypeTipset LotusType = "tipset" LotusTypeMsgMeta LotusType = "msgMeta" LotusTypeMsgList LotusType = "msgMeta.BlsMessages" LotusTypeMessage LotusType = "msgMeta.BlsMessages[]" LotusTypeSignedMessage LotusType = "msgMeta.SecpkMessages[]" LotusTypeStateroot LotusType = "stateRoot" LotusVersionedStateroot LotusType = "versionedStateRoot" AccountActorState LotusType = "accountActor" CronActorState LotusType = "cronActor" InitActorState LotusType = "initActor" InitActorAddresses LotusType = "initActorAddresses" MarketActorState LotusType = "storageMarketActor" MarketActorV2State LotusType = "storageMarketActorV2" MarketActorProposals LotusType = "storageMarketActor.Proposals" MarketActorV2Proposals LotusType = "storageMarketActorV2.Proposals" MarketActorStates LotusType = "storageMarketActor.States" MarketActorPendingProposals LotusType = "storageMarketActor.PendingProposals" MarketActorV2PendingProposals LotusType = "storageMarketActorV2.PendingProposals" MarketActorEscrowTable LotusType = "storageMarketActor.EscrowTable" MarketActorLockedTable LotusType = "storageMarketActor.LockedTable" MarketActorDealOpsByEpoch LotusType = "storageMarketActor.DealOpsByEpoch" MultisigActorState LotusType = "multisigActor" MultisigActorPending LotusType = "multisigActor.PendingTxns" StorageMinerActorState LotusType = "storageMinerActor" StorageMinerActorInfo LotusType = "storageMinerActor.Info" StorageMinerActorVestingFunds LotusType = "storageMinerActor.VestingFunds" StorageMinerActorPreCommittedSectors LotusType = "storageMinerActor.PreCommittedSectors" StorageMinerActorPreCommittedSectorsExpiry LotusType = "storageMinerActor.PreCommittedSectorsExpiry" StorageMinerActorAllocatedSectors LotusType = "storageMinerActor.AllocatedSectors" StorageMinerActorSectors LotusType = "storageMinerActor.Sectors" StorageMinerActorV2Sectors LotusType = "storageMinerActorV2.Sectors" StorageMinerActorDeadlines LotusType = "storageMinerActor.Deadlines" StorageMinerActorDeadline LotusType = "storageMinerActor.Deadlines.Due[]" StorageMinerActorDeadlinePartitions LotusType = "storageMinerActor.Deadlines.Due.Partitions" StorageMinerActorDeadlinePartitionExpiry LotusType = "storageMinerActor.Deadlines.Due.Partitions.ExpirationsEpochs" StorageMinerActorDeadlinePartitionEarly LotusType = "storageMinerActor.Deadlines.Due.Partitions.EarlyTerminated" StorageMinerActorDeadlineExpiry LotusType = "storageMinerActor.Deadlines.Due.ExpirationsEpochs" StorageMinerActorV2State LotusType = "storageMinerActorV2" StorageMinerActorV2Info LotusType = "storageMinerActorV2.Info" StorageMinerActorV2Deadlines LotusType = "storageMinerActorV2.Deadlines" StorageMinerActorV2Deadline LotusType = "storageMinerActorV2.Deadlines.Due[]" StorageMinerActorV2DeadlinePartitions LotusType = "storageMinerActorV2.Deadlines.Due.Partitions" StoragePowerActorState LotusType = "storagePowerActor" StoragePowerActorV2State LotusType = "storagePowerActorV2" StoragePowerActorCronEventQueue LotusType = "storagePowerCronEventQueue" StoragePowerActorClaims LotusType = "storagePowerClaims" StoragePowerActorV2Claims LotusType = "storagePowerClaimsV2" RewardActorState LotusType = "rewardActor" RewardActorV2State LotusType = "rewardActorV2" VerifiedRegistryActorState LotusType = "verifiedRegistryActor" VerifiedRegistryActorVerifiers LotusType = "verifiedRegistryActor.Verifiers" VerifiedRegistryActorVerifiedClients LotusType = "verifiedRegistryActor.VerifiedClients" PaymentChannelActorState LotusType = "paymentChannelActor" PaymentChannelActorLaneStates LotusType = "paymentChannelActor.LaneStates" )
LotusType enum
func ResolveType ¶ added in v0.0.6
ResolveType maps incoming type strings to enum known types
type Ref ¶ added in v0.0.6
type Ref struct {
ipld.Node
}
Ref is an indirection to help goCmp deal with the multiple transformations involved in resolving an ipld Link
type StateRootFunc ¶ added in v0.0.6
Source Files
¶
Directories
¶
Path | Synopsis |
---|---|
cmd
|
|
codec
|
|
extern
|
|
fil-ledger
Module
|
|
filecoin-ffi
Module
|
|
establish connection to a 'FullNode' filecoin API with cli configuration.
|
establish connection to a 'FullNode' filecoin API with cli configuration. |