[Tutorial] CC Sector Upgrade with Online Deals #5987
Locked
William8Work
started this conversation in
Tutorials
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi All - I have tried several cc sectors upgraded with online deals and it works fine. To share out the details, here are the steps if you are interested to use. All comments or corrections are welcome:
1. Miner: Select an existing CC sector and mark it as upgrade:
Miner can mark any number of sectors as Upgrade. The following example upgrades a sector 48:
$lotus-miner sectors mark-for-upgrade 48
With lotus-miner sectors list command, this sector will change from:
48 Proving YES YES 1585164 (in 46 weeks 3 days) CC
To:
48 Proving YES YES 1585164 (in 46 weeks 3 days) CC(upgrade)
2. Client: process the data file in order to generate the .car file
Generate .car file on the client side (eniac.png is a sample file in this case):
$lotus client generate-car /media/lotus/deals/client/eniac.png /media/lotus/deals/client/data-20210406001.car
3. Client: import your car file locally to get dataCID
Import the .car file from client side if you plan to conduct an online storage deal:
$lotus client import --car data-20210406001.car
Import 13, Root bafykbzacedd2wmtoetgzw5nhosvsxkg5uzl6tstn2tn5gqanpmjmud5m6s2eu
Take notes on this dataCID. You need it for a storage deal proposal as well as later deal retrieval. Refer here for additional information: https://docs.filecoin.io/store/lotus/store-data/#importing-data
4. Client: Check the specific miner with deals ask
Verify your target miner (or contact them directly) has agreeable terms with pricing, deal size, fast retrieval (true or false), and duration. Run this (f08399 is the sample miner in this case):
$lotus client query-ask f08399
5. Client: Propose a online deal with the specific miner
Propose an online storage deals with the miner:
$lotus client deal --from f13os6jdbaxrsra3m4jmbwln6gllvpiv3bflxgegq --fast-retrieval=false --verified-deal=true bafykbzacedd2wmtoetgzw5nhosvsxkg5uzl6tstn2tn5gqanpmjmud5m6s2eu f08399 0 518400
Return (dealCID):
bafyreie2zolazcxmoyxqj2usqzl2mfc6e5ahf72yvjykmderfvlgu5xyme
Notes:
6. Miner: Check that the storage deals have been proposed, accepted:
A new sector will be created by the miner to seal and store with this deal. As this new sector is sealing along, miner can monitor the sector status updates through miner log or through storage-deals status:
$lotus-miner storage-deals list -v | grep bafykbzacedd2wmtoetgzw5nhosvsxkg5uzl6tstn2tn5gqanpmjmud5m6s2eu
Apr 4 21:46:36 true bafyreie2zolazcxmoyxqj2usqzl2mfc6e5ahf72yvjykmderfvlgu5xyme 1668252 StorageDealAwaitingPreCommit f13os6jdbaxrsra3m4jmbwln6gllvpiv3bflxgegq 8MiB 0 FIL 521511 12D3KooWLGBNXDSF1B1VxG18HVHaaJfBS1p95QitTYoH5dsDcpGF-12D3KooWGabRFTsGhQLP5sb5f6eSUDbhyDqiF3fK9mZQWxJK5xJG-0
7. Miner: Sector Sealing lifecycle
This new sector will go through normal sealing lifecycle from PC1, PC2, C1, C2 to proving. Once it gets to Proving, you should be able to see this:
4777 Proving YES NO 1585164 (in 46 weeks 4 days) 1 4.433MiB 39.9MiB
Notes:
8. Miner: Original Sector Collateral Status
Upon successful PC2 completion for the new sector, the collateral from original sector (mark-for-upgrade) will get moved into this new sector. Based on the deal collateral requirement, the miner may transfer additional funds into this new sector as its collateral. Once that’s PreCommit is published to chain, the original sector status will change:
48 Proving YES YES 646344 (in 4 hours 33 minutes) CC
Notes: the Expiration of the original sector has been changed to your next window post deadline, and the “Upgrade” status has been removed. It indicates that once the window post is successful, this original sector will be set to no active.
9. Miner: Window Post Deadline
Upon window post deadline, this new sector will be validated and marked Active:
4777 Proving YES YES 1585164 (in 46 weeks 4 days) 1 4.433MiB 39.9MiB
10. Miner: after successful window post deadline
The next window post after the sector upgrade will reset ACTIVE status to NO for this sector:
48 Proving YES NO 1585164 (in 46 weeks 3 days) CC
This sector is now no longer active and can be removed without any collateral penalty.
11. Client: run the get-deal to check the deal status
On the client side, you can run the get-deal to check the status. Once the deal is on chain, you can perform deal retrieval action:
Get deal status:
$lotus client list-deals
Run retrieval deals:
$lotus client retrieve --miner <miner ID> <Data CID> <outfile>
Beta Was this translation helpful? Give feedback.
All reactions