@@ -7,14 +7,9 @@ import (
7
7
8
8
"github.com/google/uuid"
9
9
"github.com/ipfs/go-cid"
10
- "github.com/libp2p/go-libp2p/core/peer"
11
10
12
11
"github.com/filecoin-project/go-address"
13
12
"github.com/filecoin-project/go-bitfield"
14
- datatransfer "github.com/filecoin-project/go-data-transfer/v2"
15
- "github.com/filecoin-project/go-fil-markets/piecestore"
16
- "github.com/filecoin-project/go-fil-markets/retrievalmarket"
17
- "github.com/filecoin-project/go-fil-markets/storagemarket"
18
13
"github.com/filecoin-project/go-jsonrpc/auth"
19
14
"github.com/filecoin-project/go-state-types/abi"
20
15
"github.com/filecoin-project/go-state-types/big"
@@ -215,110 +210,12 @@ type StorageMiner interface {
215
210
StorageDetachLocal (ctx context.Context , path string ) error //perm:admin
216
211
StorageRedeclareLocal (ctx context.Context , id * storiface.ID , dropMissing bool ) error //perm:admin
217
212
218
- MarketImportDealData (ctx context.Context , propcid cid.Cid , path string ) error //perm:write
219
- MarketListDeals (ctx context.Context ) ([]* MarketDeal , error ) //perm:read
220
-
221
- // MarketListRetrievalDeals is deprecated, returns empty list
222
- MarketListRetrievalDeals (ctx context.Context ) ([]struct {}, error ) //perm:read
223
- MarketGetDealUpdates (ctx context.Context ) (<- chan storagemarket.MinerDeal , error ) //perm:read
224
- MarketListIncompleteDeals (ctx context.Context ) ([]storagemarket.MinerDeal , error ) //perm:read
225
- MarketSetAsk (ctx context.Context , price types.BigInt , verifiedPrice types.BigInt , duration abi.ChainEpoch , minPieceSize abi.PaddedPieceSize , maxPieceSize abi.PaddedPieceSize ) error //perm:admin
226
- MarketGetAsk (ctx context.Context ) (* storagemarket.SignedStorageAsk , error ) //perm:read
227
- MarketSetRetrievalAsk (ctx context.Context , rask * retrievalmarket.Ask ) error //perm:admin
228
- MarketGetRetrievalAsk (ctx context.Context ) (* retrievalmarket.Ask , error ) //perm:read
229
- MarketListDataTransfers (ctx context.Context ) ([]DataTransferChannel , error ) //perm:write
230
- MarketDataTransferUpdates (ctx context.Context ) (<- chan DataTransferChannel , error ) //perm:write
231
- // MarketDataTransferDiagnostics generates debugging information about current data transfers over graphsync
232
- MarketDataTransferDiagnostics (ctx context.Context , p peer.ID ) (* TransferDiagnostics , error ) //perm:write
233
- // MarketRestartDataTransfer attempts to restart a data transfer with the given transfer ID and other peer
234
- MarketRestartDataTransfer (ctx context.Context , transferID datatransfer.TransferID , otherPeer peer.ID , isInitiator bool ) error //perm:write
235
- // MarketCancelDataTransfer cancels a data transfer with the given transfer ID and other peer
236
- MarketCancelDataTransfer (ctx context.Context , transferID datatransfer.TransferID , otherPeer peer.ID , isInitiator bool ) error //perm:write
237
- MarketPendingDeals (ctx context.Context ) (PendingDealInfo , error ) //perm:write
238
- MarketPublishPendingDeals (ctx context.Context ) error //perm:admin
239
- MarketRetryPublishDeal (ctx context.Context , propcid cid.Cid ) error //perm:admin
240
-
241
- // DagstoreListShards returns information about all shards known to the
242
- // DAG store. Only available on nodes running the markets subsystem.
243
- DagstoreListShards (ctx context.Context ) ([]DagstoreShardInfo , error ) //perm:read
244
-
245
- // DagstoreInitializeShard initializes an uninitialized shard.
246
- //
247
- // Initialization consists of fetching the shard's data (deal payload) from
248
- // the storage subsystem, generating an index, and persisting the index
249
- // to facilitate later retrievals, and/or to publish to external sources.
250
- //
251
- // This operation is intended to complement the initial migration. The
252
- // migration registers a shard for every unique piece CID, with lazy
253
- // initialization. Thus, shards are not initialized immediately to avoid
254
- // IO activity competing with proving. Instead, shard are initialized
255
- // when first accessed. This method forces the initialization of a shard by
256
- // accessing it and immediately releasing it. This is useful to warm up the
257
- // cache to facilitate subsequent retrievals, and to generate the indexes
258
- // to publish them externally.
259
- //
260
- // This operation fails if the shard is not in ShardStateNew state.
261
- // It blocks until initialization finishes.
262
- DagstoreInitializeShard (ctx context.Context , key string ) error //perm:write
263
-
264
- // DagstoreRecoverShard attempts to recover a failed shard.
265
- //
266
- // This operation fails if the shard is not in ShardStateErrored state.
267
- // It blocks until recovery finishes. If recovery failed, it returns the
268
- // error.
269
- DagstoreRecoverShard (ctx context.Context , key string ) error //perm:write
270
-
271
- // DagstoreInitializeAll initializes all uninitialized shards in bulk,
272
- // according to the policy passed in the parameters.
273
- //
274
- // It is recommended to set a maximum concurrency to avoid extreme
275
- // IO pressure if the storage subsystem has a large amount of deals.
276
- //
277
- // It returns a stream of events to report progress.
278
- DagstoreInitializeAll (ctx context.Context , params DagstoreInitializeAllParams ) (<- chan DagstoreInitializeAllEvent , error ) //perm:write
279
-
280
- // DagstoreGC runs garbage collection on the DAG store.
281
- DagstoreGC (ctx context.Context ) ([]DagstoreShardResult , error ) //perm:admin
282
-
283
- // DagstoreRegisterShard registers a shard manually with dagstore with given pieceCID
284
- DagstoreRegisterShard (ctx context.Context , key string ) error //perm:admin
285
-
286
- // IndexerAnnounceDeal informs indexer nodes that a new deal was received,
287
- // so they can download its index
288
- IndexerAnnounceDeal (ctx context.Context , proposalCid cid.Cid ) error //perm:admin
289
-
290
- // IndexerAnnounceAllDeals informs the indexer nodes aboutall active deals.
291
- IndexerAnnounceAllDeals (ctx context.Context ) error //perm:admin
292
-
293
- // DagstoreLookupPieces returns information about shards that contain the given CID.
294
- DagstoreLookupPieces (ctx context.Context , cid cid.Cid ) ([]DagstoreShardInfo , error ) //perm:admin
213
+ MarketListDeals (ctx context.Context ) ([]* MarketDeal , error ) //perm:read
295
214
296
215
// RuntimeSubsystems returns the subsystems that are enabled
297
216
// in this instance.
298
217
RuntimeSubsystems (ctx context.Context ) (MinerSubsystems , error ) //perm:read
299
218
300
- DealsImportData (ctx context.Context , dealPropCid cid.Cid , file string ) error //perm:admin
301
- DealsList (ctx context.Context ) ([]* MarketDeal , error ) //perm:admin
302
- DealsConsiderOnlineStorageDeals (context.Context ) (bool , error ) //perm:admin
303
- DealsSetConsiderOnlineStorageDeals (context.Context , bool ) error //perm:admin
304
- DealsConsiderOnlineRetrievalDeals (context.Context ) (bool , error ) //perm:admin
305
- DealsSetConsiderOnlineRetrievalDeals (context.Context , bool ) error //perm:admin
306
- DealsPieceCidBlocklist (context.Context ) ([]cid.Cid , error ) //perm:admin
307
- DealsSetPieceCidBlocklist (context.Context , []cid.Cid ) error //perm:admin
308
- DealsConsiderOfflineStorageDeals (context.Context ) (bool , error ) //perm:admin
309
- DealsSetConsiderOfflineStorageDeals (context.Context , bool ) error //perm:admin
310
- DealsConsiderOfflineRetrievalDeals (context.Context ) (bool , error ) //perm:admin
311
- DealsSetConsiderOfflineRetrievalDeals (context.Context , bool ) error //perm:admin
312
- DealsConsiderVerifiedStorageDeals (context.Context ) (bool , error ) //perm:admin
313
- DealsSetConsiderVerifiedStorageDeals (context.Context , bool ) error //perm:admin
314
- DealsConsiderUnverifiedStorageDeals (context.Context ) (bool , error ) //perm:admin
315
- DealsSetConsiderUnverifiedStorageDeals (context.Context , bool ) error //perm:admin
316
-
317
- PiecesListPieces (ctx context.Context ) ([]cid.Cid , error ) //perm:read
318
- PiecesListCidInfos (ctx context.Context ) ([]cid.Cid , error ) //perm:read
319
- PiecesGetPieceInfo (ctx context.Context , pieceCid cid.Cid ) (* piecestore.PieceInfo , error ) //perm:read
320
- PiecesGetCIDInfo (ctx context.Context , payloadCid cid.Cid ) (* piecestore.CIDInfo , error ) //perm:read
321
-
322
219
// CreateBackup creates node backup onder the specified file name. The
323
220
// method requires that the lotus-miner is running with the
324
221
// LOTUS_BACKUP_BASE_PATH environment variable set to some path, and that
@@ -471,37 +368,6 @@ type SectorOffset struct {
471
368
Offset abi.PaddedPieceSize
472
369
}
473
370
474
- // DagstoreShardInfo is the serialized form of dagstore.DagstoreShardInfo that
475
- // we expose through JSON-RPC to avoid clients having to depend on the
476
- // dagstore lib.
477
- type DagstoreShardInfo struct {
478
- Key string
479
- State string
480
- Error string
481
- }
482
-
483
- // DagstoreShardResult enumerates results per shard.
484
- type DagstoreShardResult struct {
485
- Key string
486
- Success bool
487
- Error string
488
- }
489
-
490
- type DagstoreInitializeAllParams struct {
491
- MaxConcurrency int
492
- IncludeSealed bool
493
- }
494
-
495
- // DagstoreInitializeAllEvent represents an initialization event.
496
- type DagstoreInitializeAllEvent struct {
497
- Key string
498
- Event string // "start", "end"
499
- Success bool
500
- Error string
501
- Total int
502
- Current int
503
- }
504
-
505
371
type NumAssignerMeta struct {
506
372
Reserved bitfield.BitField
507
373
Allocated bitfield.BitField
0 commit comments