piece

package
v1.28.0-rc5 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2024 License: Apache-2.0, MIT Imports: 17 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AllocationAPI

type AllocationAPI interface {
	StateGetAllocationForPendingDeal(ctx context.Context, dealId abi.DealID, tsk types.TipSetKey) (*verifregtypes.Allocation, error)
	StateGetAllocation(ctx context.Context, clientAddr address.Address, allocationId verifregtypes.AllocationId, tsk types.TipSetKey) (*verifregtypes.Allocation, error)
}

type DealSchedule

type DealSchedule struct {
	StartEpoch abi.ChainEpoch
	EndEpoch   abi.ChainEpoch
}

DealSchedule communicates the time interval of a storage deal. The deal must appear in a sealed (proven) sector no later than StartEpoch, otherwise it is invalid.

func (*DealSchedule) MarshalCBOR

func (t *DealSchedule) MarshalCBOR(w io.Writer) error

func (*DealSchedule) UnmarshalCBOR

func (t *DealSchedule) UnmarshalCBOR(r io.Reader) (err error)

type PieceDealInfo

type PieceDealInfo struct {
	// "Old" builtin-market deal info
	PublishCid   *cid.Cid
	DealID       abi.DealID
	DealProposal *market.DealProposal

	// Common deal info, required for all pieces
	// TODO: https://github.com/filecoin-project/lotus/issues/11237
	DealSchedule DealSchedule

	// Direct Data Onboarding
	// When PieceActivationManifest is set, builtin-market deal info must not be set
	PieceActivationManifest *miner.PieceActivationManifest

	// Best-effort deal asks
	KeepUnsealed bool
}

DealInfo is a tuple of deal identity and its schedule

func (*PieceDealInfo) EndEpoch

func (ds *PieceDealInfo) EndEpoch() (abi.ChainEpoch, error)

EndEpoch returns the minimum epoch until which the sector containing this deal must be committed until.

func (*PieceDealInfo) GetAllocation

func (ds *PieceDealInfo) GetAllocation(ctx context.Context, aapi AllocationAPI, tsk types.TipSetKey) (*verifregtypes.Allocation, error)

func (*PieceDealInfo) Impl

func (ds *PieceDealInfo) Impl() PieceDealInfo

func (*PieceDealInfo) KeepUnsealedRequested

func (ds *PieceDealInfo) KeepUnsealedRequested() bool

func (*PieceDealInfo) Key

func (ds *PieceDealInfo) Key() PieceKey

Key returns a unique identifier for this deal info, for use in maps.

func (*PieceDealInfo) MarshalCBOR

func (t *PieceDealInfo) MarshalCBOR(w io.Writer) error

func (*PieceDealInfo) PieceCID

func (ds *PieceDealInfo) PieceCID() cid.Cid

func (*PieceDealInfo) Size added in v1.27.1

func (ds *PieceDealInfo) Size() abi.PaddedPieceSize

func (*PieceDealInfo) StartEpoch

func (ds *PieceDealInfo) StartEpoch() (abi.ChainEpoch, error)

StartEpoch returns the last epoch in which the sector containing this deal must be sealed (committed) in order for the deal to be valid.

func (*PieceDealInfo) String

func (ds *PieceDealInfo) String() string

func (*PieceDealInfo) UnmarshalCBOR

func (t *PieceDealInfo) UnmarshalCBOR(r io.Reader) (err error)

func (*PieceDealInfo) Valid

func (ds *PieceDealInfo) Valid(nv network.Version) error

Valid validates the deal info after being accepted through RPC, checks that the deal metadata is well-formed.

type PieceKey

type PieceKey string

Jump to

Keyboard shortcuts

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