storage: Move extern/sector-storage to storage/sealer

This commit is contained in:
Łukasz Magiera 2022-06-14 20:03:38 +02:00
parent 98a48a47f8
commit a9600b8a6f
153 changed files with 340 additions and 338 deletions

View File

@ -992,7 +992,7 @@ workflows:
- test: - test:
go-test-flags: "-run=TestMulticoreSDR" go-test-flags: "-run=TestMulticoreSDR"
suite: multicore-sdr-check suite: multicore-sdr-check
target: "./extern/sector-storage/ffiwrapper" target: "./extern/sealer/ffiwrapper"
proofs-log-test: "1" proofs-log-test: "1"
- test-conformance: - test-conformance:
suite: conformance suite: conformance

View File

@ -782,7 +782,7 @@ workflows:
- test: - test:
go-test-flags: "-run=TestMulticoreSDR" go-test-flags: "-run=TestMulticoreSDR"
suite: multicore-sdr-check suite: multicore-sdr-check
target: "./extern/sector-storage/ffiwrapper" target: "./extern/sealer/ffiwrapper"
proofs-log-test: "1" proofs-log-test: "1"
- test-conformance: - test-conformance:
suite: conformance suite: conformance

View File

@ -22,9 +22,9 @@ import (
"github.com/filecoin-project/lotus/chain/actors/builtin" "github.com/filecoin-project/lotus/chain/actors/builtin"
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/extern/sector-storage/fsutil"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface"
"github.com/filecoin-project/lotus/storage/pipeline/sealiface" "github.com/filecoin-project/lotus/storage/pipeline/sealiface"
"github.com/filecoin-project/lotus/storage/sealer/fsutil"
storiface "github.com/filecoin-project/lotus/storage/sealer/storiface"
) )
// MODIFYING THE API INTERFACE // MODIFYING THE API INTERFACE

View File

@ -10,8 +10,8 @@ import (
"github.com/filecoin-project/go-state-types/proof" "github.com/filecoin-project/go-state-types/proof"
"github.com/filecoin-project/specs-storage/storage" "github.com/filecoin-project/specs-storage/storage"
"github.com/filecoin-project/lotus/extern/sector-storage/sealtasks" "github.com/filecoin-project/lotus/storage/sealer/sealtasks"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface" storiface "github.com/filecoin-project/lotus/storage/sealer/storiface"
) )
// MODIFYING THE API INTERFACE // MODIFYING THE API INTERFACE

View File

@ -39,11 +39,11 @@ import (
"github.com/filecoin-project/lotus/api/v0api" "github.com/filecoin-project/lotus/api/v0api"
"github.com/filecoin-project/lotus/build" "github.com/filecoin-project/lotus/build"
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/extern/sector-storage/sealtasks"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface"
"github.com/filecoin-project/lotus/node/modules/dtypes" "github.com/filecoin-project/lotus/node/modules/dtypes"
"github.com/filecoin-project/lotus/node/repo/imports" "github.com/filecoin-project/lotus/node/repo/imports"
sealing "github.com/filecoin-project/lotus/storage/pipeline" sealing "github.com/filecoin-project/lotus/storage/pipeline"
"github.com/filecoin-project/lotus/storage/sealer/sealtasks"
storiface "github.com/filecoin-project/lotus/storage/sealer/storiface"
) )
var ExampleValues = map[reflect.Type]interface{}{ var ExampleValues = map[reflect.Type]interface{}{

View File

@ -36,13 +36,13 @@ import (
"github.com/filecoin-project/lotus/chain/actors/builtin" "github.com/filecoin-project/lotus/chain/actors/builtin"
lminer "github.com/filecoin-project/lotus/chain/actors/builtin/miner" lminer "github.com/filecoin-project/lotus/chain/actors/builtin/miner"
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/extern/sector-storage/fsutil"
"github.com/filecoin-project/lotus/extern/sector-storage/sealtasks"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface"
"github.com/filecoin-project/lotus/journal/alerting" "github.com/filecoin-project/lotus/journal/alerting"
"github.com/filecoin-project/lotus/node/modules/dtypes" "github.com/filecoin-project/lotus/node/modules/dtypes"
"github.com/filecoin-project/lotus/node/repo/imports" "github.com/filecoin-project/lotus/node/repo/imports"
"github.com/filecoin-project/lotus/storage/pipeline/sealiface" "github.com/filecoin-project/lotus/storage/pipeline/sealiface"
"github.com/filecoin-project/lotus/storage/sealer/fsutil"
"github.com/filecoin-project/lotus/storage/sealer/sealtasks"
storiface "github.com/filecoin-project/lotus/storage/sealer/storiface"
) )
var ErrNotSupported = xerrors.New("method not supported") var ErrNotSupported = xerrors.New("method not supported")

View File

@ -39,10 +39,10 @@ import (
"github.com/filecoin-project/lotus/chain/store" "github.com/filecoin-project/lotus/chain/store"
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/chain/vm" "github.com/filecoin-project/lotus/chain/vm"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper"
"github.com/filecoin-project/lotus/lib/async" "github.com/filecoin-project/lotus/lib/async"
"github.com/filecoin-project/lotus/lib/sigs" "github.com/filecoin-project/lotus/lib/sigs"
"github.com/filecoin-project/lotus/metrics" "github.com/filecoin-project/lotus/metrics"
ffiwrapper "github.com/filecoin-project/lotus/storage/sealer/ffiwrapper"
) )
var log = logging.Logger("fil-consensus") var log = logging.Logger("fil-consensus")

View File

@ -40,10 +40,10 @@ import (
"github.com/filecoin-project/lotus/chain/vm" "github.com/filecoin-project/lotus/chain/vm"
"github.com/filecoin-project/lotus/chain/wallet" "github.com/filecoin-project/lotus/chain/wallet"
"github.com/filecoin-project/lotus/cmd/lotus-seed/seed" "github.com/filecoin-project/lotus/cmd/lotus-seed/seed"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper"
"github.com/filecoin-project/lotus/genesis" "github.com/filecoin-project/lotus/genesis"
"github.com/filecoin-project/lotus/journal" "github.com/filecoin-project/lotus/journal"
"github.com/filecoin-project/lotus/node/repo" "github.com/filecoin-project/lotus/node/repo"
ffiwrapper "github.com/filecoin-project/lotus/storage/sealer/ffiwrapper"
) )
const msgsPerBlock = 20 const msgsPerBlock = 20

View File

@ -26,7 +26,7 @@ import (
"github.com/filecoin-project/lotus/chain/rand" "github.com/filecoin-project/lotus/chain/rand"
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/chain/vm" "github.com/filecoin-project/lotus/chain/vm"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper" "github.com/filecoin-project/lotus/storage/sealer/ffiwrapper"
) )
func GetMinerWorkerRaw(ctx context.Context, sm *StateManager, st cid.Cid, maddr address.Address) (address.Address, error) { func GetMinerWorkerRaw(ctx context.Context, sm *StateManager, st cid.Cid, maddr address.Address) (address.Address, error) {

View File

@ -26,8 +26,8 @@ import (
"github.com/filecoin-project/lotus/chain/actors/policy" "github.com/filecoin-project/lotus/chain/actors/policy"
"github.com/filecoin-project/lotus/chain/state" "github.com/filecoin-project/lotus/chain/state"
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper"
"github.com/filecoin-project/lotus/lib/sigs" "github.com/filecoin-project/lotus/lib/sigs"
ffiwrapper "github.com/filecoin-project/lotus/storage/sealer/ffiwrapper"
) )
func init() { func init() {

View File

@ -12,7 +12,7 @@ import (
"github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/abi"
prooftypes "github.com/filecoin-project/go-state-types/proof" prooftypes "github.com/filecoin-project/go-state-types/proof"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper" "github.com/filecoin-project/lotus/storage/sealer/ffiwrapper"
) )
type cachingVerifier struct { type cachingVerifier struct {

View File

@ -40,10 +40,10 @@ import (
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/chain/vm" "github.com/filecoin-project/lotus/chain/vm"
lcli "github.com/filecoin-project/lotus/cli" lcli "github.com/filecoin-project/lotus/cli"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper"
_ "github.com/filecoin-project/lotus/lib/sigs/bls" _ "github.com/filecoin-project/lotus/lib/sigs/bls"
_ "github.com/filecoin-project/lotus/lib/sigs/secp" _ "github.com/filecoin-project/lotus/lib/sigs/secp"
"github.com/filecoin-project/lotus/node/repo" "github.com/filecoin-project/lotus/node/repo"
ffiwrapper "github.com/filecoin-project/lotus/storage/sealer/ffiwrapper"
) )
type TipSetExec struct { type TipSetExec struct {

View File

@ -29,10 +29,10 @@ import (
"github.com/filecoin-project/lotus/chain/actors/builtin/miner" "github.com/filecoin-project/lotus/chain/actors/builtin/miner"
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
lcli "github.com/filecoin-project/lotus/cli" lcli "github.com/filecoin-project/lotus/cli"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper/basicfs"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface"
"github.com/filecoin-project/lotus/genesis" "github.com/filecoin-project/lotus/genesis"
ffiwrapper "github.com/filecoin-project/lotus/storage/sealer/ffiwrapper"
"github.com/filecoin-project/lotus/storage/sealer/ffiwrapper/basicfs"
storiface "github.com/filecoin-project/lotus/storage/sealer/storiface"
) )
var log = logging.Logger("lotus-bench") var log = logging.Logger("lotus-bench")

View File

@ -24,8 +24,8 @@ import (
"github.com/filecoin-project/lotus/build" "github.com/filecoin-project/lotus/build"
lcli "github.com/filecoin-project/lotus/cli" lcli "github.com/filecoin-project/lotus/cli"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper" ffiwrapper "github.com/filecoin-project/lotus/storage/sealer/ffiwrapper"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface" storiface "github.com/filecoin-project/lotus/storage/sealer/storiface"
) )
var simpleCmd = &cli.Command{ var simpleCmd = &cli.Command{

View File

@ -33,9 +33,9 @@ import (
"github.com/filecoin-project/lotus/chain/actors/builtin/reward" "github.com/filecoin-project/lotus/chain/actors/builtin/reward"
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
lcli "github.com/filecoin-project/lotus/cli" lcli "github.com/filecoin-project/lotus/cli"
"github.com/filecoin-project/lotus/extern/sector-storage/sealtasks"
"github.com/filecoin-project/lotus/journal/alerting" "github.com/filecoin-project/lotus/journal/alerting"
sealing "github.com/filecoin-project/lotus/storage/pipeline" sealing "github.com/filecoin-project/lotus/storage/pipeline"
"github.com/filecoin-project/lotus/storage/sealer/sealtasks"
) )
var infoCmd = &cli.Command{ var infoCmd = &cli.Command{

View File

@ -46,10 +46,6 @@ import (
"github.com/filecoin-project/lotus/chain/gen/slashfilter" "github.com/filecoin-project/lotus/chain/gen/slashfilter"
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
lcli "github.com/filecoin-project/lotus/cli" lcli "github.com/filecoin-project/lotus/cli"
sectorstorage "github.com/filecoin-project/lotus/extern/sector-storage"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper"
"github.com/filecoin-project/lotus/extern/sector-storage/stores"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface"
"github.com/filecoin-project/lotus/genesis" "github.com/filecoin-project/lotus/genesis"
"github.com/filecoin-project/lotus/journal" "github.com/filecoin-project/lotus/journal"
"github.com/filecoin-project/lotus/journal/fsjournal" "github.com/filecoin-project/lotus/journal/fsjournal"
@ -59,6 +55,10 @@ import (
"github.com/filecoin-project/lotus/node/repo" "github.com/filecoin-project/lotus/node/repo"
"github.com/filecoin-project/lotus/storage" "github.com/filecoin-project/lotus/storage"
sealing2 "github.com/filecoin-project/lotus/storage/pipeline" sealing2 "github.com/filecoin-project/lotus/storage/pipeline"
"github.com/filecoin-project/lotus/storage/sealer"
"github.com/filecoin-project/lotus/storage/sealer/ffiwrapper"
stores "github.com/filecoin-project/lotus/storage/sealer/stores"
"github.com/filecoin-project/lotus/storage/sealer/storiface"
) )
var initCmd = &cli.Command{ var initCmd = &cli.Command{
@ -466,7 +466,7 @@ func storageMinerInit(ctx context.Context, cctx *cli.Context, api v1api.FullNode
} }
stor := stores.NewRemote(lstor, si, http.Header(sa), 10, &stores.DefaultPartialFileHandler{}) stor := stores.NewRemote(lstor, si, http.Header(sa), 10, &stores.DefaultPartialFileHandler{})
smgr, err := sectorstorage.New(ctx, lstor, stor, lr, si, sectorstorage.Config{ smgr, err := sealer.New(ctx, lstor, stor, lr, si, sealer.Config{
ParallelFetchLimit: 10, ParallelFetchLimit: 10,
AllowAddPiece: true, AllowAddPiece: true,
AllowPreCommit1: true, AllowPreCommit1: true,

View File

@ -24,10 +24,10 @@ import (
"github.com/filecoin-project/lotus/build" "github.com/filecoin-project/lotus/build"
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
lcli "github.com/filecoin-project/lotus/cli" lcli "github.com/filecoin-project/lotus/cli"
"github.com/filecoin-project/lotus/extern/sector-storage/stores"
"github.com/filecoin-project/lotus/lib/backupds" "github.com/filecoin-project/lotus/lib/backupds"
"github.com/filecoin-project/lotus/node/config" "github.com/filecoin-project/lotus/node/config"
"github.com/filecoin-project/lotus/node/repo" "github.com/filecoin-project/lotus/node/repo"
"github.com/filecoin-project/lotus/storage/sealer/stores"
) )
var restoreCmd = &cli.Command{ var restoreCmd = &cli.Command{

View File

@ -16,8 +16,8 @@ import (
"github.com/filecoin-project/lotus/api/client" "github.com/filecoin-project/lotus/api/client"
lcli "github.com/filecoin-project/lotus/cli" lcli "github.com/filecoin-project/lotus/cli"
cliutil "github.com/filecoin-project/lotus/cli/util" cliutil "github.com/filecoin-project/lotus/cli/util"
"github.com/filecoin-project/lotus/extern/sector-storage/stores"
"github.com/filecoin-project/lotus/node/config" "github.com/filecoin-project/lotus/node/config"
"github.com/filecoin-project/lotus/storage/sealer/stores"
) )
const ( const (

View File

@ -21,7 +21,7 @@ import (
"github.com/filecoin-project/lotus/chain/store" "github.com/filecoin-project/lotus/chain/store"
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
lcli "github.com/filecoin-project/lotus/cli" lcli "github.com/filecoin-project/lotus/cli"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface" "github.com/filecoin-project/lotus/storage/sealer/storiface"
) )
var provingCmd = &cli.Command{ var provingCmd = &cli.Command{

View File

@ -24,9 +24,9 @@ import (
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
lcli "github.com/filecoin-project/lotus/cli" lcli "github.com/filecoin-project/lotus/cli"
"github.com/filecoin-project/lotus/extern/sector-storage/sealtasks"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface"
"github.com/filecoin-project/lotus/lib/httpreader" "github.com/filecoin-project/lotus/lib/httpreader"
"github.com/filecoin-project/lotus/storage/sealer/sealtasks"
"github.com/filecoin-project/lotus/storage/sealer/storiface"
) )
var sealingCmd = &cli.Command{ var sealingCmd = &cli.Command{

View File

@ -27,11 +27,11 @@ import (
"github.com/filecoin-project/lotus/api/v0api" "github.com/filecoin-project/lotus/api/v0api"
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
lcli "github.com/filecoin-project/lotus/cli" lcli "github.com/filecoin-project/lotus/cli"
"github.com/filecoin-project/lotus/extern/sector-storage/fsutil"
"github.com/filecoin-project/lotus/extern/sector-storage/stores"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface"
"github.com/filecoin-project/lotus/lib/tablewriter" "github.com/filecoin-project/lotus/lib/tablewriter"
sealing "github.com/filecoin-project/lotus/storage/pipeline" sealing "github.com/filecoin-project/lotus/storage/pipeline"
"github.com/filecoin-project/lotus/storage/sealer/fsutil"
"github.com/filecoin-project/lotus/storage/sealer/stores"
storiface "github.com/filecoin-project/lotus/storage/sealer/storiface"
) )
const metaFile = "sectorstore.json" const metaFile = "sectorstore.json"

View File

@ -25,10 +25,10 @@ import (
genesis2 "github.com/filecoin-project/lotus/chain/gen/genesis" genesis2 "github.com/filecoin-project/lotus/chain/gen/genesis"
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/chain/vm" "github.com/filecoin-project/lotus/chain/vm"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper"
"github.com/filecoin-project/lotus/genesis" "github.com/filecoin-project/lotus/genesis"
"github.com/filecoin-project/lotus/journal" "github.com/filecoin-project/lotus/journal"
"github.com/filecoin-project/lotus/node/modules/testing" "github.com/filecoin-project/lotus/node/modules/testing"
"github.com/filecoin-project/lotus/storage/sealer/ffiwrapper"
) )
var genesisCmd = &cli.Command{ var genesisCmd = &cli.Command{

View File

@ -27,11 +27,11 @@ import (
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/chain/wallet/key" "github.com/filecoin-project/lotus/chain/wallet/key"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper/basicfs"
"github.com/filecoin-project/lotus/extern/sector-storage/stores"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface"
"github.com/filecoin-project/lotus/genesis" "github.com/filecoin-project/lotus/genesis"
ffiwrapper "github.com/filecoin-project/lotus/storage/sealer/ffiwrapper"
"github.com/filecoin-project/lotus/storage/sealer/ffiwrapper/basicfs"
"github.com/filecoin-project/lotus/storage/sealer/stores"
storiface "github.com/filecoin-project/lotus/storage/sealer/storiface"
) )
var log = logging.Logger("preseal") var log = logging.Logger("preseal")

View File

@ -40,8 +40,8 @@ import (
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/chain/vm" "github.com/filecoin-project/lotus/chain/vm"
lcli "github.com/filecoin-project/lotus/cli" lcli "github.com/filecoin-project/lotus/cli"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper"
"github.com/filecoin-project/lotus/node/repo" "github.com/filecoin-project/lotus/node/repo"
"github.com/filecoin-project/lotus/storage/sealer/ffiwrapper"
) )
type accountInfo struct { type accountInfo struct {

View File

@ -9,7 +9,7 @@ import (
"github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/lotus/extern/sector-storage/fr32" "github.com/filecoin-project/lotus/storage/sealer/fr32"
) )
var fr32Cmd = &cli.Command{ var fr32Cmd = &cli.Command{

View File

@ -16,8 +16,8 @@ import (
"github.com/filecoin-project/lotus/chain/store" "github.com/filecoin-project/lotus/chain/store"
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/chain/vm" "github.com/filecoin-project/lotus/chain/vm"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper"
"github.com/filecoin-project/lotus/node/repo" "github.com/filecoin-project/lotus/node/repo"
"github.com/filecoin-project/lotus/storage/sealer/ffiwrapper"
) )
var migrationsCmd = &cli.Command{ var migrationsCmd = &cli.Command{

View File

@ -15,10 +15,10 @@ import (
miner5 "github.com/filecoin-project/specs-actors/v5/actors/builtin/miner" miner5 "github.com/filecoin-project/specs-actors/v5/actors/builtin/miner"
tutils "github.com/filecoin-project/specs-actors/v5/support/testing" tutils "github.com/filecoin-project/specs-actors/v5/support/testing"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper" "github.com/filecoin-project/lotus/storage/sealer/ffiwrapper"
) )
// Ideally, we'd use extern/sector-storage/mock. Unfortunately, those mocks are a bit _too_ accurate // Ideally, we'd use extern/sealer/mock. Unfortunately, those mocks are a bit _too_ accurate
// and would force us to load sector info for window post proofs. // and would force us to load sector info for window post proofs.
const ( const (

View File

@ -9,7 +9,7 @@ import (
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
lcli "github.com/filecoin-project/lotus/cli" lcli "github.com/filecoin-project/lotus/cli"
"github.com/filecoin-project/lotus/extern/sector-storage/sealtasks" "github.com/filecoin-project/lotus/storage/sealer/sealtasks"
) )
var infoCmd = &cli.Command{ var infoCmd = &cli.Command{

View File

@ -30,15 +30,15 @@ import (
lcli "github.com/filecoin-project/lotus/cli" lcli "github.com/filecoin-project/lotus/cli"
cliutil "github.com/filecoin-project/lotus/cli/util" cliutil "github.com/filecoin-project/lotus/cli/util"
"github.com/filecoin-project/lotus/cmd/lotus-worker/sealworker" "github.com/filecoin-project/lotus/cmd/lotus-worker/sealworker"
sectorstorage "github.com/filecoin-project/lotus/extern/sector-storage"
"github.com/filecoin-project/lotus/extern/sector-storage/sealtasks"
"github.com/filecoin-project/lotus/extern/sector-storage/stores"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface"
"github.com/filecoin-project/lotus/lib/lotuslog" "github.com/filecoin-project/lotus/lib/lotuslog"
"github.com/filecoin-project/lotus/lib/ulimit" "github.com/filecoin-project/lotus/lib/ulimit"
"github.com/filecoin-project/lotus/metrics" "github.com/filecoin-project/lotus/metrics"
"github.com/filecoin-project/lotus/node/modules" "github.com/filecoin-project/lotus/node/modules"
"github.com/filecoin-project/lotus/node/repo" "github.com/filecoin-project/lotus/node/repo"
"github.com/filecoin-project/lotus/storage/sealer"
"github.com/filecoin-project/lotus/storage/sealer/sealtasks"
stores "github.com/filecoin-project/lotus/storage/sealer/stores"
"github.com/filecoin-project/lotus/storage/sealer/storiface"
) )
var log = logging.Logger("main") var log = logging.Logger("main")
@ -486,7 +486,7 @@ var runCmd = &cli.Command{
wsts := statestore.New(namespace.Wrap(ds, modules.WorkerCallsPrefix)) wsts := statestore.New(namespace.Wrap(ds, modules.WorkerCallsPrefix))
workerApi := &sealworker.Worker{ workerApi := &sealworker.Worker{
LocalWorker: sectorstorage.NewLocalWorker(sectorstorage.WorkerConfig{ LocalWorker: sealer.NewLocalWorker(sealer.WorkerConfig{
TaskTypes: taskTypes, TaskTypes: taskTypes,
NoSwap: cctx.Bool("no-swap"), NoSwap: cctx.Bool("no-swap"),
MaxParallelChallengeReads: cctx.Int("post-parallel-reads"), MaxParallelChallengeReads: cctx.Int("post-parallel-reads"),

View File

@ -7,7 +7,7 @@ import (
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface" "github.com/filecoin-project/lotus/storage/sealer/storiface"
) )
var resourcesCmd = &cli.Command{ var resourcesCmd = &cli.Command{

View File

@ -16,11 +16,11 @@ import (
"github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/api"
apitypes "github.com/filecoin-project/lotus/api/types" apitypes "github.com/filecoin-project/lotus/api/types"
"github.com/filecoin-project/lotus/build" "github.com/filecoin-project/lotus/build"
sectorstorage "github.com/filecoin-project/lotus/extern/sector-storage"
"github.com/filecoin-project/lotus/extern/sector-storage/stores"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface"
"github.com/filecoin-project/lotus/lib/rpcenc" "github.com/filecoin-project/lotus/lib/rpcenc"
"github.com/filecoin-project/lotus/metrics/proxy" "github.com/filecoin-project/lotus/metrics/proxy"
"github.com/filecoin-project/lotus/storage/sealer"
"github.com/filecoin-project/lotus/storage/sealer/stores"
"github.com/filecoin-project/lotus/storage/sealer/storiface"
) )
func WorkerHandler(authv func(ctx context.Context, token string) ([]auth.Permission, error), remote http.HandlerFunc, a api.Worker, permissioned bool) http.Handler { func WorkerHandler(authv func(ctx context.Context, token string) ([]auth.Permission, error), remote http.HandlerFunc, a api.Worker, permissioned bool) http.Handler {
@ -53,7 +53,7 @@ func WorkerHandler(authv func(ctx context.Context, token string) ([]auth.Permiss
} }
type Worker struct { type Worker struct {
*sectorstorage.LocalWorker *sealer.LocalWorker
LocalStore *stores.Local LocalStore *stores.Local
Storage stores.LocalStorage Storage stores.LocalStorage

View File

@ -13,8 +13,8 @@ import (
"golang.org/x/xerrors" "golang.org/x/xerrors"
lcli "github.com/filecoin-project/lotus/cli" lcli "github.com/filecoin-project/lotus/cli"
"github.com/filecoin-project/lotus/extern/sector-storage/stores" "github.com/filecoin-project/lotus/storage/sealer/stores"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface" "github.com/filecoin-project/lotus/storage/sealer/storiface"
) )
const metaFile = "sectorstore.json" const metaFile = "sectorstore.json"

View File

@ -9,7 +9,7 @@ import (
"github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/api"
lcli "github.com/filecoin-project/lotus/cli" lcli "github.com/filecoin-project/lotus/cli"
"github.com/filecoin-project/lotus/extern/sector-storage/sealtasks" "github.com/filecoin-project/lotus/storage/sealer/sealtasks"
) )
var tasksCmd = &cli.Command{ var tasksCmd = &cli.Command{

View File

@ -38,7 +38,6 @@ import (
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/chain/vm" "github.com/filecoin-project/lotus/chain/vm"
lcli "github.com/filecoin-project/lotus/cli" lcli "github.com/filecoin-project/lotus/cli"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper"
"github.com/filecoin-project/lotus/journal" "github.com/filecoin-project/lotus/journal"
"github.com/filecoin-project/lotus/journal/fsjournal" "github.com/filecoin-project/lotus/journal/fsjournal"
"github.com/filecoin-project/lotus/lib/peermgr" "github.com/filecoin-project/lotus/lib/peermgr"
@ -49,6 +48,7 @@ import (
"github.com/filecoin-project/lotus/node/modules/dtypes" "github.com/filecoin-project/lotus/node/modules/dtypes"
"github.com/filecoin-project/lotus/node/modules/testing" "github.com/filecoin-project/lotus/node/modules/testing"
"github.com/filecoin-project/lotus/node/repo" "github.com/filecoin-project/lotus/node/repo"
"github.com/filecoin-project/lotus/storage/sealer/ffiwrapper"
) )
const ( const (

View File

@ -25,9 +25,9 @@ import (
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/chain/vm" "github.com/filecoin-project/lotus/chain/vm"
"github.com/filecoin-project/lotus/conformance/chaos" "github.com/filecoin-project/lotus/conformance/chaos"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper"
_ "github.com/filecoin-project/lotus/lib/sigs/bls" // enable bls signatures _ "github.com/filecoin-project/lotus/lib/sigs/bls" // enable bls signatures
_ "github.com/filecoin-project/lotus/lib/sigs/secp" // enable secp signatures _ "github.com/filecoin-project/lotus/lib/sigs/secp" // enable secp signatures
"github.com/filecoin-project/lotus/storage/sealer/ffiwrapper"
) )
var ( var (

View File

@ -12,10 +12,10 @@ import (
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/chain/vm" "github.com/filecoin-project/lotus/chain/vm"
"github.com/filecoin-project/lotus/cmd/lotus-shed/shedgen" "github.com/filecoin-project/lotus/cmd/lotus-shed/shedgen"
sectorstorage "github.com/filecoin-project/lotus/extern/sector-storage"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface"
"github.com/filecoin-project/lotus/node/hello" "github.com/filecoin-project/lotus/node/hello"
"github.com/filecoin-project/lotus/paychmgr" "github.com/filecoin-project/lotus/paychmgr"
sectorstorage "github.com/filecoin-project/lotus/storage/sealer"
"github.com/filecoin-project/lotus/storage/sealer/storiface"
) )
func main() { func main() {
@ -99,7 +99,7 @@ func main() {
os.Exit(1) os.Exit(1)
} }
err = gen.WriteMapEncodersToFile("./extern/sector-storage/storiface/cbor_gen.go", "storiface", err = gen.WriteMapEncodersToFile("./extern/sealer/storiface/cbor_gen.go", "storiface",
storiface.CallID{}, storiface.CallID{},
) )
if err != nil { if err != nil {
@ -107,7 +107,7 @@ func main() {
os.Exit(1) os.Exit(1)
} }
err = gen.WriteMapEncodersToFile("./extern/sector-storage/cbor_gen.go", "sectorstorage", err = gen.WriteMapEncodersToFile("./extern/sealer/cbor_gen.go", "sealer",
sectorstorage.Call{}, sectorstorage.Call{},
sectorstorage.WorkState{}, sectorstorage.WorkState{},
sectorstorage.WorkID{}, sectorstorage.WorkID{},

View File

@ -28,9 +28,9 @@ import (
"github.com/filecoin-project/lotus/chain/actors/adt" "github.com/filecoin-project/lotus/chain/actors/adt"
"github.com/filecoin-project/lotus/chain/actors/builtin/miner" "github.com/filecoin-project/lotus/chain/actors/builtin/miner"
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/extern/sector-storage/mock"
"github.com/filecoin-project/lotus/itests/kit" "github.com/filecoin-project/lotus/itests/kit"
"github.com/filecoin-project/lotus/node/impl" "github.com/filecoin-project/lotus/node/impl"
"github.com/filecoin-project/lotus/storage/sealer/mock"
) )
// TestDeadlineToggling: // TestDeadlineToggling:

View File

@ -10,8 +10,8 @@ import (
"github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface"
"github.com/filecoin-project/lotus/itests/kit" "github.com/filecoin-project/lotus/itests/kit"
"github.com/filecoin-project/lotus/storage/sealer/storiface"
) )
func TestQuotePriceForUnsealedRetrieval(t *testing.T) { func TestQuotePriceForUnsealedRetrieval(t *testing.T) {

View File

@ -45,10 +45,6 @@ import (
"github.com/filecoin-project/lotus/chain/wallet/key" "github.com/filecoin-project/lotus/chain/wallet/key"
"github.com/filecoin-project/lotus/cmd/lotus-seed/seed" "github.com/filecoin-project/lotus/cmd/lotus-seed/seed"
"github.com/filecoin-project/lotus/cmd/lotus-worker/sealworker" "github.com/filecoin-project/lotus/cmd/lotus-worker/sealworker"
sectorstorage "github.com/filecoin-project/lotus/extern/sector-storage"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper"
"github.com/filecoin-project/lotus/extern/sector-storage/mock"
"github.com/filecoin-project/lotus/extern/sector-storage/stores"
"github.com/filecoin-project/lotus/genesis" "github.com/filecoin-project/lotus/genesis"
"github.com/filecoin-project/lotus/markets/idxprov" "github.com/filecoin-project/lotus/markets/idxprov"
idxprov_test "github.com/filecoin-project/lotus/markets/idxprov/idxprov_test" idxprov_test "github.com/filecoin-project/lotus/markets/idxprov/idxprov_test"
@ -59,6 +55,10 @@ import (
"github.com/filecoin-project/lotus/node/modules/dtypes" "github.com/filecoin-project/lotus/node/modules/dtypes"
testing2 "github.com/filecoin-project/lotus/node/modules/testing" testing2 "github.com/filecoin-project/lotus/node/modules/testing"
"github.com/filecoin-project/lotus/node/repo" "github.com/filecoin-project/lotus/node/repo"
sectorstorage "github.com/filecoin-project/lotus/storage/sealer"
"github.com/filecoin-project/lotus/storage/sealer/ffiwrapper"
mock2 "github.com/filecoin-project/lotus/storage/sealer/mock"
stores "github.com/filecoin-project/lotus/storage/sealer/stores"
) )
func init() { func init() {
@ -246,7 +246,7 @@ func (n *Ensemble) Miner(minerNode *TestMiner, full *TestFullNode, opts ...NodeO
// Create the preseal commitment. // Create the preseal commitment.
if n.options.mockProofs { if n.options.mockProofs {
genm, k, err = mock.PreSeal(proofType, actorAddr, sectors) genm, k, err = mock2.PreSeal(proofType, actorAddr, sectors)
} else { } else {
genm, k, err = seed.PreSeal(actorAddr, proofType, 0, sectors, tdir, []byte("make genesis mem random"), nil, true) genm, k, err = seed.PreSeal(actorAddr, proofType, 0, sectors, tdir, []byte("make genesis mem random"), nil, true)
} }
@ -363,8 +363,8 @@ func (n *Ensemble) Start() *Ensemble {
// Are we mocking proofs? // Are we mocking proofs?
if n.options.mockProofs { if n.options.mockProofs {
opts = append(opts, opts = append(opts,
node.Override(new(ffiwrapper.Verifier), mock.MockVerifier), node.Override(new(ffiwrapper.Verifier), mock2.MockVerifier),
node.Override(new(ffiwrapper.Prover), mock.MockProver), node.Override(new(ffiwrapper.Prover), mock2.MockProver),
) )
} }
@ -636,15 +636,15 @@ func (n *Ensemble) Start() *Ensemble {
if n.options.mockProofs { if n.options.mockProofs {
opts = append(opts, opts = append(opts,
node.Override(new(*mock.SectorMgr), func() (*mock.SectorMgr, error) { node.Override(new(*mock2.SectorMgr), func() (*mock2.SectorMgr, error) {
return mock.NewMockSectorMgr(presealSectors), nil return mock2.NewMockSectorMgr(presealSectors), nil
}), }),
node.Override(new(sectorstorage.SectorManager), node.From(new(*mock.SectorMgr))), node.Override(new(sectorstorage.SectorManager), node.From(new(*mock2.SectorMgr))),
node.Override(new(sectorstorage.Unsealer), node.From(new(*mock.SectorMgr))), node.Override(new(sectorstorage.Unsealer), node.From(new(*mock2.SectorMgr))),
node.Override(new(sectorstorage.PieceProvider), node.From(new(*mock.SectorMgr))), node.Override(new(sectorstorage.PieceProvider), node.From(new(*mock2.SectorMgr))),
node.Override(new(ffiwrapper.Verifier), mock.MockVerifier), node.Override(new(ffiwrapper.Verifier), mock2.MockVerifier),
node.Override(new(ffiwrapper.Prover), mock.MockProver), node.Override(new(ffiwrapper.Prover), mock2.MockProver),
node.Unset(new(*sectorstorage.Manager)), node.Unset(new(*sectorstorage.Manager)),
) )
} }

View File

@ -24,10 +24,10 @@ import (
"github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/api"
"github.com/filecoin-project/lotus/build" "github.com/filecoin-project/lotus/build"
"github.com/filecoin-project/lotus/chain/wallet/key" "github.com/filecoin-project/lotus/chain/wallet/key"
"github.com/filecoin-project/lotus/extern/sector-storage/stores"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface"
"github.com/filecoin-project/lotus/miner" "github.com/filecoin-project/lotus/miner"
sealing "github.com/filecoin-project/lotus/storage/pipeline" sealing "github.com/filecoin-project/lotus/storage/pipeline"
"github.com/filecoin-project/lotus/storage/sealer/stores"
"github.com/filecoin-project/lotus/storage/sealer/storiface"
) )
type MinerSubsystem int type MinerSubsystem int

View File

@ -7,14 +7,14 @@ import (
"github.com/filecoin-project/lotus/build" "github.com/filecoin-project/lotus/build"
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/chain/wallet/key" "github.com/filecoin-project/lotus/chain/wallet/key"
"github.com/filecoin-project/lotus/extern/sector-storage/sealtasks"
"github.com/filecoin-project/lotus/extern/sector-storage/stores"
"github.com/filecoin-project/lotus/node" "github.com/filecoin-project/lotus/node"
"github.com/filecoin-project/lotus/node/config" "github.com/filecoin-project/lotus/node/config"
"github.com/filecoin-project/lotus/node/modules" "github.com/filecoin-project/lotus/node/modules"
"github.com/filecoin-project/lotus/node/modules/dtypes" "github.com/filecoin-project/lotus/node/modules/dtypes"
"github.com/filecoin-project/lotus/node/repo" "github.com/filecoin-project/lotus/node/repo"
"github.com/filecoin-project/lotus/storage/pipeline/sealiface" "github.com/filecoin-project/lotus/storage/pipeline/sealiface"
"github.com/filecoin-project/lotus/storage/sealer/sealtasks"
"github.com/filecoin-project/lotus/storage/sealer/stores"
) )
// DefaultPresealsPerBootstrapMiner is the number of preseals that every // DefaultPresealsPerBootstrapMiner is the number of preseals that every

View File

@ -18,9 +18,9 @@ import (
"github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/api"
"github.com/filecoin-project/lotus/build" "github.com/filecoin-project/lotus/build"
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/extern/sector-storage/mock"
"github.com/filecoin-project/lotus/itests/kit" "github.com/filecoin-project/lotus/itests/kit"
"github.com/filecoin-project/lotus/node/impl" "github.com/filecoin-project/lotus/node/impl"
"github.com/filecoin-project/lotus/storage/sealer/mock"
) )
func TestWindowedPost(t *testing.T) { func TestWindowedPost(t *testing.T) {

View File

@ -17,13 +17,13 @@ import (
"github.com/filecoin-project/lotus/build" "github.com/filecoin-project/lotus/build"
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/extern/sector-storage/sealtasks"
"github.com/filecoin-project/lotus/extern/sector-storage/stores"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface"
"github.com/filecoin-project/lotus/itests/kit" "github.com/filecoin-project/lotus/itests/kit"
"github.com/filecoin-project/lotus/node" "github.com/filecoin-project/lotus/node"
"github.com/filecoin-project/lotus/node/impl" "github.com/filecoin-project/lotus/node/impl"
"github.com/filecoin-project/lotus/node/repo" "github.com/filecoin-project/lotus/node/repo"
"github.com/filecoin-project/lotus/storage/sealer/sealtasks"
stores "github.com/filecoin-project/lotus/storage/sealer/stores"
"github.com/filecoin-project/lotus/storage/sealer/storiface"
"github.com/filecoin-project/lotus/storage/wdpost" "github.com/filecoin-project/lotus/storage/wdpost"
) )

View File

@ -17,10 +17,10 @@ import (
"github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/api"
"github.com/filecoin-project/lotus/api/v1api" "github.com/filecoin-project/lotus/api/v1api"
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
sectorstorage "github.com/filecoin-project/lotus/extern/sector-storage"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface"
"github.com/filecoin-project/lotus/markets/dagstore" "github.com/filecoin-project/lotus/markets/dagstore"
"github.com/filecoin-project/lotus/node/modules/dtypes" "github.com/filecoin-project/lotus/node/modules/dtypes"
"github.com/filecoin-project/lotus/storage/sealer"
"github.com/filecoin-project/lotus/storage/sealer/storiface"
"github.com/filecoin-project/lotus/storage/sectorblocks" "github.com/filecoin-project/lotus/storage/sectorblocks"
) )
@ -29,13 +29,13 @@ var log = logging.Logger("sectoraccessor")
type sectorAccessor struct { type sectorAccessor struct {
maddr address.Address maddr address.Address
secb sectorblocks.SectorBuilder secb sectorblocks.SectorBuilder
pp sectorstorage.PieceProvider pp sealer.PieceProvider
full v1api.FullNode full v1api.FullNode
} }
var _ retrievalmarket.SectorAccessor = (*sectorAccessor)(nil) var _ retrievalmarket.SectorAccessor = (*sectorAccessor)(nil)
func NewSectorAccessor(maddr dtypes.MinerAddress, secb sectorblocks.SectorBuilder, pp sectorstorage.PieceProvider, full v1api.FullNode) dagstore.SectorAccessor { func NewSectorAccessor(maddr dtypes.MinerAddress, secb sectorblocks.SectorBuilder, pp sealer.PieceProvider, full v1api.FullNode) dagstore.SectorAccessor {
return &sectorAccessor{address.Address(maddr), secb, pp, full} return &sectorAccessor{address.Address(maddr), secb, pp, full}
} }

View File

@ -25,7 +25,6 @@ import (
"github.com/filecoin-project/lotus/build" "github.com/filecoin-project/lotus/build"
"github.com/filecoin-project/lotus/chain/beacon" "github.com/filecoin-project/lotus/chain/beacon"
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/extern/sector-storage/stores"
"github.com/filecoin-project/lotus/journal" "github.com/filecoin-project/lotus/journal"
"github.com/filecoin-project/lotus/journal/alerting" "github.com/filecoin-project/lotus/journal/alerting"
"github.com/filecoin-project/lotus/lib/lotuslog" "github.com/filecoin-project/lotus/lib/lotuslog"
@ -42,6 +41,7 @@ import (
"github.com/filecoin-project/lotus/node/modules/lp2p" "github.com/filecoin-project/lotus/node/modules/lp2p"
"github.com/filecoin-project/lotus/node/modules/testing" "github.com/filecoin-project/lotus/node/modules/testing"
"github.com/filecoin-project/lotus/node/repo" "github.com/filecoin-project/lotus/node/repo"
"github.com/filecoin-project/lotus/storage/sealer/stores"
"github.com/filecoin-project/lotus/system" "github.com/filecoin-project/lotus/system"
) )

View File

@ -28,7 +28,6 @@ import (
"github.com/filecoin-project/lotus/chain/wallet" "github.com/filecoin-project/lotus/chain/wallet"
ledgerwallet "github.com/filecoin-project/lotus/chain/wallet/ledger" ledgerwallet "github.com/filecoin-project/lotus/chain/wallet/ledger"
"github.com/filecoin-project/lotus/chain/wallet/remotewallet" "github.com/filecoin-project/lotus/chain/wallet/remotewallet"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper"
"github.com/filecoin-project/lotus/lib/peermgr" "github.com/filecoin-project/lotus/lib/peermgr"
"github.com/filecoin-project/lotus/markets/storageadapter" "github.com/filecoin-project/lotus/markets/storageadapter"
"github.com/filecoin-project/lotus/node/config" "github.com/filecoin-project/lotus/node/config"
@ -40,6 +39,7 @@ import (
"github.com/filecoin-project/lotus/node/repo" "github.com/filecoin-project/lotus/node/repo"
"github.com/filecoin-project/lotus/paychmgr" "github.com/filecoin-project/lotus/paychmgr"
"github.com/filecoin-project/lotus/paychmgr/settler" "github.com/filecoin-project/lotus/paychmgr/settler"
ffiwrapper "github.com/filecoin-project/lotus/storage/sealer/ffiwrapper"
) )
// Chain node provides access to the Filecoin blockchain, by setting up a full // Chain node provides access to the Filecoin blockchain, by setting up a full

View File

@ -19,10 +19,6 @@ import (
"github.com/filecoin-project/lotus/build" "github.com/filecoin-project/lotus/build"
"github.com/filecoin-project/lotus/chain/gen" "github.com/filecoin-project/lotus/chain/gen"
"github.com/filecoin-project/lotus/chain/gen/slashfilter" "github.com/filecoin-project/lotus/chain/gen/slashfilter"
sectorstorage "github.com/filecoin-project/lotus/extern/sector-storage"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper"
"github.com/filecoin-project/lotus/extern/sector-storage/stores"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface"
"github.com/filecoin-project/lotus/markets/dagstore" "github.com/filecoin-project/lotus/markets/dagstore"
"github.com/filecoin-project/lotus/markets/dealfilter" "github.com/filecoin-project/lotus/markets/dealfilter"
"github.com/filecoin-project/lotus/markets/idxprov" "github.com/filecoin-project/lotus/markets/idxprov"
@ -38,6 +34,10 @@ import (
"github.com/filecoin-project/lotus/storage" "github.com/filecoin-project/lotus/storage"
"github.com/filecoin-project/lotus/storage/ctladdr" "github.com/filecoin-project/lotus/storage/ctladdr"
sealing "github.com/filecoin-project/lotus/storage/pipeline" sealing "github.com/filecoin-project/lotus/storage/pipeline"
sectorstorage "github.com/filecoin-project/lotus/storage/sealer"
ffiwrapper "github.com/filecoin-project/lotus/storage/sealer/ffiwrapper"
stores "github.com/filecoin-project/lotus/storage/sealer/stores"
"github.com/filecoin-project/lotus/storage/sealer/storiface"
"github.com/filecoin-project/lotus/storage/sectorblocks" "github.com/filecoin-project/lotus/storage/sectorblocks"
"github.com/filecoin-project/lotus/storage/wdpost" "github.com/filecoin-project/lotus/storage/wdpost"
) )

View File

@ -15,7 +15,7 @@ import (
"github.com/filecoin-project/lotus/chain/actors/builtin" "github.com/filecoin-project/lotus/chain/actors/builtin"
"github.com/filecoin-project/lotus/chain/actors/policy" "github.com/filecoin-project/lotus/chain/actors/policy"
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
sectorstorage "github.com/filecoin-project/lotus/extern/sector-storage" "github.com/filecoin-project/lotus/storage/sealer"
) )
const ( const (
@ -161,7 +161,7 @@ func DefaultStorageMiner() *StorageMiner {
Assigner: "utilization", Assigner: "utilization",
// By default use the hardware resource filtering strategy. // By default use the hardware resource filtering strategy.
ResourceFiltering: sectorstorage.ResourceFilteringHardware, ResourceFiltering: sealer.ResourceFilteringHardware,
}, },
Dealmaking: DealmakingConfig{ Dealmaking: DealmakingConfig{

View File

@ -8,8 +8,8 @@ import (
"golang.org/x/xerrors" "golang.org/x/xerrors"
sectorstorage "github.com/filecoin-project/lotus/extern/sector-storage" "github.com/filecoin-project/lotus/storage/sealer"
"github.com/filecoin-project/lotus/extern/sector-storage/stores" "github.com/filecoin-project/lotus/storage/sealer/stores"
) )
func StorageFromFile(path string, def *stores.StorageConfig) (*stores.StorageConfig, error) { func StorageFromFile(path string, def *stores.StorageConfig) (*stores.StorageConfig, error) {
@ -51,8 +51,8 @@ func WriteStorageFile(path string, config stores.StorageConfig) error {
return nil return nil
} }
func (c *StorageMiner) StorageManager() sectorstorage.Config { func (c *StorageMiner) StorageManager() sealer.Config {
return sectorstorage.Config{ return sealer.Config{
ParallelFetchLimit: c.Storage.ParallelFetchLimit, ParallelFetchLimit: c.Storage.ParallelFetchLimit,
AllowAddPiece: c.Storage.AllowAddPiece, AllowAddPiece: c.Storage.AllowAddPiece,
AllowPreCommit1: c.Storage.AllowPreCommit1, AllowPreCommit1: c.Storage.AllowPreCommit1,

View File

@ -4,7 +4,7 @@ import (
"github.com/ipfs/go-cid" "github.com/ipfs/go-cid"
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
sectorstorage "github.com/filecoin-project/lotus/extern/sector-storage" "github.com/filecoin-project/lotus/storage/sealer"
) )
// // NOTE: ONLY PUT STRUCT DEFINITIONS IN THIS FILE // // NOTE: ONLY PUT STRUCT DEFINITIONS IN THIS FILE
@ -352,7 +352,7 @@ type SealerConfig struct {
// ResourceFiltering instructs the system which resource filtering strategy // ResourceFiltering instructs the system which resource filtering strategy
// to use when evaluating tasks against this worker. An empty value defaults // to use when evaluating tasks against this worker. An empty value defaults
// to "hardware". // to "hardware".
ResourceFiltering sectorstorage.ResourceFilteringStrategy ResourceFiltering sealer.ResourceFilteringStrategy
} }
type BatchFeeConfig struct { type BatchFeeConfig struct {

View File

@ -40,8 +40,8 @@ import (
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/chain/vm" "github.com/filecoin-project/lotus/chain/vm"
"github.com/filecoin-project/lotus/chain/wallet" "github.com/filecoin-project/lotus/chain/wallet"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper"
"github.com/filecoin-project/lotus/node/modules/dtypes" "github.com/filecoin-project/lotus/node/modules/dtypes"
"github.com/filecoin-project/lotus/storage/sealer/ffiwrapper"
) )
type StateModuleAPI interface { type StateModuleAPI interface {

View File

@ -12,7 +12,7 @@ import (
"github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/api"
"github.com/filecoin-project/lotus/api/client" "github.com/filecoin-project/lotus/api/client"
sectorstorage "github.com/filecoin-project/lotus/extern/sector-storage" "github.com/filecoin-project/lotus/storage/sealer"
) )
type remoteWorker struct { type remoteWorker struct {
@ -56,4 +56,4 @@ func (r *remoteWorker) Close() error {
return nil return nil
} }
var _ sectorstorage.Worker = &remoteWorker{} var _ sealer.Worker = &remoteWorker{}

View File

@ -42,10 +42,6 @@ import (
"github.com/filecoin-project/lotus/chain/actors/builtin" "github.com/filecoin-project/lotus/chain/actors/builtin"
"github.com/filecoin-project/lotus/chain/gen" "github.com/filecoin-project/lotus/chain/gen"
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
sectorstorage "github.com/filecoin-project/lotus/extern/sector-storage"
"github.com/filecoin-project/lotus/extern/sector-storage/fsutil"
"github.com/filecoin-project/lotus/extern/sector-storage/stores"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface"
mktsdagstore "github.com/filecoin-project/lotus/markets/dagstore" mktsdagstore "github.com/filecoin-project/lotus/markets/dagstore"
"github.com/filecoin-project/lotus/markets/storageadapter" "github.com/filecoin-project/lotus/markets/storageadapter"
"github.com/filecoin-project/lotus/miner" "github.com/filecoin-project/lotus/miner"
@ -54,6 +50,10 @@ import (
"github.com/filecoin-project/lotus/storage/ctladdr" "github.com/filecoin-project/lotus/storage/ctladdr"
sealing "github.com/filecoin-project/lotus/storage/pipeline" sealing "github.com/filecoin-project/lotus/storage/pipeline"
"github.com/filecoin-project/lotus/storage/pipeline/sealiface" "github.com/filecoin-project/lotus/storage/pipeline/sealiface"
"github.com/filecoin-project/lotus/storage/sealer"
"github.com/filecoin-project/lotus/storage/sealer/fsutil"
stores "github.com/filecoin-project/lotus/storage/sealer/stores"
storiface "github.com/filecoin-project/lotus/storage/sealer/storiface"
"github.com/filecoin-project/lotus/storage/sectorblocks" "github.com/filecoin-project/lotus/storage/sectorblocks"
"github.com/filecoin-project/lotus/storage/wdpost" "github.com/filecoin-project/lotus/storage/wdpost"
) )
@ -85,10 +85,10 @@ type StorageMinerAPI struct {
DAGStoreWrapper *mktsdagstore.Wrapper `optional:"true"` DAGStoreWrapper *mktsdagstore.Wrapper `optional:"true"`
// Miner / storage // Miner / storage
Miner *storage.Miner `optional:"true"` Miner *storage.Miner `optional:"true"`
BlockMiner *miner.Miner `optional:"true"` BlockMiner *miner.Miner `optional:"true"`
StorageMgr *sectorstorage.Manager `optional:"true"` StorageMgr *sealer.Manager `optional:"true"`
IStorageMgr sectorstorage.SectorManager `optional:"true"` IStorageMgr sealer.SectorManager `optional:"true"`
stores.SectorIndex stores.SectorIndex
storiface.WorkerReturn `optional:"true"` storiface.WorkerReturn `optional:"true"`
AddrSel *ctladdr.AddressSelector AddrSel *ctladdr.AddressSelector

View File

@ -53,9 +53,6 @@ import (
"github.com/filecoin-project/lotus/chain/gen" "github.com/filecoin-project/lotus/chain/gen"
"github.com/filecoin-project/lotus/chain/gen/slashfilter" "github.com/filecoin-project/lotus/chain/gen/slashfilter"
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
sectorstorage "github.com/filecoin-project/lotus/extern/sector-storage"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper"
"github.com/filecoin-project/lotus/extern/sector-storage/stores"
"github.com/filecoin-project/lotus/journal" "github.com/filecoin-project/lotus/journal"
"github.com/filecoin-project/lotus/markets" "github.com/filecoin-project/lotus/markets"
"github.com/filecoin-project/lotus/markets/dagstore" "github.com/filecoin-project/lotus/markets/dagstore"
@ -71,6 +68,9 @@ import (
"github.com/filecoin-project/lotus/storage/ctladdr" "github.com/filecoin-project/lotus/storage/ctladdr"
sealing "github.com/filecoin-project/lotus/storage/pipeline" sealing "github.com/filecoin-project/lotus/storage/pipeline"
"github.com/filecoin-project/lotus/storage/pipeline/sealiface" "github.com/filecoin-project/lotus/storage/pipeline/sealiface"
"github.com/filecoin-project/lotus/storage/sealer"
"github.com/filecoin-project/lotus/storage/sealer/ffiwrapper"
stores "github.com/filecoin-project/lotus/storage/sealer/stores"
"github.com/filecoin-project/lotus/storage/wdpost" "github.com/filecoin-project/lotus/storage/wdpost"
) )
@ -209,7 +209,7 @@ type StorageMinerParams struct {
MetricsCtx helpers.MetricsCtx MetricsCtx helpers.MetricsCtx
API v1api.FullNode API v1api.FullNode
MetadataDS dtypes.MetadataDS MetadataDS dtypes.MetadataDS
Sealer sectorstorage.SectorManager Sealer sealer.SectorManager
SectorIDCounter sealing.SectorIDCounter SectorIDCounter sealing.SectorIDCounter
Verifier ffiwrapper.Verifier Verifier ffiwrapper.Verifier
Prover ffiwrapper.Prover Prover ffiwrapper.Prover
@ -740,17 +740,17 @@ func LocalStorage(mctx helpers.MetricsCtx, lc fx.Lifecycle, ls stores.LocalStora
return stores.NewLocal(ctx, ls, si, urls) return stores.NewLocal(ctx, ls, si, urls)
} }
func RemoteStorage(lstor *stores.Local, si stores.SectorIndex, sa sectorstorage.StorageAuth, sc sectorstorage.Config) *stores.Remote { func RemoteStorage(lstor *stores.Local, si stores.SectorIndex, sa sealer.StorageAuth, sc sealer.Config) *stores.Remote {
return stores.NewRemote(lstor, si, http.Header(sa), sc.ParallelFetchLimit, &stores.DefaultPartialFileHandler{}) return stores.NewRemote(lstor, si, http.Header(sa), sc.ParallelFetchLimit, &stores.DefaultPartialFileHandler{})
} }
func SectorStorage(mctx helpers.MetricsCtx, lc fx.Lifecycle, lstor *stores.Local, stor stores.Store, ls stores.LocalStorage, si stores.SectorIndex, sc sectorstorage.Config, ds dtypes.MetadataDS) (*sectorstorage.Manager, error) { func SectorStorage(mctx helpers.MetricsCtx, lc fx.Lifecycle, lstor *stores.Local, stor stores.Store, ls stores.LocalStorage, si stores.SectorIndex, sc sealer.Config, ds dtypes.MetadataDS) (*sealer.Manager, error) {
ctx := helpers.LifecycleCtx(mctx, lc) ctx := helpers.LifecycleCtx(mctx, lc)
wsts := statestore.New(namespace.Wrap(ds, WorkerCallsPrefix)) wsts := statestore.New(namespace.Wrap(ds, WorkerCallsPrefix))
smsts := statestore.New(namespace.Wrap(ds, ManagerWorkPrefix)) smsts := statestore.New(namespace.Wrap(ds, ManagerWorkPrefix))
sst, err := sectorstorage.New(ctx, lstor, stor, ls, si, sc, wsts, smsts) sst, err := sealer.New(ctx, lstor, stor, ls, si, sc, wsts, smsts)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -762,7 +762,7 @@ func SectorStorage(mctx helpers.MetricsCtx, lc fx.Lifecycle, lstor *stores.Local
return sst, nil return sst, nil
} }
func StorageAuth(ctx helpers.MetricsCtx, ca v0api.Common) (sectorstorage.StorageAuth, error) { func StorageAuth(ctx helpers.MetricsCtx, ca v0api.Common) (sealer.StorageAuth, error) {
token, err := ca.AuthNew(ctx, []auth.Permission{"admin"}) token, err := ca.AuthNew(ctx, []auth.Permission{"admin"})
if err != nil { if err != nil {
return nil, xerrors.Errorf("creating storage auth header: %w", err) return nil, xerrors.Errorf("creating storage auth header: %w", err)
@ -770,18 +770,18 @@ func StorageAuth(ctx helpers.MetricsCtx, ca v0api.Common) (sectorstorage.Storage
headers := http.Header{} headers := http.Header{}
headers.Add("Authorization", "Bearer "+string(token)) headers.Add("Authorization", "Bearer "+string(token))
return sectorstorage.StorageAuth(headers), nil return sealer.StorageAuth(headers), nil
} }
func StorageAuthWithURL(apiInfo string) func(ctx helpers.MetricsCtx, ca v0api.Common) (sectorstorage.StorageAuth, error) { func StorageAuthWithURL(apiInfo string) func(ctx helpers.MetricsCtx, ca v0api.Common) (sealer.StorageAuth, error) {
return func(ctx helpers.MetricsCtx, ca v0api.Common) (sectorstorage.StorageAuth, error) { return func(ctx helpers.MetricsCtx, ca v0api.Common) (sealer.StorageAuth, error) {
s := strings.Split(apiInfo, ":") s := strings.Split(apiInfo, ":")
if len(s) != 2 { if len(s) != 2 {
return nil, errors.New("unexpected format of `apiInfo`") return nil, errors.New("unexpected format of `apiInfo`")
} }
headers := http.Header{} headers := http.Header{}
headers.Add("Authorization", "Bearer "+s[0]) headers.Add("Authorization", "Bearer "+s[0])
return sectorstorage.StorageAuth(headers), nil return sealer.StorageAuth(headers), nil
} }
} }

View File

@ -24,9 +24,9 @@ import (
"github.com/filecoin-project/lotus/blockstore" "github.com/filecoin-project/lotus/blockstore"
badgerbs "github.com/filecoin-project/lotus/blockstore/badger" badgerbs "github.com/filecoin-project/lotus/blockstore/badger"
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/extern/sector-storage/fsutil"
"github.com/filecoin-project/lotus/extern/sector-storage/stores"
"github.com/filecoin-project/lotus/node/config" "github.com/filecoin-project/lotus/node/config"
fsutil "github.com/filecoin-project/lotus/storage/sealer/fsutil"
"github.com/filecoin-project/lotus/storage/sealer/stores"
) )
const ( const (

View File

@ -9,8 +9,8 @@ import (
"github.com/filecoin-project/lotus/blockstore" "github.com/filecoin-project/lotus/blockstore"
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/extern/sector-storage/fsutil" "github.com/filecoin-project/lotus/storage/sealer/fsutil"
"github.com/filecoin-project/lotus/extern/sector-storage/stores" "github.com/filecoin-project/lotus/storage/sealer/stores"
) )
// BlockstoreDomain represents the domain of a blockstore. // BlockstoreDomain represents the domain of a blockstore.

View File

@ -17,10 +17,10 @@ import (
"github.com/filecoin-project/lotus/blockstore" "github.com/filecoin-project/lotus/blockstore"
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/extern/sector-storage/fsutil"
"github.com/filecoin-project/lotus/extern/sector-storage/stores"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface"
"github.com/filecoin-project/lotus/node/config" "github.com/filecoin-project/lotus/node/config"
fsutil "github.com/filecoin-project/lotus/storage/sealer/fsutil"
"github.com/filecoin-project/lotus/storage/sealer/stores"
"github.com/filecoin-project/lotus/storage/sealer/storiface"
) )
type MemRepo struct { type MemRepo struct {

View File

@ -28,13 +28,13 @@ import (
"github.com/filecoin-project/lotus/chain/events" "github.com/filecoin-project/lotus/chain/events"
"github.com/filecoin-project/lotus/chain/gen" "github.com/filecoin-project/lotus/chain/gen"
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
sectorstorage "github.com/filecoin-project/lotus/extern/sector-storage"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper"
"github.com/filecoin-project/lotus/journal" "github.com/filecoin-project/lotus/journal"
"github.com/filecoin-project/lotus/node/config" "github.com/filecoin-project/lotus/node/config"
"github.com/filecoin-project/lotus/node/modules/dtypes" "github.com/filecoin-project/lotus/node/modules/dtypes"
"github.com/filecoin-project/lotus/storage/ctladdr" "github.com/filecoin-project/lotus/storage/ctladdr"
sealing2 "github.com/filecoin-project/lotus/storage/pipeline" sealing2 "github.com/filecoin-project/lotus/storage/pipeline"
"github.com/filecoin-project/lotus/storage/sealer"
"github.com/filecoin-project/lotus/storage/sealer/ffiwrapper"
) )
var log = logging.Logger("storageminer") var log = logging.Logger("storageminer")
@ -50,7 +50,7 @@ var log = logging.Logger("storageminer")
type Miner struct { type Miner struct {
api fullNodeFilteredAPI api fullNodeFilteredAPI
feeCfg config.MinerFeeConfig feeCfg config.MinerFeeConfig
sealer sectorstorage.SectorManager sealer sealer.SectorManager
ds datastore.Batching ds datastore.Batching
sc sealing2.SectorIDCounter sc sealing2.SectorIDCounter
verif ffiwrapper.Verifier verif ffiwrapper.Verifier
@ -133,7 +133,7 @@ type fullNodeFilteredAPI interface {
func NewMiner(api fullNodeFilteredAPI, func NewMiner(api fullNodeFilteredAPI,
maddr address.Address, maddr address.Address,
ds datastore.Batching, ds datastore.Batching,
sealer sectorstorage.SectorManager, sealer sealer.SectorManager,
sc sealing2.SectorIDCounter, sc sealing2.SectorIDCounter,
verif ffiwrapper.Verifier, verif ffiwrapper.Verifier,
prover ffiwrapper.Prover, prover ffiwrapper.Prover,

View File

@ -24,9 +24,9 @@ import (
"github.com/filecoin-project/lotus/chain/actors" "github.com/filecoin-project/lotus/chain/actors"
"github.com/filecoin-project/lotus/chain/actors/policy" "github.com/filecoin-project/lotus/chain/actors/policy"
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper"
"github.com/filecoin-project/lotus/node/config" "github.com/filecoin-project/lotus/node/config"
sealiface2 "github.com/filecoin-project/lotus/storage/pipeline/sealiface" sealiface2 "github.com/filecoin-project/lotus/storage/pipeline/sealiface"
"github.com/filecoin-project/lotus/storage/sealer/ffiwrapper"
) )
var aggFeeNum = big.NewInt(110) var aggFeeNum = big.NewInt(110)

View File

@ -22,10 +22,10 @@ import (
"github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/api"
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper"
sealing2 "github.com/filecoin-project/lotus/storage/pipeline" sealing2 "github.com/filecoin-project/lotus/storage/pipeline"
"github.com/filecoin-project/lotus/storage/pipeline/mocks" "github.com/filecoin-project/lotus/storage/pipeline/mocks"
sealiface2 "github.com/filecoin-project/lotus/storage/pipeline/sealiface" sealiface2 "github.com/filecoin-project/lotus/storage/pipeline/sealiface"
"github.com/filecoin-project/lotus/storage/sealer/ffiwrapper"
) )
func TestCommitBatcher(t *testing.T) { func TestCommitBatcher(t *testing.T) {

View File

@ -19,10 +19,10 @@ import (
"github.com/filecoin-project/lotus/build" "github.com/filecoin-project/lotus/build"
"github.com/filecoin-project/lotus/chain/actors/policy" "github.com/filecoin-project/lotus/chain/actors/policy"
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
sectorstorage "github.com/filecoin-project/lotus/extern/sector-storage"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper"
"github.com/filecoin-project/lotus/storage/pipeline/lib/nullreader" "github.com/filecoin-project/lotus/storage/pipeline/lib/nullreader"
"github.com/filecoin-project/lotus/storage/pipeline/sealiface" "github.com/filecoin-project/lotus/storage/pipeline/sealiface"
"github.com/filecoin-project/lotus/storage/sealer"
"github.com/filecoin-project/lotus/storage/sealer/ffiwrapper"
) )
func (m *Sealing) handleWaitDeals(ctx statemachine.Context, sector SectorInfo) error { func (m *Sealing) handleWaitDeals(ctx statemachine.Context, sector SectorInfo) error {
@ -216,7 +216,7 @@ func (m *Sealing) handleAddPiece(ctx statemachine.Context, sector SectorInfo) er
for _, p := range pads { for _, p := range pads {
expectCid := zerocomm.ZeroPieceCommitment(p.Unpadded()) expectCid := zerocomm.ZeroPieceCommitment(p.Unpadded())
ppi, err := m.sealer.AddPiece(sectorstorage.WithPriority(ctx.Context(), DealSectorPriority), ppi, err := m.sealer.AddPiece(sealer.WithPriority(ctx.Context(), DealSectorPriority),
m.minerSector(sector.SectorType, sector.SectorNumber), m.minerSector(sector.SectorType, sector.SectorNumber),
pieceSizes, pieceSizes,
p.Unpadded(), p.Unpadded(),
@ -238,7 +238,7 @@ func (m *Sealing) handleAddPiece(ctx statemachine.Context, sector SectorInfo) er
}) })
} }
ppi, err := m.sealer.AddPiece(sectorstorage.WithPriority(ctx.Context(), DealSectorPriority), ppi, err := m.sealer.AddPiece(sealer.WithPriority(ctx.Context(), DealSectorPriority),
m.minerSector(sector.SectorType, sector.SectorNumber), m.minerSector(sector.SectorType, sector.SectorNumber),
pieceSizes, pieceSizes,
deal.size, deal.size,

View File

@ -27,10 +27,10 @@ import (
"github.com/filecoin-project/lotus/chain/actors/builtin/market" "github.com/filecoin-project/lotus/chain/actors/builtin/market"
lminer "github.com/filecoin-project/lotus/chain/actors/builtin/miner" lminer "github.com/filecoin-project/lotus/chain/actors/builtin/miner"
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
sectorstorage "github.com/filecoin-project/lotus/extern/sector-storage"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper"
"github.com/filecoin-project/lotus/node/config" "github.com/filecoin-project/lotus/node/config"
"github.com/filecoin-project/lotus/storage/pipeline/sealiface" "github.com/filecoin-project/lotus/storage/pipeline/sealiface"
"github.com/filecoin-project/lotus/storage/sealer"
"github.com/filecoin-project/lotus/storage/sealer/ffiwrapper"
) )
const SectorStorePrefix = "/sectors" const SectorStorePrefix = "/sectors"
@ -95,7 +95,7 @@ type Sealing struct {
maddr address.Address maddr address.Address
sealer sectorstorage.SectorManager sealer sealer.SectorManager
sectors *statemachine.StateGroup sectors *statemachine.StateGroup
sc SectorIDCounter sc SectorIDCounter
verif ffiwrapper.Verifier verif ffiwrapper.Verifier
@ -160,7 +160,7 @@ type pendingPiece struct {
accepted func(abi.SectorNumber, abi.UnpaddedPieceSize, error) accepted func(abi.SectorNumber, abi.UnpaddedPieceSize, error)
} }
func New(mctx context.Context, api SealingAPI, fc config.MinerFeeConfig, events Events, maddr address.Address, ds datastore.Batching, sealer sectorstorage.SectorManager, sc SectorIDCounter, verif ffiwrapper.Verifier, prov ffiwrapper.Prover, pcp PreCommitPolicy, gc GetSealingConfigFunc, notifee SectorStateNotifee, as AddrSel) *Sealing { func New(mctx context.Context, api SealingAPI, fc config.MinerFeeConfig, events Events, maddr address.Address, ds datastore.Batching, sealer sealer.SectorManager, sc SectorIDCounter, verif ffiwrapper.Verifier, prov ffiwrapper.Prover, pcp PreCommitPolicy, gc GetSealingConfigFunc, notifee SectorStateNotifee, as AddrSel) *Sealing {
s := &Sealing{ s := &Sealing{
Api: api, Api: api,
DealInfo: &CurrentDealInfoManager{api}, DealInfo: &CurrentDealInfoManager{api},

View File

@ -21,7 +21,7 @@ import (
api2 "github.com/filecoin-project/lotus/api" api2 "github.com/filecoin-project/lotus/api"
"github.com/filecoin-project/lotus/chain/actors/builtin/market" "github.com/filecoin-project/lotus/chain/actors/builtin/market"
sealing2 "github.com/filecoin-project/lotus/storage/pipeline" sealing2 "github.com/filecoin-project/lotus/storage/pipeline"
mocks2 "github.com/filecoin-project/lotus/storage/pipeline/mocks" mocks "github.com/filecoin-project/lotus/storage/pipeline/mocks"
) )
func TestStateRecoverDealIDs(t *testing.T) { func TestStateRecoverDealIDs(t *testing.T) {
@ -31,14 +31,14 @@ func TestStateRecoverDealIDs(t *testing.T) {
ctx := context.Background() ctx := context.Background()
api := mocks2.NewMockSealingAPI(mockCtrl) api := mocks.NewMockSealingAPI(mockCtrl)
fakeSealing := &sealing2.Sealing{ fakeSealing := &sealing2.Sealing{
Api: api, Api: api,
DealInfo: &sealing2.CurrentDealInfoManager{CDAPI: api}, DealInfo: &sealing2.CurrentDealInfoManager{CDAPI: api},
} }
sctx := mocks2.NewMockContext(mockCtrl) sctx := mocks.NewMockContext(mockCtrl)
sctx.EXPECT().Context().AnyTimes().Return(ctx) sctx.EXPECT().Context().AnyTimes().Return(ctx)
api.EXPECT().ChainHead(ctx).Times(2).Return(nil, abi.ChainEpoch(10), nil) api.EXPECT().ChainHead(ctx).Times(2).Return(nil, abi.ChainEpoch(10), nil)

View File

@ -13,8 +13,8 @@ import (
"github.com/filecoin-project/specs-storage/storage" "github.com/filecoin-project/specs-storage/storage"
"github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/api"
sectorstorage "github.com/filecoin-project/lotus/extern/sector-storage"
"github.com/filecoin-project/lotus/storage/pipeline/sealiface" "github.com/filecoin-project/lotus/storage/pipeline/sealiface"
"github.com/filecoin-project/lotus/storage/sealer"
) )
//go:generate go run github.com/golang/mock/mockgen -destination=mocks/statemachine.go -package=mocks . Context //go:generate go run github.com/golang/mock/mockgen -destination=mocks/statemachine.go -package=mocks . Context
@ -157,7 +157,7 @@ func (t *SectorInfo) sealingCtx(ctx context.Context) context.Context {
// we need sealed sooner // we need sealed sooner
if t.hasDeals() { if t.hasDeals() {
return sectorstorage.WithPriority(ctx, DealSectorPriority) return sealer.WithPriority(ctx, DealSectorPriority)
} }
return ctx return ctx

View File

@ -1,6 +1,6 @@
// Code generated by github.com/whyrusleeping/cbor-gen. DO NOT EDIT. // Code generated by github.com/whyrusleeping/cbor-gen. DO NOT EDIT.
package sectorstorage package sealer
import ( import (
"fmt" "fmt"
@ -12,7 +12,7 @@ import (
cbg "github.com/whyrusleeping/cbor-gen" cbg "github.com/whyrusleeping/cbor-gen"
xerrors "golang.org/x/xerrors" xerrors "golang.org/x/xerrors"
sealtasks "github.com/filecoin-project/lotus/extern/sector-storage/sealtasks" "github.com/filecoin-project/lotus/storage/sealer/sealtasks"
) )
var _ = xerrors.Errorf var _ = xerrors.Errorf

View File

@ -1,7 +1,7 @@
//go:build !linux //go:build !linux
// +build !linux // +build !linux
package sectorstorage package sealer
func cgroupV1Mem() (memoryMax, memoryUsed, swapMax, swapUsed uint64, err error) { func cgroupV1Mem() (memoryMax, memoryUsed, swapMax, swapUsed uint64, err error) {
return 0, 0, 0, 0, nil return 0, 0, 0, 0, nil

View File

@ -1,7 +1,7 @@
//go:build linux //go:build linux
// +build linux // +build linux
package sectorstorage package sealer
import ( import (
"bufio" "bufio"

View File

Before

Width:  |  Height:  |  Size: 75 KiB

After

Width:  |  Height:  |  Size: 75 KiB

View File

@ -1,4 +1,4 @@
package sectorstorage package sealer
import ( import (
"context" "context"
@ -13,7 +13,7 @@ import (
"github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/specs-storage/storage" "github.com/filecoin-project/specs-storage/storage"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface" storiface "github.com/filecoin-project/lotus/storage/sealer/storiface"
) )
var PostCheckTimeout = 160 * time.Second var PostCheckTimeout = 160 * time.Second

View File

@ -9,7 +9,7 @@ import (
"github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/specs-storage/storage" "github.com/filecoin-project/specs-storage/storage"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface" storiface "github.com/filecoin-project/lotus/storage/sealer/storiface"
) )
type sectorFile struct { type sectorFile struct {

View File

@ -28,11 +28,11 @@ import (
"github.com/filecoin-project/go-state-types/proof" "github.com/filecoin-project/go-state-types/proof"
"github.com/filecoin-project/specs-storage/storage" "github.com/filecoin-project/specs-storage/storage"
"github.com/filecoin-project/lotus/extern/sector-storage/fr32"
"github.com/filecoin-project/lotus/extern/sector-storage/partialfile"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface"
"github.com/filecoin-project/lotus/lib/nullreader" "github.com/filecoin-project/lotus/lib/nullreader"
nr "github.com/filecoin-project/lotus/storage/pipeline/lib/nullreader" nr "github.com/filecoin-project/lotus/storage/pipeline/lib/nullreader"
fr322 "github.com/filecoin-project/lotus/storage/sealer/fr32"
"github.com/filecoin-project/lotus/storage/sealer/partialfile"
storiface "github.com/filecoin-project/lotus/storage/sealer/storiface"
) )
var _ Storage = &Sealer{} var _ Storage = &Sealer{}
@ -237,7 +237,7 @@ func (sb *Sealer) AddPiece(ctx context.Context, sector storage.SectorRef, existi
return abi.PieceInfo{}, xerrors.Errorf("getting partial file writer: %w", err) return abi.PieceInfo{}, xerrors.Errorf("getting partial file writer: %w", err)
} }
pw := fr32.NewPadWriter(w) pw := fr322.NewPadWriter(w)
pr := io.TeeReader(io.LimitReader(file, int64(pieceSize)), pw) pr := io.TeeReader(io.LimitReader(file, int64(pieceSize)), pw)
@ -537,11 +537,11 @@ func (sb *Sealer) UnsealPiece(ctx context.Context, sector storage.SectorRef, off
defer close(outWait) defer close(outWait)
defer opr.Close() // nolint defer opr.Close() // nolint
padwriter := fr32.NewPadWriter(out) padwriter := fr322.NewPadWriter(out)
bsize := uint64(size.Padded()) bsize := uint64(size.Padded())
if bsize > uint64(runtime.NumCPU())*fr32.MTTresh { if bsize > uint64(runtime.NumCPU())*fr322.MTTresh {
bsize = uint64(runtime.NumCPU()) * fr32.MTTresh bsize = uint64(runtime.NumCPU()) * fr322.MTTresh
} }
bw := bufio.NewWriterSize(padwriter, int(abi.PaddedPieceSize(bsize).Unpadded())) bw := bufio.NewWriterSize(padwriter, int(abi.PaddedPieceSize(bsize).Unpadded()))
@ -644,7 +644,7 @@ func (sb *Sealer) ReadPiece(ctx context.Context, writer io.Writer, sector storag
return false, xerrors.Errorf("getting partial file reader: %w", err) return false, xerrors.Errorf("getting partial file reader: %w", err)
} }
upr, err := fr32.NewUnpadReader(f, size.Padded()) upr, err := fr322.NewUnpadReader(f, size.Padded())
if err != nil { if err != nil {
return false, xerrors.Errorf("creating unpadded reader: %w", err) return false, xerrors.Errorf("creating unpadded reader: %w", err)
} }

View File

@ -29,9 +29,9 @@ import (
"github.com/filecoin-project/specs-storage/storage" "github.com/filecoin-project/specs-storage/storage"
"github.com/filecoin-project/lotus/chain/actors/policy" "github.com/filecoin-project/lotus/chain/actors/policy"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper/basicfs"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface"
"github.com/filecoin-project/lotus/storage/pipeline/lib/nullreader" "github.com/filecoin-project/lotus/storage/pipeline/lib/nullreader"
"github.com/filecoin-project/lotus/storage/sealer/ffiwrapper/basicfs"
storiface "github.com/filecoin-project/lotus/storage/sealer/storiface"
) )
func init() { func init() {

View File

@ -10,8 +10,8 @@ import (
"github.com/filecoin-project/go-state-types/proof" "github.com/filecoin-project/go-state-types/proof"
"github.com/filecoin-project/specs-storage/storage" "github.com/filecoin-project/specs-storage/storage"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper/basicfs" "github.com/filecoin-project/lotus/storage/sealer/ffiwrapper/basicfs"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface" storiface "github.com/filecoin-project/lotus/storage/sealer/storiface"
) )
type Validator interface { type Validator interface {

View File

@ -6,8 +6,8 @@ import (
rlepluslazy "github.com/filecoin-project/go-bitfield/rle" rlepluslazy "github.com/filecoin-project/go-bitfield/rle"
"github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/lotus/extern/sector-storage/partialfile" "github.com/filecoin-project/lotus/storage/sealer/partialfile"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface" "github.com/filecoin-project/lotus/storage/sealer/storiface"
) )
// merge gaps between ranges which are close to each other // merge gaps between ranges which are close to each other

View File

@ -14,7 +14,7 @@ import (
"github.com/filecoin-project/specs-actors/v7/actors/runtime/proof" "github.com/filecoin-project/specs-actors/v7/actors/runtime/proof"
"github.com/filecoin-project/specs-storage/storage" "github.com/filecoin-project/specs-storage/storage"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface" storiface "github.com/filecoin-project/lotus/storage/sealer/storiface"
) )
func (sb *Sealer) GenerateWinningPoSt(ctx context.Context, minerID abi.ActorID, sectorInfo []proof.ExtendedSectorInfo, randomness abi.PoStRandomness) ([]proof.PoStProof, error) { func (sb *Sealer) GenerateWinningPoSt(ctx context.Context, minerID abi.ActorID, sectorInfo []proof.ExtendedSectorInfo, randomness abi.PoStRandomness) ([]proof.PoStProof, error) {

View File

@ -13,7 +13,7 @@ import (
commpffi "github.com/filecoin-project/go-commp-utils/ffiwrapper" commpffi "github.com/filecoin-project/go-commp-utils/ffiwrapper"
"github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/lotus/extern/sector-storage/fr32" "github.com/filecoin-project/lotus/storage/sealer/fr32"
) )
func TestWriteTwoPcs(t *testing.T) { func TestWriteTwoPcs(t *testing.T) {

View File

@ -14,7 +14,7 @@ import (
commpffi "github.com/filecoin-project/go-commp-utils/ffiwrapper" commpffi "github.com/filecoin-project/go-commp-utils/ffiwrapper"
"github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/lotus/extern/sector-storage/fr32" "github.com/filecoin-project/lotus/storage/sealer/fr32"
) )
func padFFI(buf []byte) []byte { func padFFI(buf []byte) []byte {

View File

@ -10,7 +10,7 @@ import (
"github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/lotus/extern/sector-storage/fr32" fr322 "github.com/filecoin-project/lotus/storage/sealer/fr32"
) )
func TestUnpadReader(t *testing.T) { func TestUnpadReader(t *testing.T) {
@ -19,9 +19,9 @@ func TestUnpadReader(t *testing.T) {
raw := bytes.Repeat([]byte{0x77}, int(ps)) raw := bytes.Repeat([]byte{0x77}, int(ps))
padOut := make([]byte, ps.Padded()) padOut := make([]byte, ps.Padded())
fr32.Pad(raw, padOut) fr322.Pad(raw, padOut)
r, err := fr32.NewUnpadReader(bytes.NewReader(padOut), ps.Padded()) r, err := fr322.NewUnpadReader(bytes.NewReader(padOut), ps.Padded())
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }

View File

@ -1,4 +1,4 @@
package sectorstorage package sealer
import ( import (
"context" "context"
@ -19,11 +19,11 @@ import (
"github.com/filecoin-project/go-statestore" "github.com/filecoin-project/go-statestore"
"github.com/filecoin-project/specs-storage/storage" "github.com/filecoin-project/specs-storage/storage"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper" ffiwrapper "github.com/filecoin-project/lotus/storage/sealer/ffiwrapper"
"github.com/filecoin-project/lotus/extern/sector-storage/fsutil" "github.com/filecoin-project/lotus/storage/sealer/fsutil"
"github.com/filecoin-project/lotus/extern/sector-storage/sealtasks" "github.com/filecoin-project/lotus/storage/sealer/sealtasks"
"github.com/filecoin-project/lotus/extern/sector-storage/stores" stores "github.com/filecoin-project/lotus/storage/sealer/stores"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface" storiface "github.com/filecoin-project/lotus/storage/sealer/storiface"
) )
var log = logging.Logger("advmgr") var log = logging.Logger("advmgr")

View File

@ -1,4 +1,4 @@
package sectorstorage package sealer
import ( import (
"context" "context"
@ -11,8 +11,8 @@ import (
"golang.org/x/xerrors" "golang.org/x/xerrors"
"github.com/filecoin-project/lotus/extern/sector-storage/sealtasks" "github.com/filecoin-project/lotus/storage/sealer/sealtasks"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface" "github.com/filecoin-project/lotus/storage/sealer/storiface"
) )
type WorkID struct { type WorkID struct {

View File

@ -1,4 +1,4 @@
package sectorstorage package sealer
import ( import (
"context" "context"
@ -13,7 +13,7 @@ import (
"github.com/filecoin-project/specs-actors/v6/actors/builtin" "github.com/filecoin-project/specs-actors/v6/actors/builtin"
"github.com/filecoin-project/specs-actors/v7/actors/runtime/proof" "github.com/filecoin-project/specs-actors/v7/actors/runtime/proof"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface" "github.com/filecoin-project/lotus/storage/sealer/storiface"
) )
func (m *Manager) GenerateWinningPoSt(ctx context.Context, minerID abi.ActorID, sectorInfo []proof.ExtendedSectorInfo, randomness abi.PoStRandomness) ([]proof.PoStProof, error) { func (m *Manager) GenerateWinningPoSt(ctx context.Context, minerID abi.ActorID, sectorInfo []proof.ExtendedSectorInfo, randomness abi.PoStRandomness) ([]proof.PoStProof, error) {

View File

@ -1,5 +1,5 @@
//stm: #unit //stm: #unit
package sectorstorage package sealer
import ( import (
"bytes" "bytes"
@ -29,11 +29,11 @@ import (
proof7 "github.com/filecoin-project/specs-actors/v7/actors/runtime/proof" proof7 "github.com/filecoin-project/specs-actors/v7/actors/runtime/proof"
"github.com/filecoin-project/specs-storage/storage" "github.com/filecoin-project/specs-storage/storage"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper" ffiwrapper "github.com/filecoin-project/lotus/storage/sealer/ffiwrapper"
"github.com/filecoin-project/lotus/extern/sector-storage/fsutil" fsutil "github.com/filecoin-project/lotus/storage/sealer/fsutil"
"github.com/filecoin-project/lotus/extern/sector-storage/sealtasks" "github.com/filecoin-project/lotus/storage/sealer/sealtasks"
"github.com/filecoin-project/lotus/extern/sector-storage/stores" stores "github.com/filecoin-project/lotus/storage/sealer/stores"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface" storiface "github.com/filecoin-project/lotus/storage/sealer/storiface"
) )
func init() { func init() {
@ -47,7 +47,7 @@ func (t testStorage) DiskUsage(path string) (int64, error) {
} }
func newTestStorage(t *testing.T) *testStorage { func newTestStorage(t *testing.T) *testStorage {
tp, err := ioutil.TempDir(os.TempDir(), "sector-storage-test-") tp, err := ioutil.TempDir(os.TempDir(), "sealer-test-")
require.NoError(t, err) require.NoError(t, err)
{ {

View File

@ -15,14 +15,14 @@ import (
"golang.org/x/xerrors" "golang.org/x/xerrors"
"github.com/filecoin-project/dagstore/mount" "github.com/filecoin-project/dagstore/mount"
ffiwrapper2 "github.com/filecoin-project/go-commp-utils/ffiwrapper" ffiwrapper "github.com/filecoin-project/go-commp-utils/ffiwrapper"
commcid "github.com/filecoin-project/go-fil-commcid" commcid "github.com/filecoin-project/go-fil-commcid"
"github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/abi"
prooftypes "github.com/filecoin-project/go-state-types/proof" prooftypes "github.com/filecoin-project/go-state-types/proof"
"github.com/filecoin-project/specs-storage/storage" "github.com/filecoin-project/specs-storage/storage"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper" ffiwrapper3 "github.com/filecoin-project/lotus/storage/sealer/ffiwrapper"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface" storiface "github.com/filecoin-project/lotus/storage/sealer/storiface"
) )
var log = logging.Logger("sbmock") var log = logging.Logger("sbmock")
@ -90,7 +90,7 @@ func (mgr *SectorMgr) AddPiece(ctx context.Context, sectorID storage.SectorRef,
var b bytes.Buffer var b bytes.Buffer
tr := io.TeeReader(r, &b) tr := io.TeeReader(r, &b)
c, err := ffiwrapper2.GeneratePieceCIDFromFile(sectorID.ProofType, tr, size) c, err := ffiwrapper.GeneratePieceCIDFromFile(sectorID.ProofType, tr, size)
if err != nil { if err != nil {
return abi.PieceInfo{}, xerrors.Errorf("failed to generate piece cid: %w", err) return abi.PieceInfo{}, xerrors.Errorf("failed to generate piece cid: %w", err)
} }
@ -722,7 +722,7 @@ func (m mockVerifProver) VerifyWindowPoSt(ctx context.Context, info prooftypes.W
} }
func (m mockVerifProver) GenerateDataCommitment(pt abi.RegisteredSealProof, pieces []abi.PieceInfo) (cid.Cid, error) { func (m mockVerifProver) GenerateDataCommitment(pt abi.RegisteredSealProof, pieces []abi.PieceInfo) (cid.Cid, error) {
return ffiwrapper.GenerateUnsealedCID(pt, pieces) return ffiwrapper3.GenerateUnsealedCID(pt, pieces)
} }
func (m mockVerifProver) GenerateWinningPoStSectorChallenge(ctx context.Context, proofType abi.RegisteredPoStProof, minerID abi.ActorID, randomness abi.PoStRandomness, eligibleSectorCount uint64) ([]uint64, error) { func (m mockVerifProver) GenerateWinningPoStSectorChallenge(ctx context.Context, proofType abi.RegisteredPoStProof, minerID abi.ActorID, randomness abi.PoStRandomness, eligibleSectorCount uint64) ([]uint64, error) {
@ -736,5 +736,5 @@ var MockVerifier = mockVerifProver{
var MockProver = MockVerifier var MockProver = MockVerifier
var _ storage.Sealer = &SectorMgr{} var _ storage.Sealer = &SectorMgr{}
var _ ffiwrapper.Verifier = MockVerifier var _ ffiwrapper3.Verifier = MockVerifier
var _ ffiwrapper.Prover = MockProver var _ ffiwrapper3.Prover = MockProver

View File

@ -13,8 +13,8 @@ import (
rlepluslazy "github.com/filecoin-project/go-bitfield/rle" rlepluslazy "github.com/filecoin-project/go-bitfield/rle"
"github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/lotus/extern/sector-storage/fsutil" "github.com/filecoin-project/lotus/storage/sealer/fsutil"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface" "github.com/filecoin-project/lotus/storage/sealer/storiface"
) )
var log = logging.Logger("partialfile") var log = logging.Logger("partialfile")

View File

@ -1,4 +1,4 @@
package sectorstorage package sealer
import ( import (
"bufio" "bufio"
@ -12,9 +12,9 @@ import (
"github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/specs-storage/storage" "github.com/filecoin-project/specs-storage/storage"
"github.com/filecoin-project/lotus/extern/sector-storage/fr32" "github.com/filecoin-project/lotus/storage/sealer/fr32"
"github.com/filecoin-project/lotus/extern/sector-storage/stores" stores "github.com/filecoin-project/lotus/storage/sealer/stores"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface" storiface "github.com/filecoin-project/lotus/storage/sealer/storiface"
) )
type Unsealer interface { type Unsealer interface {

View File

@ -1,4 +1,4 @@
package sectorstorage package sealer
import ( import (
"bytes" "bytes"
@ -22,9 +22,9 @@ import (
"github.com/filecoin-project/go-statestore" "github.com/filecoin-project/go-statestore"
specstorage "github.com/filecoin-project/specs-storage/storage" specstorage "github.com/filecoin-project/specs-storage/storage"
"github.com/filecoin-project/lotus/extern/sector-storage/sealtasks" "github.com/filecoin-project/lotus/storage/sealer/sealtasks"
"github.com/filecoin-project/lotus/extern/sector-storage/stores" stores "github.com/filecoin-project/lotus/storage/sealer/stores"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface" storiface "github.com/filecoin-project/lotus/storage/sealer/storiface"
) )
// TestPieceProviderReadPiece verifies that the ReadPiece method works correctly // TestPieceProviderReadPiece verifies that the ReadPiece method works correctly

Some files were not shown because too many files have changed in this diff Show More