Documentation ¶
Index ¶
- func NewAPIBlockstore(cio ChainIO) blockstore.Blockstore
- type AccountAPI
- type ActorAPI
- type BeaconAPI
- type BlockMessages
- type ChainAPI
- type ChainIO
- type ChainInfoAPI
- func (chainInfoAPI *ChainInfoAPI) BlockTime() time.Duration
- func (chainInfoAPI *ChainInfoAPI) ChainGetBlock(ctx context.Context, id cid.Cid) (*types.BlockHeader, error)
- func (chainInfoAPI *ChainInfoAPI) ChainGetBlockMessages(ctx context.Context, bid cid.Cid) (*BlockMessages, error)
- func (chainInfoAPI *ChainInfoAPI) ChainGetMessage(ctx context.Context, msgID cid.Cid) (*types.UnsignedMessage, error)
- func (chainInfoAPI *ChainInfoAPI) ChainGetParentMessages(ctx context.Context, bcid cid.Cid) ([]Message, error)
- func (chainInfoAPI *ChainInfoAPI) ChainGetParentReceipts(ctx context.Context, bcid cid.Cid) ([]*types.MessageReceipt, error)
- func (chainInfoAPI *ChainInfoAPI) ChainGetRandomnessFromBeacon(ctx context.Context, key types.TipSetKey, ...) (abi.Randomness, error)
- func (chainInfoAPI *ChainInfoAPI) ChainGetRandomnessFromTickets(ctx context.Context, tsk types.TipSetKey, ...) (abi.Randomness, error)
- func (chainInfoAPI *ChainInfoAPI) ChainGetReceipts(ctx context.Context, id cid.Cid) ([]types.MessageReceipt, error)
- func (chainInfoAPI *ChainInfoAPI) ChainGetTipSet(key types.TipSetKey) (*types.TipSet, error)
- func (chainInfoAPI *ChainInfoAPI) ChainGetTipSetByHeight(ctx context.Context, height abi.ChainEpoch, tsk types.TipSetKey) (*types.TipSet, error)
- func (chainInfoAPI *ChainInfoAPI) ChainHead(ctx context.Context) (*types.TipSet, error)
- func (chainInfoAPI *ChainInfoAPI) ChainList(ctx context.Context, tsKey types.TipSetKey, count int) ([]types.TipSetKey, error)
- func (chainInfoAPI *ChainInfoAPI) ChainNotify(ctx context.Context) chan []*chain.HeadChange
- func (chainInfoAPI *ChainInfoAPI) ChainSetHead(ctx context.Context, key types.TipSetKey) error
- func (chainInfoAPI *ChainInfoAPI) GetActor(ctx context.Context, addr address.Address) (*types.Actor, error)
- func (chainInfoAPI *ChainInfoAPI) GetEntry(ctx context.Context, height abi.ChainEpoch, round uint64) (*types.BeaconEntry, error)
- func (chainInfoAPI *ChainInfoAPI) GetFullBlock(ctx context.Context, id cid.Cid) (*types.FullBlock, error)
- func (chainInfoAPI *ChainInfoAPI) GetParentStateRootActor(ctx context.Context, ts *types.TipSet, addr address.Address) (*types.Actor, error)
- func (chainInfoAPI *ChainInfoAPI) MessageWait(ctx context.Context, msgCid cid.Cid, confidence, lookback abi.ChainEpoch) (*chain.ChainMessage, error)
- func (chainInfoAPI *ChainInfoAPI) ProtocolParameters(ctx context.Context) (*ProtocolParams, error)
- func (chainInfoAPI *ChainInfoAPI) ResolveToKeyAddr(ctx context.Context, addr address.Address, ts *types.TipSet) (address.Address, error)
- func (chainInfoAPI *ChainInfoAPI) StateGetReceipt(ctx context.Context, msg cid.Cid, tsk types.TipSetKey) (*types.MessageReceipt, error)
- func (chainInfoAPI *ChainInfoAPI) StateNetworkName(ctx context.Context) (NetworkName, error)
- func (chainInfoAPI *ChainInfoAPI) StateNetworkVersion(ctx context.Context, tsk types.TipSetKey) (network.Version, error)
- func (chainInfoAPI *ChainInfoAPI) StateSearchMsg(ctx context.Context, mCid cid.Cid) (*MsgLookup, error)
- func (chainInfoAPI *ChainInfoAPI) StateWaitMsg(ctx context.Context, mCid cid.Cid, confidence abi.ChainEpoch) (*MsgLookup, error)
- func (chainInfoAPI *ChainInfoAPI) VerifyEntry(parent, child *types.BeaconEntry, height abi.ChainEpoch) bool
- type ChainSubmodule
- type Deadline
- type IAccount
- type IActor
- type IBeacon
- type IChain
- type IChainInfo
- type IMinerState
- type MarketBalance
- type MarketDeal
- type Message
- type MinerSectors
- type MinerStateAPI
- func (minerStateAPI *MinerStateAPI) StateCirculatingSupply(ctx context.Context, tsk types.TipSetKey) (abi.TokenAmount, error)
- func (minerStateAPI *MinerStateAPI) StateListActors(ctx context.Context, tsk types.TipSetKey) ([]address.Address, error)
- func (minerStateAPI *MinerStateAPI) StateListMiners(ctx context.Context, tsk types.TipSetKey) ([]address.Address, error)
- func (minerStateAPI *MinerStateAPI) StateLookupID(ctx context.Context, addr address.Address, tsk types.TipSetKey) (address.Address, error)
- func (minerStateAPI *MinerStateAPI) StateMarketBalance(ctx context.Context, addr address.Address, tsk types.TipSetKey) (MarketBalance, error)
- func (minerStateAPI *MinerStateAPI) StateMarketDeals(ctx context.Context, tsk types.TipSetKey) (map[string]pstate.MarketDeal, error)
- func (minerStateAPI *MinerStateAPI) StateMarketStorageDeal(ctx context.Context, dealID abi.DealID, tsk types.TipSetKey) (*MarketDeal, error)
- func (minerStateAPI *MinerStateAPI) StateMinerActiveSectors(ctx context.Context, maddr address.Address, tsk types.TipSetKey) ([]*miner.SectorOnChainInfo, error)
- func (minerStateAPI *MinerStateAPI) StateMinerAvailableBalance(ctx context.Context, maddr address.Address, tsk types.TipSetKey) (big.Int, error)
- func (minerStateAPI *MinerStateAPI) StateMinerDeadlines(ctx context.Context, maddr address.Address, tsk types.TipSetKey) ([]Deadline, error)
- func (minerStateAPI *MinerStateAPI) StateMinerFaults(ctx context.Context, maddr address.Address, tsk types.TipSetKey) (bitfield.BitField, error)
- func (minerStateAPI *MinerStateAPI) StateMinerInfo(ctx context.Context, maddr address.Address, tsk types.TipSetKey) (miner.MinerInfo, error)
- func (minerStateAPI *MinerStateAPI) StateMinerInitialPledgeCollateral(ctx context.Context, maddr address.Address, pci miner.SectorPreCommitInfo, ...) (big.Int, error)
- func (minerStateAPI *MinerStateAPI) StateMinerPartitions(ctx context.Context, maddr address.Address, dlIdx uint64, tsk types.TipSetKey) ([]Partition, error)
- func (minerStateAPI *MinerStateAPI) StateMinerPower(ctx context.Context, addr address.Address, tsk types.TipSetKey) (*power.MinerPower, error)
- func (minerStateAPI *MinerStateAPI) StateMinerPreCommitDepositForPower(ctx context.Context, maddr address.Address, pci miner.SectorPreCommitInfo, ...) (big.Int, error)
- func (minerStateAPI *MinerStateAPI) StateMinerProvingDeadline(ctx context.Context, maddr address.Address, tsk types.TipSetKey) (*dline.Info, error)
- func (minerStateAPI *MinerStateAPI) StateMinerRecoveries(ctx context.Context, maddr address.Address, tsk types.TipSetKey) (bitfield.BitField, error)
- func (minerStateAPI *MinerStateAPI) StateMinerSectorAllocated(ctx context.Context, maddr address.Address, s abi.SectorNumber, ...) (bool, error)
- func (minerStateAPI *MinerStateAPI) StateMinerSectorCount(ctx context.Context, addr address.Address, tsk types.TipSetKey) (MinerSectors, error)
- func (minerStateAPI *MinerStateAPI) StateMinerSectorSize(ctx context.Context, maddr address.Address, tsk types.TipSetKey) (abi.SectorSize, error)
- func (minerStateAPI *MinerStateAPI) StateMinerSectors(ctx context.Context, maddr address.Address, sectorNos *bitfield.BitField, ...) ([]*miner.SectorOnChainInfo, error)
- func (minerStateAPI *MinerStateAPI) StateMinerWorkerAddress(ctx context.Context, maddr address.Address, tsk types.TipSetKey) (address.Address, error)
- func (minerStateAPI *MinerStateAPI) StateSectorExpiration(ctx context.Context, maddr address.Address, sectorNumber abi.SectorNumber, ...) (*miner.SectorExpiration, error)
- func (minerStateAPI *MinerStateAPI) StateSectorGetInfo(ctx context.Context, maddr address.Address, n abi.SectorNumber, ...) (*miner.SectorOnChainInfo, error)
- func (minerStateAPI *MinerStateAPI) StateSectorPartition(ctx context.Context, maddr address.Address, sectorNumber abi.SectorNumber, ...) (*miner.SectorLocation, error)
- func (minerStateAPI *MinerStateAPI) StateSectorPreCommitInfo(ctx context.Context, maddr address.Address, n abi.SectorNumber, ...) (miner.SectorPreCommitOnChainInfo, error)
- func (minerStateAPI *MinerStateAPI) StateVMCirculatingSupplyInternal(ctx context.Context, tsk types.TipSetKey) (chain.CirculatingSupply, error)
- type MsgLookup
- type NetworkName
- type Partition
- type ProtocolParams
- type SectorInfo
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 ¶
type ActorAPI ¶
type ActorAPI struct {
// contains filtered or unexported fields
}
func NewActorAPI ¶
func NewActorAPI(chain *ChainSubmodule) ActorAPI
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 ChainAPI ¶
type ChainAPI struct { AccountAPI ActorAPI BeaconAPI ChainInfoAPI MinerStateAPI }
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 ¶
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) 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 ¶
ChainSetHead sets `key` as the new head of this chain iff it exists in the nodes chain store.
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) 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) 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 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 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 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) StateListMiners ¶
func (*MinerStateAPI) StateLookupID ¶
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) StateMinerDeadlines ¶
func (*MinerStateAPI) StateMinerFaults ¶
func (*MinerStateAPI) StateMinerInfo ¶
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) 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) StateMinerRecoveries ¶
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) 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 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