storage

package
v1.17.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2022 License: Apache-2.0, MIT Imports: 42 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventsAdapter added in v0.3.0

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

func NewEventsAdapter added in v0.3.0

func NewEventsAdapter(api *events.Events) EventsAdapter

func (EventsAdapter) ChainAt added in v0.3.0

func (e EventsAdapter) ChainAt(hnd sealing.HeightHandler, rev sealing.RevertHandler, confidence int, h abi.ChainEpoch) error

type Miner

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

Miner is the central miner entrypoint object inside Lotus. It is instantiated in the node builder, along with the WindowPoStScheduler.

This object is the owner of the sealing pipeline. Most of the actual logic lives in the pipeline module (sealing.Sealing), and the Miner object exposes it to the rest of the system by proxying calls.

Miner#Run starts the sealing FSM.

func NewMiner

func NewMiner(api fullNodeFilteredAPI,
	maddr address.Address,
	ds datastore.Batching,
	sealer sealer.SectorManager,
	sc pipeline.SectorIDCounter,
	verif ffiwrapper.Verifier,
	prover ffiwrapper.Prover,
	gsd dtypes.GetSealingConfigFunc,
	feeCfg config.MinerFeeConfig,
	journal journal.Journal,
	as *ctladdr.AddressSelector) (*Miner, error)

NewMiner creates a new Miner object.

func (*Miner) Address added in v0.3.0

func (m *Miner) Address() address.Address

func (*Miner) CommitFlush added in v1.10.0

func (m *Miner) CommitFlush(ctx context.Context) ([]sealiface.CommitBatchRes, error)

func (*Miner) CommitPending added in v1.10.0

func (m *Miner) CommitPending(ctx context.Context) ([]abi.SectorID, error)

func (*Miner) ForceSectorState added in v0.2.5

func (m *Miner) ForceSectorState(ctx context.Context, id abi.SectorNumber, state pipeline.SectorState) error

func (*Miner) ListSectors

func (m *Miner) ListSectors() ([]pipeline.SectorInfo, error)

func (*Miner) MarkForUpgrade added in v0.5.0

func (m *Miner) MarkForUpgrade(ctx context.Context, id abi.SectorNumber, snap bool) error

func (*Miner) PledgeSector

func (m *Miner) PledgeSector(ctx context.Context) (storage.SectorRef, error)

func (*Miner) RemoveSector added in v0.4.1

func (m *Miner) RemoveSector(ctx context.Context, id abi.SectorNumber) error

func (*Miner) Run

func (m *Miner) Run(ctx context.Context) error

Run starts the sealing FSM in the background, running preliminary checks first.

func (*Miner) SectorAbortUpgrade added in v1.14.0

func (m *Miner) SectorAbortUpgrade(sectorNum abi.SectorNumber) error

func (*Miner) SectorAddPieceToAny added in v1.11.1

func (m *Miner) SectorAddPieceToAny(ctx context.Context, size abi.UnpaddedPieceSize, r storage.Data, d api.PieceDealInfo) (api.SectorOffset, error)

func (*Miner) SectorMatchPendingPiecesToOpenSectors added in v1.14.0

func (m *Miner) SectorMatchPendingPiecesToOpenSectors(ctx context.Context) error

func (*Miner) SectorPreCommitFlush added in v1.10.0

func (m *Miner) SectorPreCommitFlush(ctx context.Context) ([]sealiface.PreCommitBatchRes, error)

func (*Miner) SectorPreCommitPending added in v1.10.0

func (m *Miner) SectorPreCommitPending(ctx context.Context) ([]abi.SectorID, error)

func (*Miner) SectorsStatus added in v1.11.1

func (m *Miner) SectorsStatus(ctx context.Context, sid abi.SectorNumber, showOnChainInfo bool) (api.SectorInfo, error)

func (*Miner) StartPackingSector added in v0.5.0

func (m *Miner) StartPackingSector(sectorNum abi.SectorNumber) error

func (*Miner) Stop

func (m *Miner) Stop(ctx context.Context) error

func (*Miner) TerminateFlush added in v1.4.1

func (m *Miner) TerminateFlush(ctx context.Context) (*cid.Cid, error)

func (*Miner) TerminatePending added in v1.4.1

func (m *Miner) TerminatePending(ctx context.Context) ([]abi.SectorID, error)

func (*Miner) TerminateSector added in v1.4.1

func (m *Miner) TerminateSector(ctx context.Context, id abi.SectorNumber) error

type SealingAPIAdapter added in v0.3.0

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

func NewSealingAPIAdapter added in v0.3.0

func NewSealingAPIAdapter(api fullNodeFilteredAPI) SealingAPIAdapter

func (SealingAPIAdapter) ChainBaseFee added in v1.10.0

func (SealingAPIAdapter) ChainGetMessage added in v1.4.2

func (s SealingAPIAdapter) ChainGetMessage(ctx context.Context, mc cid.Cid) (*types.Message, error)

func (SealingAPIAdapter) ChainHead added in v0.3.0

func (SealingAPIAdapter) ChainReadObj added in v0.3.0

func (s SealingAPIAdapter) ChainReadObj(ctx context.Context, ocid cid.Cid) ([]byte, error)

func (SealingAPIAdapter) SendMsg added in v0.3.0

func (s SealingAPIAdapter) SendMsg(ctx context.Context, from, to address.Address, method abi.MethodNum, value, maxFee abi.TokenAmount, params []byte) (cid.Cid, error)

func (SealingAPIAdapter) StateComputeDataCommitment added in v0.3.0

func (s SealingAPIAdapter) StateComputeDataCommitment(ctx context.Context, maddr address.Address, sectorType abi.RegisteredSealProof, deals []abi.DealID, tok pipeline.TipSetToken) (cid.Cid, error)

func (SealingAPIAdapter) StateGetRandomnessFromBeacon added in v1.12.0

func (s SealingAPIAdapter) StateGetRandomnessFromBeacon(ctx context.Context, personalization crypto.DomainSeparationTag, randEpoch abi.ChainEpoch, entropy []byte, tok pipeline.TipSetToken) (abi.Randomness, error)

func (SealingAPIAdapter) StateGetRandomnessFromTickets added in v1.12.0

func (s SealingAPIAdapter) StateGetRandomnessFromTickets(ctx context.Context, personalization crypto.DomainSeparationTag, randEpoch abi.ChainEpoch, entropy []byte, tok pipeline.TipSetToken) (abi.Randomness, error)

func (SealingAPIAdapter) StateLookupID added in v1.4.2

func (s SealingAPIAdapter) StateLookupID(ctx context.Context, addr address.Address, tok pipeline.TipSetToken) (address.Address, error)

func (SealingAPIAdapter) StateMarketStorageDeal added in v0.3.0

func (s SealingAPIAdapter) StateMarketStorageDeal(ctx context.Context, dealID abi.DealID, tok pipeline.TipSetToken) (*api.MarketDeal, error)

func (SealingAPIAdapter) StateMarketStorageDealProposal added in v1.4.2

func (s SealingAPIAdapter) StateMarketStorageDealProposal(ctx context.Context, dealID abi.DealID, tok pipeline.TipSetToken) (market.DealProposal, error)

func (SealingAPIAdapter) StateMinerActiveSectors added in v1.14.0

func (s SealingAPIAdapter) StateMinerActiveSectors(ctx context.Context, maddr address.Address, tok pipeline.TipSetToken) (bitfield.BitField, error)

func (SealingAPIAdapter) StateMinerAvailableBalance added in v1.11.1

func (s SealingAPIAdapter) StateMinerAvailableBalance(ctx context.Context, maddr address.Address, tok pipeline.TipSetToken) (big.Int, error)

func (SealingAPIAdapter) StateMinerDeadlines added in v0.3.0

func (s SealingAPIAdapter) StateMinerDeadlines(ctx context.Context, maddr address.Address, tok pipeline.TipSetToken) ([]api.Deadline, error)

func (SealingAPIAdapter) StateMinerInfo added in v1.2.0

func (s SealingAPIAdapter) StateMinerInfo(ctx context.Context, maddr address.Address, tok pipeline.TipSetToken) (api.MinerInfo, error)

func (SealingAPIAdapter) StateMinerInitialPledgeCollateral added in v0.3.0

func (s SealingAPIAdapter) StateMinerInitialPledgeCollateral(ctx context.Context, a address.Address, pci minertypes.SectorPreCommitInfo, tok pipeline.TipSetToken) (big.Int, error)

func (SealingAPIAdapter) StateMinerPartitions added in v1.4.1

func (s SealingAPIAdapter) StateMinerPartitions(ctx context.Context, maddr address.Address, dlIdx uint64, tok pipeline.TipSetToken) ([]api.Partition, error)

func (SealingAPIAdapter) StateMinerPreCommitDepositForPower added in v0.5.0

func (s SealingAPIAdapter) StateMinerPreCommitDepositForPower(ctx context.Context, a address.Address, pci minertypes.SectorPreCommitInfo, tok pipeline.TipSetToken) (big.Int, error)

func (SealingAPIAdapter) StateMinerProvingDeadline added in v1.4.1

func (s SealingAPIAdapter) StateMinerProvingDeadline(ctx context.Context, maddr address.Address, tok pipeline.TipSetToken) (*dline.Info, error)

func (SealingAPIAdapter) StateMinerSectorAllocated added in v1.1.3

func (s SealingAPIAdapter) StateMinerSectorAllocated(ctx context.Context, maddr address.Address, sid abi.SectorNumber, tok pipeline.TipSetToken) (bool, error)

func (SealingAPIAdapter) StateMinerSectorSize added in v0.3.0

func (s SealingAPIAdapter) StateMinerSectorSize(ctx context.Context, maddr address.Address, tok pipeline.TipSetToken) (abi.SectorSize, error)

func (SealingAPIAdapter) StateMinerWorkerAddress added in v0.3.0

func (s SealingAPIAdapter) StateMinerWorkerAddress(ctx context.Context, maddr address.Address, tok pipeline.TipSetToken) (address.Address, error)

func (SealingAPIAdapter) StateNetworkVersion added in v0.7.2

func (s SealingAPIAdapter) StateNetworkVersion(ctx context.Context, tok pipeline.TipSetToken) (network.Version, error)

func (SealingAPIAdapter) StateSearchMsg added in v0.5.0

func (s SealingAPIAdapter) StateSearchMsg(ctx context.Context, c cid.Cid) (*pipeline.MsgLookup, error)

func (SealingAPIAdapter) StateSectorGetInfo added in v0.3.1

func (s SealingAPIAdapter) StateSectorGetInfo(ctx context.Context, maddr address.Address, sectorNumber abi.SectorNumber, tok pipeline.TipSetToken) (*miner.SectorOnChainInfo, error)

func (SealingAPIAdapter) StateSectorPartition added in v0.5.0

func (s SealingAPIAdapter) StateSectorPartition(ctx context.Context, maddr address.Address, sectorNumber abi.SectorNumber, tok pipeline.TipSetToken) (*pipeline.SectorLocation, error)

func (SealingAPIAdapter) StateSectorPreCommitInfo added in v0.3.0

func (s SealingAPIAdapter) StateSectorPreCommitInfo(ctx context.Context, maddr address.Address, sectorNumber abi.SectorNumber, tok pipeline.TipSetToken) (*minertypes.SectorPreCommitOnChainInfo, error)

func (SealingAPIAdapter) StateWaitMsg added in v0.3.0

func (s SealingAPIAdapter) StateWaitMsg(ctx context.Context, mcid cid.Cid) (pipeline.MsgLookup, error)

type SealingStateEvt added in v0.7.1

type SealingStateEvt struct {
	SectorNumber abi.SectorNumber
	SectorType   abi.RegisteredSealProof
	From         pipeline.SectorState
	After        pipeline.SectorState
	Error        string
}

SealingStateEvt is a journal event that records a sector state transition.

type StorageWpp added in v0.3.0

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

func NewWinningPoStProver added in v0.3.0

func NewWinningPoStProver(api v1api.FullNode, prover storage.Prover, verifier ffiwrapper.Verifier, miner dtypes.MinerID) (*StorageWpp, error)

func (*StorageWpp) ComputeProof added in v0.3.0

func (wpp *StorageWpp) ComputeProof(ctx context.Context, ssi []builtin.ExtendedSectorInfo, rand abi.PoStRandomness, currEpoch abi.ChainEpoch, nv network.Version) ([]builtin.PoStProof, error)

func (*StorageWpp) GenerateCandidates added in v0.3.0

func (wpp *StorageWpp) GenerateCandidates(ctx context.Context, randomness abi.PoStRandomness, eligibleSectorCount uint64) ([]uint64, error)

Directories

Path Synopsis
mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
gen
mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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