2024-01-19 15:07:06 +00:00
|
|
|
package fakelm
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
2024-02-11 13:08:54 +00:00
|
|
|
|
2024-01-20 14:52:38 +00:00
|
|
|
"github.com/google/uuid"
|
|
|
|
|
2024-01-19 15:07:06 +00:00
|
|
|
"github.com/filecoin-project/go-address"
|
|
|
|
"github.com/filecoin-project/go-state-types/abi"
|
2024-01-20 14:52:38 +00:00
|
|
|
|
2024-01-19 15:07:06 +00:00
|
|
|
"github.com/filecoin-project/lotus/api"
|
|
|
|
"github.com/filecoin-project/lotus/storage/sealer/storiface"
|
|
|
|
)
|
|
|
|
|
2024-04-04 12:06:21 +00:00
|
|
|
// MinimalLMApi is a subset of the LotusMiner API that is exposed by Curio
|
2024-01-19 15:07:06 +00:00
|
|
|
// for consumption by boost
|
|
|
|
type MinimalLMApi interface {
|
|
|
|
ActorAddress(context.Context) (address.Address, error)
|
|
|
|
|
|
|
|
WorkerJobs(context.Context) (map[uuid.UUID][]storiface.WorkerJob, error)
|
|
|
|
|
|
|
|
SectorsStatus(ctx context.Context, sid abi.SectorNumber, showOnChainInfo bool) (api.SectorInfo, error)
|
|
|
|
|
|
|
|
SectorsList(context.Context) ([]abi.SectorNumber, error)
|
|
|
|
SectorsSummary(ctx context.Context) (map[api.SectorState]int, error)
|
|
|
|
|
|
|
|
SectorsListInStates(context.Context, []api.SectorState) ([]abi.SectorNumber, error)
|
|
|
|
|
|
|
|
StorageRedeclareLocal(context.Context, *storiface.ID, bool) error
|
|
|
|
|
|
|
|
ComputeDataCid(ctx context.Context, pieceSize abi.UnpaddedPieceSize, pieceData storiface.Data) (abi.PieceInfo, error)
|
|
|
|
SectorAddPieceToAny(ctx context.Context, size abi.UnpaddedPieceSize, r storiface.Data, d api.PieceDealInfo) (api.SectorOffset, error)
|
|
|
|
}
|