diff --git a/go.mod b/go.mod index 078e6748a..00325147a 100644 --- a/go.mod +++ b/go.mod @@ -36,7 +36,7 @@ require ( github.com/filecoin-project/go-data-transfer v1.7.3 github.com/filecoin-project/go-fil-commcid v0.1.0 github.com/filecoin-project/go-fil-commp-hashhash v0.1.0 - github.com/filecoin-project/go-fil-markets v1.6.3-0.20210810124704-13ab16627deb + github.com/filecoin-project/go-fil-markets v1.6.3-0.20210810140603-e1accb977cc1 github.com/filecoin-project/go-jsonrpc v0.1.4-0.20210217175800-45ea43ac2bec github.com/filecoin-project/go-multistore v0.0.3 github.com/filecoin-project/go-padreader v0.0.0-20210723183308-812a16dc01b1 diff --git a/go.sum b/go.sum index 063464736..d9071caa2 100644 --- a/go.sum +++ b/go.sum @@ -291,6 +291,8 @@ github.com/filecoin-project/go-fil-commp-hashhash v0.1.0/go.mod h1:73S8WSEWh9vr0 github.com/filecoin-project/go-fil-markets v1.0.5-0.20201113164554-c5eba40d5335/go.mod h1:AJySOJC00JRWEZzRG2KsfUnqEf5ITXxeX09BE9N4f9c= github.com/filecoin-project/go-fil-markets v1.6.3-0.20210810124704-13ab16627deb h1:+5ODoU3LjQ2Gxi+9Fe9Oe/fYVNG5l5BkHHLpxkrH8LE= github.com/filecoin-project/go-fil-markets v1.6.3-0.20210810124704-13ab16627deb/go.mod h1:uTcTs8PQv1j72xSrnH3MrXnq3bUE2kQu89CNmRhsRMI= +github.com/filecoin-project/go-fil-markets v1.6.3-0.20210810140603-e1accb977cc1 h1:gMFVOzswL91IdTnZPtcF9uO5sclfYhPANPsncHPicJc= +github.com/filecoin-project/go-fil-markets v1.6.3-0.20210810140603-e1accb977cc1/go.mod h1:uTcTs8PQv1j72xSrnH3MrXnq3bUE2kQu89CNmRhsRMI= github.com/filecoin-project/go-hamt-ipld v0.1.5 h1:uoXrKbCQZ49OHpsTCkrThPNelC4W3LPEk0OrS/ytIBM= github.com/filecoin-project/go-hamt-ipld v0.1.5/go.mod h1:6Is+ONR5Cd5R6XZoCse1CWaXZc0Hdb/JeX+EQCQzX24= github.com/filecoin-project/go-hamt-ipld/v2 v2.0.0 h1:b3UDemBYN2HNfk3KOXNuxgTTxlWi3xVvbQP0IT38fvM= diff --git a/markets/dagstore/miner_api.go b/markets/dagstore/miner_api.go index ca6483723..afe623eb2 100644 --- a/markets/dagstore/miner_api.go +++ b/markets/dagstore/miner_api.go @@ -10,7 +10,7 @@ import ( "golang.org/x/xerrors" "github.com/filecoin-project/go-fil-markets/piecestore" - "github.com/filecoin-project/go-fil-markets/sectoraccessor" + "github.com/filecoin-project/go-fil-markets/retrievalmarket" "github.com/filecoin-project/go-fil-markets/shared" ) @@ -23,14 +23,14 @@ type MinerAPI interface { type minerAPI struct { pieceStore piecestore.PieceStore - sa sectoraccessor.SectorAccessor + sa retrievalmarket.SectorAccessor throttle throttle.Throttler readyMgr *shared.ReadyManager } var _ MinerAPI = (*minerAPI)(nil) -func NewMinerAPI(store piecestore.PieceStore, sa sectoraccessor.SectorAccessor, concurrency int) MinerAPI { +func NewMinerAPI(store piecestore.PieceStore, sa retrievalmarket.SectorAccessor, concurrency int) MinerAPI { return &minerAPI{ pieceStore: store, sa: sa, diff --git a/markets/sectoraccessor/sectoraccessor.go b/markets/sectoraccessor/sectoraccessor.go index 33489a6fc..1304a3a00 100644 --- a/markets/sectoraccessor/sectoraccessor.go +++ b/markets/sectoraccessor/sectoraccessor.go @@ -15,7 +15,7 @@ import ( "github.com/filecoin-project/lotus/storage/sectorblocks" "github.com/filecoin-project/go-address" - "github.com/filecoin-project/go-fil-markets/sectoraccessor" + "github.com/filecoin-project/go-fil-markets/retrievalmarket" "github.com/filecoin-project/go-state-types/abi" specstorage "github.com/filecoin-project/specs-storage/storage" @@ -32,9 +32,9 @@ type sectorAccessor struct { full v1api.FullNode } -var _ sectoraccessor.SectorAccessor = (*sectorAccessor)(nil) +var _ retrievalmarket.SectorAccessor = (*sectorAccessor)(nil) -func NewSectorAccessor(maddr dtypes.MinerAddress, secb sectorblocks.SectorBuilder, pp sectorstorage.PieceProvider, full v1api.FullNode) sectoraccessor.SectorAccessor { +func NewSectorAccessor(maddr dtypes.MinerAddress, secb sectorblocks.SectorBuilder, pp sectorstorage.PieceProvider, full v1api.FullNode) retrievalmarket.SectorAccessor { return §orAccessor{address.Address(maddr), secb, pp, full} } diff --git a/node/builder_miner.go b/node/builder_miner.go index d771fd4a3..8d74b47bc 100644 --- a/node/builder_miner.go +++ b/node/builder_miner.go @@ -4,9 +4,6 @@ import ( "errors" "time" - "github.com/filecoin-project/go-fil-markets/sectoraccessor" - lotussectoraccessor "github.com/filecoin-project/lotus/markets/sectoraccessor" - "go.uber.org/fx" "golang.org/x/xerrors" @@ -28,6 +25,7 @@ import ( "github.com/filecoin-project/lotus/markets/dagstore" "github.com/filecoin-project/lotus/markets/dealfilter" "github.com/filecoin-project/lotus/markets/retrievaladapter" + "github.com/filecoin-project/lotus/markets/sectoraccessor" "github.com/filecoin-project/lotus/markets/storageadapter" "github.com/filecoin-project/lotus/miner" "github.com/filecoin-project/lotus/node/config" @@ -155,7 +153,7 @@ func ConfigStorageMiner(c interface{}) Option { Override(DAGStoreKey, modules.DAGStore), // Markets (retrieval) - Override(new(sectoraccessor.SectorAccessor), lotussectoraccessor.NewSectorAccessor), + Override(new(retrievalmarket.SectorAccessor), sectoraccessor.NewSectorAccessor), Override(new(retrievalmarket.RetrievalProviderNode), retrievaladapter.NewRetrievalProviderNode), Override(new(rmnet.RetrievalMarketNetwork), modules.RetrievalNetwork), Override(new(retrievalmarket.RetrievalProvider), modules.RetrievalProvider), diff --git a/node/impl/storminer.go b/node/impl/storminer.go index 13049e4b1..5f0826b0e 100644 --- a/node/impl/storminer.go +++ b/node/impl/storminer.go @@ -10,8 +10,6 @@ import ( "strconv" "time" - "github.com/filecoin-project/go-fil-markets/sectoraccessor" - "github.com/filecoin-project/dagstore" "github.com/filecoin-project/dagstore/shard" "github.com/filecoin-project/go-jsonrpc/auth" @@ -70,7 +68,7 @@ type StorageMinerAPI struct { PieceStore dtypes.ProviderPieceStore `optional:"true"` StorageProvider storagemarket.StorageProvider `optional:"true"` RetrievalProvider retrievalmarket.RetrievalProvider `optional:"true"` - SectorAccessor sectoraccessor.SectorAccessor `optional:"true"` + SectorAccessor retrievalmarket.SectorAccessor `optional:"true"` DataTransfer dtypes.ProviderDataTransfer `optional:"true"` DealPublisher *storageadapter.DealPublisher `optional:"true"` SectorBlocks *sectorblocks.SectorBlocks `optional:"true"` diff --git a/node/modules/storageminer.go b/node/modules/storageminer.go index 17fe41883..0d9605568 100644 --- a/node/modules/storageminer.go +++ b/node/modules/storageminer.go @@ -42,7 +42,6 @@ import ( "github.com/filecoin-project/go-fil-markets/retrievalmarket" retrievalimpl "github.com/filecoin-project/go-fil-markets/retrievalmarket/impl" rmnet "github.com/filecoin-project/go-fil-markets/retrievalmarket/network" - "github.com/filecoin-project/go-fil-markets/sectoraccessor" "github.com/filecoin-project/go-fil-markets/shared" "github.com/filecoin-project/go-fil-markets/storagemarket" storageimpl "github.com/filecoin-project/go-fil-markets/storagemarket/impl" @@ -671,7 +670,7 @@ func RetrievalPricingFunc(cfg config.DealmakingConfig) func(_ dtypes.ConsiderOnl func RetrievalProvider( maddr dtypes.MinerAddress, adapter retrievalmarket.RetrievalProviderNode, - sa sectoraccessor.SectorAccessor, + sa retrievalmarket.SectorAccessor, netwk rmnet.RetrievalMarketNetwork, ds dtypes.MetadataDS, pieceStore dtypes.ProviderPieceStore, diff --git a/node/modules/storageminer_dagstore.go b/node/modules/storageminer_dagstore.go index d385eea5c..1f72a49b9 100644 --- a/node/modules/storageminer_dagstore.go +++ b/node/modules/storageminer_dagstore.go @@ -11,7 +11,7 @@ import ( "golang.org/x/xerrors" "github.com/filecoin-project/dagstore" - "github.com/filecoin-project/go-fil-markets/sectoraccessor" + "github.com/filecoin-project/go-fil-markets/retrievalmarket" mdagstore "github.com/filecoin-project/lotus/markets/dagstore" "github.com/filecoin-project/lotus/node/config" @@ -25,7 +25,7 @@ const ( ) // NewMinerAPI creates a new MinerAPI adaptor for the dagstore mounts. -func NewMinerAPI(lc fx.Lifecycle, r repo.LockedRepo, pieceStore dtypes.ProviderPieceStore, sa sectoraccessor.SectorAccessor) (mdagstore.MinerAPI, error) { +func NewMinerAPI(lc fx.Lifecycle, r repo.LockedRepo, pieceStore dtypes.ProviderPieceStore, sa retrievalmarket.SectorAccessor) (mdagstore.MinerAPI, error) { cfg, err := extractDAGStoreConfig(r) if err != nil { return nil, err