chain

package
v0.9.4 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2021 License: Apache-2.0, MIT Imports: 35 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAPIBlockstore

func NewAPIBlockstore(cio ChainIO) blockstore.Blockstore

Types

type AccountAPI

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

func NewAccountAPI

func NewAccountAPI(chain *ChainSubmodule) AccountAPI

func (*AccountAPI) StateAccountKey

func (accountAPI *AccountAPI) StateAccountKey(ctx context.Context, addr address.Address, tsk types.TipSetKey) (address.Address, error)

type ActorAPI

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

func NewActorAPI

func NewActorAPI(chain *ChainSubmodule) ActorAPI

func (*ActorAPI) ListActor

func (actorAPI *ActorAPI) ListActor(ctx context.Context) (map[address.Address]*types.Actor, error)

ActorLs returns a channel with actors from the latest state on the chain

func (*ActorAPI) StateGetActor

func (actorAPI *ActorAPI) StateGetActor(ctx context.Context, actor address.Address, tsk types.TipSetKey) (*types.Actor, error)

type BeaconAPI

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

func NewBeaconAPI

func NewBeaconAPI(chain *ChainSubmodule) BeaconAPI

func (*BeaconAPI) BeaconGetEntry

func (beaconAPI *BeaconAPI) BeaconGetEntry(ctx context.Context, epoch abi.ChainEpoch) (*types.BeaconEntry, error)

type BlockMessages

type BlockMessages struct {
	BlsMessages   []*types.UnsignedMessage
	SecpkMessages []*types.SignedMessage
	Cids          []cid.Cid
}

BlsMessages[x].cid = Cids[x] SecpkMessages[y].cid = Cids[BlsMessages.length + y]

type ChainIO

type ChainIO interface {
	ChainReadObj(context.Context, cid.Cid) ([]byte, error)
	ChainHasObj(context.Context, cid.Cid) (bool, error)
}

type ChainInfoAPI

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

func NewChainInfoAPI

func NewChainInfoAPI(chain *ChainSubmodule) ChainInfoAPI

func (*ChainInfoAPI) BlockTime

func (chainInfoAPI *ChainInfoAPI) BlockTime() time.Duration

todo think which module should this api belong BlockTime returns the block time used by the consensus protocol.

func (*ChainInfoAPI) ChainGetBlock

func (chainInfoAPI *ChainInfoAPI) ChainGetBlock(ctx context.Context, id cid.Cid) (*types.BlockHeader, error)

ChainGetBlock gets a block by CID

func (*ChainInfoAPI) ChainGetBlockMessages

func (chainInfoAPI *ChainInfoAPI) ChainGetBlockMessages(ctx context.Context, bid cid.Cid) (*BlockMessages, error)

ChainGetMessages gets a message collection by CID

func (*ChainInfoAPI) ChainGetMessage

func (chainInfoAPI *ChainInfoAPI) ChainGetMessage(ctx context.Context, msgID cid.Cid) (*types.UnsignedMessage, error)

func (*ChainInfoAPI) ChainGetParentMessages added in v0.9.1

func (chainInfoAPI *ChainInfoAPI) ChainGetParentMessages(ctx context.Context, bcid cid.Cid) ([]Message, error)

func (*ChainInfoAPI) ChainGetParentReceipts added in v0.9.1

func (chainInfoAPI *ChainInfoAPI) ChainGetParentReceipts(ctx context.Context, bcid cid.Cid) ([]*types.MessageReceipt, error)

func (*ChainInfoAPI) ChainGetRandomnessFromBeacon

func (chainInfoAPI *ChainInfoAPI) ChainGetRandomnessFromBeacon(ctx context.Context, key types.TipSetKey, personalization acrypto.DomainSeparationTag, randEpoch abi.ChainEpoch, entropy []byte) (abi.Randomness, error)

func (*ChainInfoAPI) ChainGetRandomnessFromTickets

func (chainInfoAPI *ChainInfoAPI) ChainGetRandomnessFromTickets(ctx context.Context, tsk types.TipSetKey, personalization acrypto.DomainSeparationTag, randEpoch abi.ChainEpoch, entropy []byte) (abi.Randomness, error)

func (*ChainInfoAPI) ChainGetReceipts

func (chainInfoAPI *ChainInfoAPI) ChainGetReceipts(ctx context.Context, id cid.Cid) ([]types.MessageReceipt, error)

ChainGetReceipts gets a receipt collection by CID

func (*ChainInfoAPI) ChainGetTipSet

func (chainInfoAPI *ChainInfoAPI) ChainGetTipSet(key types.TipSetKey) (*types.TipSet, error)

ChainTipSet returns the tipset at the given key

func (*ChainInfoAPI) ChainGetTipSetByHeight

func (chainInfoAPI *ChainInfoAPI) ChainGetTipSetByHeight(ctx context.Context, height abi.ChainEpoch, tsk types.TipSetKey) (*types.TipSet, error)

ChainGetTipSetByHeight looks back for a tipset at the specified epoch. If there are no blocks at the specified epoch, a tipset at an earlier epoch will be returned.

func (*ChainInfoAPI) ChainHead

func (chainInfoAPI *ChainInfoAPI) ChainHead(ctx context.Context) (*types.TipSet, error)

func (*ChainInfoAPI) ChainList

func (chainInfoAPI *ChainInfoAPI) ChainList(ctx context.Context, tsKey types.TipSetKey, count int) ([]types.TipSetKey, error)

ChainLs returns an iterator of tipsets from specified head by tsKey to genesis

func (*ChainInfoAPI) ChainNotify

func (chainInfoAPI *ChainInfoAPI) ChainNotify(ctx context.Context) chan []*chain.HeadChange

************Drand****************// ChainNotify subscribe to chain head change event

func (*ChainInfoAPI) ChainSetHead

func (chainInfoAPI *ChainInfoAPI) ChainSetHead(ctx context.Context, key types.TipSetKey) error

ChainSetHead sets `key` as the new head of this chain iff it exists in the nodes chain store.

func (*ChainInfoAPI) GetActor

func (chainInfoAPI *ChainInfoAPI) GetActor(ctx context.Context, addr address.Address) (*types.Actor, error)

func (*ChainInfoAPI) GetEntry

func (chainInfoAPI *ChainInfoAPI) GetEntry(ctx context.Context, height abi.ChainEpoch, round uint64) (*types.BeaconEntry, error)

GetEntry retrieves an entry from the drand server

func (*ChainInfoAPI) GetFullBlock

func (chainInfoAPI *ChainInfoAPI) GetFullBlock(ctx context.Context, id cid.Cid) (*types.FullBlock, error)

func (*ChainInfoAPI) GetParentStateRootActor added in v0.9.4

func (chainInfoAPI *ChainInfoAPI) GetParentStateRootActor(ctx context.Context, ts *types.TipSet, addr address.Address) (*types.Actor, error)

GetParentStateRootActor get the ts ParentStateRoot actor

func (*ChainInfoAPI) MessageWait

func (chainInfoAPI *ChainInfoAPI) MessageWait(ctx context.Context, msgCid cid.Cid, confidence, lookback abi.ChainEpoch) (*chain.ChainMessage, error)

MessageWait invokes the callback when a message with the given cid appears on chain. It will find the message in both the case that it is already on chain and the case that it appears in a newly mined block. An error is returned if one is encountered or if the context is canceled. Otherwise, it waits forever for the message to appear on chain.

func (*ChainInfoAPI) ProtocolParameters

func (chainInfoAPI *ChainInfoAPI) ProtocolParameters(ctx context.Context) (*ProtocolParams, error)

ProtocolParameters return chain parameters

func (*ChainInfoAPI) ResolveToKeyAddr

func (chainInfoAPI *ChainInfoAPI) ResolveToKeyAddr(ctx context.Context, addr address.Address, ts *types.TipSet) (address.Address, error)

ResolveToKeyAddr resolve user address to t0 address

func (*ChainInfoAPI) StateGetReceipt

func (chainInfoAPI *ChainInfoAPI) StateGetReceipt(ctx context.Context, msg cid.Cid, tsk types.TipSetKey) (*types.MessageReceipt, error)

func (*ChainInfoAPI) StateNetworkName

func (chainInfoAPI *ChainInfoAPI) StateNetworkName(ctx context.Context) (NetworkName, error)

func (*ChainInfoAPI) StateNetworkVersion

func (chainInfoAPI *ChainInfoAPI) StateNetworkVersion(ctx context.Context, tsk types.TipSetKey) (network.Version, error)

func (*ChainInfoAPI) StateSearchMsg

func (chainInfoAPI *ChainInfoAPI) StateSearchMsg(ctx context.Context, mCid cid.Cid) (*MsgLookup, error)

func (*ChainInfoAPI) StateWaitMsg

func (chainInfoAPI *ChainInfoAPI) StateWaitMsg(ctx context.Context, mCid cid.Cid, confidence abi.ChainEpoch) (*MsgLookup, error)

func (*ChainInfoAPI) VerifyEntry

func (chainInfoAPI *ChainInfoAPI) VerifyEntry(parent, child *types.BeaconEntry, height abi.ChainEpoch) bool

VerifyEntry verifies that child is a valid entry if its parent is.

type ChainSubmodule

type ChainSubmodule struct {
	ChainReader    *chain.Store
	MessageStore   *chain.MessageStore
	Sampler        *chain.Sampler
	Processor      *consensus.DefaultProcessor
	StatusReporter *chain.StatusReporter

	Fork fork.IFork

	CheckPoint types.TipSetKey
	Drand      beacon.Schedule

	// Wait for confirm message
	Waiter *chain.Waiter
	// contains filtered or unexported fields
}

ChainSubmodule enhances the `Node` with chain capabilities.

func NewChainSubmodule

func NewChainSubmodule(ctx context.Context,
	config chainConfig,
	repo chainRepo,
	blockstore *blockstore.BlockstoreSubmodule,
	verifier ffiwrapper.Verifier,
) (*ChainSubmodule, error)

NewChainSubmodule creates a new chain submodule.

func (*ChainSubmodule) API

func (chain *ChainSubmodule) API() *ChainAPI

func (*ChainSubmodule) Start

func (chain *ChainSubmodule) Start(ctx context.Context) error

Start loads the chain from disk.

func (*ChainSubmodule) Stop

func (chain *ChainSubmodule) Stop(ctx context.Context)

type Deadline

type Deadline struct {
	PostSubmissions bitfield.BitField
}

type IAccount added in v0.9.1

type IAccount interface {
	StateAccountKey(ctx context.Context, addr address.Address, tsk types.TipSetKey) (address.Address, error)
}

type IActor added in v0.9.1

type IActor interface {
	StateGetActor(ctx context.Context, actor address.Address, tsk types.TipSetKey) (*types.Actor, error)
	ListActor(ctx context.Context) (map[address.Address]*types.Actor, error)
}

type IBeacon added in v0.9.1

type IBeacon interface {
	BeaconGetEntry(ctx context.Context, epoch abi.ChainEpoch) (*types.BeaconEntry, error)
}

type IChain added in v0.9.1

type IChain interface {
	IAccount
	IActor
	IBeacon
	IMinerState
	IChainInfo
}

type IChainInfo added in v0.9.1

type IChainInfo interface {
	BlockTime() time.Duration

	ChainList(ctx context.Context, tsKey types.TipSetKey, count int) ([]types.TipSetKey, error)
	ChainHead(ctx context.Context) (*types.TipSet, error)
	ChainSetHead(ctx context.Context, key types.TipSetKey) error
	ChainGetTipSet(key types.TipSetKey) (*types.TipSet, error)
	ChainGetTipSetByHeight(ctx context.Context, height abi.ChainEpoch, tsk types.TipSetKey) (*types.TipSet, error)
	ChainGetRandomnessFromBeacon(ctx context.Context, key types.TipSetKey, personalization acrypto.DomainSeparationTag, randEpoch abi.ChainEpoch, entropy []byte) (abi.Randomness, error)
	ChainGetRandomnessFromTickets(ctx context.Context, tsk types.TipSetKey, personalization acrypto.DomainSeparationTag, randEpoch abi.ChainEpoch, entropy []byte) (abi.Randomness, error)
	ChainGetBlock(ctx context.Context, id cid.Cid) (*types.BlockHeader, error)
	ChainGetMessage(ctx context.Context, msgID cid.Cid) (*types.UnsignedMessage, error)
	ChainGetBlockMessages(ctx context.Context, bid cid.Cid) (*BlockMessages, error)
	ChainGetReceipts(ctx context.Context, id cid.Cid) ([]types.MessageReceipt, error)
	ChainGetParentMessages(ctx context.Context, bcid cid.Cid) ([]Message, error)
	ChainGetParentReceipts(ctx context.Context, bcid cid.Cid) ([]*types.MessageReceipt, error)
	ChainNotify(ctx context.Context) chan []*chain.HeadChange

	GetFullBlock(ctx context.Context, id cid.Cid) (*types.FullBlock, error)
	GetActor(ctx context.Context, addr address.Address) (*types.Actor, error)
	GetParentStateRootActor(ctx context.Context, ts *types.TipSet, addr address.Address) (*types.Actor, error)
	GetEntry(ctx context.Context, height abi.ChainEpoch, round uint64) (*types.BeaconEntry, error)

	MessageWait(ctx context.Context, msgCid cid.Cid, confidence, lookback abi.ChainEpoch) (*chain.ChainMessage, error)

	ProtocolParameters(ctx context.Context) (*ProtocolParams, error)

	ResolveToKeyAddr(ctx context.Context, addr address.Address, ts *types.TipSet) (address.Address, error)

	StateNetworkName(ctx context.Context) (NetworkName, error)
	StateSearchMsg(ctx context.Context, mCid cid.Cid) (*MsgLookup, error)
	StateWaitMsg(ctx context.Context, mCid cid.Cid, confidence abi.ChainEpoch) (*MsgLookup, error)
	StateGetReceipt(ctx context.Context, msg cid.Cid, tsk types.TipSetKey) (*types.MessageReceipt, error)
	StateNetworkVersion(ctx context.Context, tsk types.TipSetKey) (network.Version, error)

	VerifyEntry(parent, child *types.BeaconEntry, height abi.ChainEpoch) bool
}

type IMinerState added in v0.9.1

type IMinerState interface {
	StateMinerSectorAllocated(ctx context.Context, maddr address.Address, s abi.SectorNumber, tsk types.TipSetKey) (bool, error)
	StateSectorPreCommitInfo(ctx context.Context, maddr address.Address, n abi.SectorNumber, tsk types.TipSetKey) (miner.SectorPreCommitOnChainInfo, error)
	StateSectorGetInfo(ctx context.Context, maddr address.Address, n abi.SectorNumber, tsk types.TipSetKey) (*miner.SectorOnChainInfo, error)
	StateSectorPartition(ctx context.Context, maddr address.Address, sectorNumber abi.SectorNumber, tsk types.TipSetKey) (*miner.SectorLocation, error)
	StateMinerSectorSize(ctx context.Context, maddr address.Address, tsk types.TipSetKey) (abi.SectorSize, error)
	StateMinerInfo(ctx context.Context, maddr address.Address, tsk types.TipSetKey) (miner.MinerInfo, error)
	StateMinerWorkerAddress(ctx context.Context, maddr address.Address, tsk types.TipSetKey) (address.Address, error)
	StateMinerRecoveries(ctx context.Context, maddr address.Address, tsk types.TipSetKey) (bitfield.BitField, error)
	StateMinerFaults(ctx context.Context, maddr address.Address, tsk types.TipSetKey) (bitfield.BitField, error)
	StateMinerProvingDeadline(ctx context.Context, maddr address.Address, tsk types.TipSetKey) (*dline.Info, error)
	StateMinerPartitions(ctx context.Context, maddr address.Address, dlIdx uint64, tsk types.TipSetKey) ([]Partition, error)
	StateMinerDeadlines(ctx context.Context, maddr address.Address, tsk types.TipSetKey) ([]Deadline, error)
	StateMinerSectors(ctx context.Context, maddr address.Address, sectorNos *bitfield.BitField, tsk types.TipSetKey) ([]*miner.SectorOnChainInfo, error)
	StateMarketStorageDeal(ctx context.Context, dealID abi.DealID, tsk types.TipSetKey) (*MarketDeal, error)
	StateMinerPreCommitDepositForPower(ctx context.Context, maddr address.Address, pci miner.SectorPreCommitInfo, tsk types.TipSetKey) (big.Int, error)
	StateMinerInitialPledgeCollateral(ctx context.Context, maddr address.Address, pci miner.SectorPreCommitInfo, tsk types.TipSetKey) (big.Int, error)
	StateVMCirculatingSupplyInternal(ctx context.Context, tsk types.TipSetKey) (chain.CirculatingSupply, error)
	StateCirculatingSupply(ctx context.Context, tsk types.TipSetKey) (abi.TokenAmount, error)
	StateMarketDeals(ctx context.Context, tsk types.TipSetKey) (map[string]pstate.MarketDeal, error)
	StateMinerActiveSectors(ctx context.Context, maddr address.Address, tsk types.TipSetKey) ([]*miner.SectorOnChainInfo, error)
	StateLookupID(ctx context.Context, addr address.Address, tsk types.TipSetKey) (address.Address, error)
	StateListMiners(ctx context.Context, tsk types.TipSetKey) ([]address.Address, error)
	StateListActors(ctx context.Context, tsk types.TipSetKey) ([]address.Address, error)
	StateMinerPower(ctx context.Context, addr address.Address, tsk types.TipSetKey) (*power.MinerPower, error)
	StateMinerAvailableBalance(ctx context.Context, maddr address.Address, tsk types.TipSetKey) (big.Int, error)
	StateSectorExpiration(ctx context.Context, maddr address.Address, sectorNumber abi.SectorNumber, tsk types.TipSetKey) (*miner.SectorExpiration, error)
	StateMinerSectorCount(ctx context.Context, addr address.Address, tsk types.TipSetKey) (MinerSectors, error)
	StateMarketBalance(ctx context.Context, addr address.Address, tsk types.TipSetKey) (MarketBalance, error)
}

type MarketBalance

type MarketBalance struct {
	Escrow big.Int
	Locked big.Int
}

type MarketDeal

type MarketDeal struct {
	Proposal market.DealProposal
	State    market.DealState
}

type Message added in v0.9.1

type Message struct {
	Cid     cid.Cid
	Message *types.UnsignedMessage
}

type MinerSectors

type MinerSectors struct {
	// Live sectors that should be proven.
	Live uint64
	// Sectors actively contributing to power.
	Active uint64
	// Sectors with failed proofs.
	Faulty uint64
}

type MinerStateAPI

type MinerStateAPI struct {
	*ChainSubmodule
}

func NewMinerStateAPI

func NewMinerStateAPI(chain *ChainSubmodule) MinerStateAPI

func (*MinerStateAPI) StateCirculatingSupply

func (minerStateAPI *MinerStateAPI) StateCirculatingSupply(ctx context.Context, tsk types.TipSetKey) (abi.TokenAmount, error)

func (*MinerStateAPI) StateListActors

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

func (*MinerStateAPI) StateListMiners

func (minerStateAPI *MinerStateAPI) StateListMiners(ctx context.Context, tsk types.TipSetKey) ([]address.Address, error)

func (*MinerStateAPI) StateLookupID

func (minerStateAPI *MinerStateAPI) StateLookupID(ctx context.Context, addr address.Address, tsk types.TipSetKey) (address.Address, error)

func (*MinerStateAPI) StateMarketBalance

func (minerStateAPI *MinerStateAPI) StateMarketBalance(ctx context.Context, addr address.Address, tsk types.TipSetKey) (MarketBalance, error)

func (*MinerStateAPI) StateMarketDeals

func (minerStateAPI *MinerStateAPI) StateMarketDeals(ctx context.Context, tsk types.TipSetKey) (map[string]pstate.MarketDeal, error)

func (*MinerStateAPI) StateMarketStorageDeal

func (minerStateAPI *MinerStateAPI) StateMarketStorageDeal(ctx context.Context, dealID abi.DealID, tsk types.TipSetKey) (*MarketDeal, error)

func (*MinerStateAPI) StateMinerActiveSectors

func (minerStateAPI *MinerStateAPI) StateMinerActiveSectors(ctx context.Context, maddr address.Address, tsk types.TipSetKey) ([]*miner.SectorOnChainInfo, error)

func (*MinerStateAPI) StateMinerAvailableBalance

func (minerStateAPI *MinerStateAPI) StateMinerAvailableBalance(ctx context.Context, maddr address.Address, tsk types.TipSetKey) (big.Int, error)

func (*MinerStateAPI) StateMinerDeadlines

func (minerStateAPI *MinerStateAPI) StateMinerDeadlines(ctx context.Context, maddr address.Address, tsk types.TipSetKey) ([]Deadline, error)

func (*MinerStateAPI) StateMinerFaults

func (minerStateAPI *MinerStateAPI) StateMinerFaults(ctx context.Context, maddr address.Address, tsk types.TipSetKey) (bitfield.BitField, error)

func (*MinerStateAPI) StateMinerInfo

func (minerStateAPI *MinerStateAPI) StateMinerInfo(ctx context.Context, maddr address.Address, tsk types.TipSetKey) (miner.MinerInfo, error)

func (*MinerStateAPI) StateMinerInitialPledgeCollateral

func (minerStateAPI *MinerStateAPI) StateMinerInitialPledgeCollateral(ctx context.Context, maddr address.Address, pci miner.SectorPreCommitInfo, tsk types.TipSetKey) (big.Int, error)

func (*MinerStateAPI) StateMinerPartitions

func (minerStateAPI *MinerStateAPI) StateMinerPartitions(ctx context.Context, maddr address.Address, dlIdx uint64, tsk types.TipSetKey) ([]Partition, error)

func (*MinerStateAPI) StateMinerPower

func (minerStateAPI *MinerStateAPI) StateMinerPower(ctx context.Context, addr address.Address, tsk types.TipSetKey) (*power.MinerPower, error)

func (*MinerStateAPI) StateMinerPreCommitDepositForPower

func (minerStateAPI *MinerStateAPI) StateMinerPreCommitDepositForPower(ctx context.Context, maddr address.Address, pci miner.SectorPreCommitInfo, tsk types.TipSetKey) (big.Int, error)

func (*MinerStateAPI) StateMinerProvingDeadline

func (minerStateAPI *MinerStateAPI) StateMinerProvingDeadline(ctx context.Context, maddr address.Address, tsk types.TipSetKey) (*dline.Info, error)

func (*MinerStateAPI) StateMinerRecoveries

func (minerStateAPI *MinerStateAPI) StateMinerRecoveries(ctx context.Context, maddr address.Address, tsk types.TipSetKey) (bitfield.BitField, error)

func (*MinerStateAPI) StateMinerSectorAllocated

func (minerStateAPI *MinerStateAPI) StateMinerSectorAllocated(ctx context.Context, maddr address.Address, s abi.SectorNumber, tsk types.TipSetKey) (bool, error)

func (*MinerStateAPI) StateMinerSectorCount

func (minerStateAPI *MinerStateAPI) StateMinerSectorCount(ctx context.Context, addr address.Address, tsk types.TipSetKey) (MinerSectors, error)

func (*MinerStateAPI) StateMinerSectorSize

func (minerStateAPI *MinerStateAPI) StateMinerSectorSize(ctx context.Context, maddr address.Address, tsk types.TipSetKey) (abi.SectorSize, error)

func (*MinerStateAPI) StateMinerSectors

func (minerStateAPI *MinerStateAPI) StateMinerSectors(ctx context.Context, maddr address.Address, sectorNos *bitfield.BitField, tsk types.TipSetKey) ([]*miner.SectorOnChainInfo, error)

func (*MinerStateAPI) StateMinerWorkerAddress

func (minerStateAPI *MinerStateAPI) StateMinerWorkerAddress(ctx context.Context, maddr address.Address, tsk types.TipSetKey) (address.Address, error)

func (*MinerStateAPI) StateSectorExpiration

func (minerStateAPI *MinerStateAPI) StateSectorExpiration(ctx context.Context, maddr address.Address, sectorNumber abi.SectorNumber, tsk types.TipSetKey) (*miner.SectorExpiration, error)

func (*MinerStateAPI) StateSectorGetInfo

func (minerStateAPI *MinerStateAPI) StateSectorGetInfo(ctx context.Context, maddr address.Address, n abi.SectorNumber, tsk types.TipSetKey) (*miner.SectorOnChainInfo, error)

func (*MinerStateAPI) StateSectorPartition

func (minerStateAPI *MinerStateAPI) StateSectorPartition(ctx context.Context, maddr address.Address, sectorNumber abi.SectorNumber, tsk types.TipSetKey) (*miner.SectorLocation, error)

func (*MinerStateAPI) StateSectorPreCommitInfo

func (minerStateAPI *MinerStateAPI) StateSectorPreCommitInfo(ctx context.Context, maddr address.Address, n abi.SectorNumber, tsk types.TipSetKey) (miner.SectorPreCommitOnChainInfo, error)

func (*MinerStateAPI) StateVMCirculatingSupplyInternal

func (minerStateAPI *MinerStateAPI) StateVMCirculatingSupplyInternal(ctx context.Context, tsk types.TipSetKey) (chain.CirculatingSupply, error)

type MsgLookup added in v0.9.1

type MsgLookup = chain.MsgLookup

type NetworkName

type NetworkName string

type Partition

type Partition struct {
	AllSectors        bitfield.BitField
	FaultySectors     bitfield.BitField
	RecoveringSectors bitfield.BitField
	LiveSectors       bitfield.BitField
	ActiveSectors     bitfield.BitField
}

type ProtocolParams

type ProtocolParams struct {
	Network          string
	BlockTime        time.Duration
	SupportedSectors []SectorInfo
}

ProtocolParams contains parameters that modify the filecoin nodes protocol

type SectorInfo

type SectorInfo struct {
	Size         abi.SectorSize
	MaxPieceSize abi.UnpaddedPieceSize
}

SectorInfo provides information about a sector construction

Jump to

Keyboard shortcuts

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