You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cmd/sptool/toolbox_deal_tools.go
+38-47Lines changed: 38 additions & 47 deletions
Original file line number
Diff line number
Diff line change
@@ -421,10 +421,15 @@ var allocateCmd = &cli.Command{
421
421
Usage: "storage provider address[es]",
422
422
Aliases: []string{"m", "provider", "p"},
423
423
},
424
-
&cli.StringSliceFlag{
425
-
Name: "piece-info",
426
-
Usage: "data piece-info[s] to create the allocation. The format must be --piece-info pieceCid1=pieceSize1 --piece-info pieceCid2=pieceSize2",
427
-
Aliases: []string{"pi"},
424
+
&cli.StringFlag{
425
+
Name: "piece-cid",
426
+
Usage: "data piece-cid to create the allocation",
427
+
Aliases: []string{"piece"},
428
+
},
429
+
&cli.Int64Flag{
430
+
Name: "piece-size",
431
+
Usage: "piece size to create the allocation",
432
+
Aliases: []string{"size"},
428
433
},
429
434
&cli.StringFlag{
430
435
Name: "wallet",
@@ -457,7 +462,7 @@ var allocateCmd = &cli.Command{
457
462
},
458
463
&cli.StringFlag{
459
464
Name: "piece-file",
460
-
Usage: "file containing piece-info[s] to create the allocation. Each line in the file should be in the format 'pieceCid,pieceSize,miner,tmin,tmax,expiration'",
465
+
Usage: "file containing piece information to create the allocation. Each line in the file should be in the format 'pieceCid,pieceSize,miner,tmin,tmax,expiration'",
461
466
Aliases: []string{"pf"},
462
467
},
463
468
&cli.IntFlag{
@@ -490,18 +495,18 @@ var allocateCmd = &cli.Command{
490
495
491
496
pieceFile:=cctx.String("piece-file")
492
497
miners:=cctx.StringSlice("miner")
493
-
pinfos:=cctx.StringSlice("piece-info")
498
+
pcids:=cctx.String("piece-cid")
494
499
495
-
ifpieceFile==""&&len(pinfos) <1 {
496
-
returnfmt.Errorf("must provide at least one --piece-info or use --piece-file")
500
+
ifpieceFile==""&&pcids=="" {
501
+
returnfmt.Errorf("must provide at least one --piece-cid or use --piece-file")
497
502
}
498
503
499
504
ifpieceFile==""&&len(miners) <1 {
500
505
returnfmt.Errorf("must provide at least one miner address or use --piece-file")
501
506
}
502
507
503
-
ifpieceFile!=""&&len(pinfos) >0 {
504
-
returnfmt.Errorf("cannot use both --piece-info and --piece-file flags at once")
508
+
ifpieceFile!=""&&pcids!="" {
509
+
returnfmt.Errorf("cannot use both --piece-cid and --piece-file flags at once")
505
510
}
506
511
507
512
varpieceInfos []PieceInfos
@@ -590,44 +595,30 @@ var allocateCmd = &cli.Command{
590
595
iferr!=nil {
591
596
returnfmt.Errorf("failed to convert miner address %w", err)
--piece-info value, --pi value [ --piece-info value, --pi value ] data piece-info[s] to create the allocation. The format must be --piece-info pieceCid1=pieceSize1 --piece-info pieceCid2=pieceSize2
644
+
--piece-cid value, --piece value data piece-cid to create the allocation
645
+
--piece-size value, --size value piece size to create the allocation (default: 0)
645
646
--wallet value the wallet address that will used create the allocation
646
647
--quiet do not print the allocation list (default: false)
647
648
--term-min value, --tmin value The minimum duration which the provider must commit to storing the piece to avoid early-termination penalties (epochs).
@@ -650,7 +651,7 @@ OPTIONS:
650
651
Default is 5 years. (default: 5256000)
651
652
--expiration value The latest epoch by which a provider must commit data before the allocation expires (epochs).
652
653
Default is 60 days. (default: 172800)
653
-
--piece-file value, --pf value file containing piece-info[s] to create the allocation. Each line in the file should be in the format 'pieceCid,pieceSize,miner,tmin,tmax,expiration'
654
+
--piece-file value, --pf value file containing piece information to create the allocation. Each line in the file should be in the format 'pieceCid,pieceSize,miner,tmin,tmax,expiration'
654
655
--batch-size value number of extend requests per batch. If set incorrectly, this will lead to out of gas error (default: 500)
655
656
--confidence value number of block confirmations to wait for (default: 5)
656
657
--assume-yes, -y, --yes automatic yes to prompts; assume 'yes' as answer to all prompts and run non-interactively (default: false)
Consequences: Sealing early can speed up the process, but it may result in inefficiencies if all deals are not batched correctly.
242
+
243
+
## Offline Verified DDO deals
244
+
Curio only supports offline verified DDO deals as of now. The allocation must be created by the client for the piece and handed over to the SP alongside the data.
245
+
246
+
247
+
### How to create allocation
248
+
Clients can create allocation using the `sptool toolbox` or other methods.
@@ -181,9 +181,9 @@ This will put `curio` in `/usr/local/bin`. `curio` will use the `$HOME/.curio` f
181
181
Run `curio --version`
182
182
183
183
```md
184
-
curio version 1.23.0+mainnet+git_ae625a5_2024-08-21T15:21:45+04:00
184
+
curio version 1.24.5-rc1+mainnet+git_214226e7_2025-02-19T17:02:54+04:00
185
185
# or
186
-
curio version 1.23.0+calibnet+git_ae625a5_2024-08-21T15:21:45+04:00
186
+
curio version 1.24.5-rc1+calibnet+git_214226e7_2025-02-19T17:02:54+04:00
187
187
```
188
188
189
189
1. You should now have Curio installed. You can now [finish setting up the Curio node](https://lotus.filecoin.io/storage-providers/curio/setup/).
@@ -291,9 +291,9 @@ The installation instructions are different depending on which CPU is in your Ma
291
291
6. Run `curio --version`
292
292
293
293
```md
294
-
curio version 1.23.0+mainnet+git_ae625a5_2024-08-21T15:21:45+04:00
294
+
curio version 1.24.5-rc1+mainnet+git_214226e7_2025-02-19T17:02:54+04:00
295
295
# or
296
-
curio version 1.23.0+calibnet+git_ae625a5_2024-08-21T15:21:45+04:00
296
+
curio version 1.24.5-rc1+calibnet+git_214226e7_2025-02-19T17:02:54+04:00
297
297
```
298
298
7. You should now have Curio installed. You can now [set up a new Curio cluster or migrating from Lotus-Miner](https://lotus.filecoin.io/storage-providers/curio/setup/).
return&validationError{reason: "deal rejected as cumulative size of deals in past 1 hour has reached the maximum allowed for the client, please retry in some time"}
returnfalse, xerrors.Errorf("wallet not found: %w", err)
930
+
}
931
+
932
+
varallowed sql.NullBool
933
+
err=m.db.QueryRow(ctx, `SELECT status FROM market_allow_list WHERE wallet = $1 OR wallet = $2`, deal.ClientDealProposal.Proposal.Client.String(), client.String()).Scan(&allowed)
909
934
iferr!=nil {
910
935
if!errors.Is(err, pgx.ErrNoRows) {
911
936
returnfalse, xerrors.Errorf("failed to query the allow list status from DB: %w", err)
0 commit comments