Verifying Storage on Filecoin | Lesson 6 of 6

Verifying your deal

Once compressed, the key data needed to verify storage is stored on the Filecoin chain, a copy of which is maintained by each user running a node. This allows for Proof of Spacetime to run regularly over time.

As a storage client, you can run the lotus client list-deals command to list all of the storage deals proposed from that node. For example, here are the results from a node from which only one deal has been proposed:

$ lotus client list-deals

DealCid:    bafyreiefvrrv5j7omqzfersogg4nqzctyzj66rcmkwkbxxx5prvd5sklci
DealId:     2
Provider:   t01000
State:      StorageDealActive
On Chain?:  Y (epoch 59)
Slashed?:   N
PieceCID:   bafk4chzazx6u4luj34azuit37rlylgrcbgkaakqsjt5avsbolxale2igii3q
Size:       1016
Price:      1000000
Duration:   2744

Let's explore the data made available by this command:

  • DealCid: Content identifier (CID) for the deal proposal.
  • DealId: A unique ID for the deal.
  • Provider: A unique identifier for the storage provider with whom the deal was made, also known as a storage miner.
  • State: The state of the deal. This will most often be StorageDealActive once the data is stored and sealed. (Note that currently this will stay as StorageDealActive even after the duration of the deal expires or the miner fails a Proof of Spacetime, so it's important to refer to the slashed field for the latter case.)
  • On Chain?: A boolean indicating whether the deal has been stored on the chain. If positive, this field will also indicate the epoch in which the data was stored. An epoch is a specific point on the chain. Lower numbers are further back in the history of the chain, while higher numbers are more recent.
  • Slashed?: A boolean indicating whether the storage provider has failed a Proof of Spacetime. (If the miner stops storing your data, this value will change to Y and the miner will be penalized.)
  • PieceCID: A CID (Content Identifier) representing the stored data, also known as CommP (Piece Commitment)
  • Size: The bytes of data being stored.
  • Price: The price per epoch in Filecoin Token (FIL) for the storage deal.
  • Duration: The total duration of the agreed deal in epochs (one iteration of the blockchain, currently equivalent to 30 seconds.

Compare these deals

For the quiz below, consider the following three deals:

$ lotus client list-deals

DealCid:    bafyreiefvrrv5j7omqzfersogg4nqzctyzj55rcmkwkbxxx6prvd5sklci
DealId:     32
Provider:   t01000
State:      StorageDealActive
On Chain?:  Y (epoch 59)
Slashed?:   N
PieceCID:   bafk4chzazx6u4luj34azuit37rlylgrcbgkaakqsjt5avsbolxale2igii3q
Size:       1016
Price:      1000000
Duration:   2744

DealCid:    bafyreiefvrrv5j7omqzfersogg4nqzctyzj44rcmkwkbxxx5prvd5sklci
DealId:     45
Provider:   t01000
State:      StorageDealActive
On Chain?:  Y (epoch 22)
Slashed?:   Y
PieceCID:   bafk4chzazx6u4luj34azuit37rlylgrcbgkaakqsjt5avsbolxale2igii3q
Size:       1016
Price:      1000000
Duration:   2744

DealCid:    bafyreiefvrrv5j7omqzfersogg4nqzctyzj33rcmkwkbxxx4prvd5sklci
DealId:     57
Provider:   t01000
State:      StorageDealActive
On Chain?:  Y (epoch 38)
Slashed?:   N
PieceCID:   bafk4chzazx6u4luj34azuit37rlylgrcbgkaakqsjt5avsbolxale2igii3q
Size:       1016
Price:      1000000
Duration:   2744

Take the quiz!

Of the three storage deals listed above, which is the oldest deal that is still active (meaning the miner is still storing the data as promised)?

Oops, you haven't selected the right answer yet!