filecoin-project / specs

The Filecoin protocol specification
https://spec.filecoin.io
Other
367 stars 170 forks source link

What is a FaultSet, why does a submitPoSt message allow for multiple FaultSet, and how do they "stack"? #119

Open laser opened 5 years ago

laser commented 5 years ago

The submitPoSt message includes a parameter faults of type []FaultSet.

The GeneratePost operation can return a slice of faults.

Couple of questions:

  1. What is a FaultSet? Is it just a set of the faulty sector ids returned from an invocation of GeneratePost?
  2. The type of faults is []FaultSet. Under what circumstances would someone send a submitPoSt message containing more than one FaultSet?
  3. The spec says that the miner actor needs to "ensure the fault sets properly stack." What does this mean?
laser commented 5 years ago

cc @ZenGround0 @whyrusleeping

whyrusleeping commented 5 years ago

A faultset is a bitfield and a timestamp. If a miner does not have some of their data when they need to prove it for their post, they mark it in the faultset as missing, and denote the timestamp (blockheight, or challenge index, not 100% sure yet) that the failed challenge occurred at. Miners must pay a fee for every failed sector. If the failure was only temporary (say they had to replace a disk or something) the miner can also mark the sectors in the 'recovered' set so that they don't get removed from the proving set.

Ensuring the fault sets properly stack means that no fault set overlaps with any other fault set.

The reason you need several fault sets and not just one, is because in order to properly validate the PoSt, you need to know when the failed challenges happened.

pooja commented 5 years ago

Needs documentation in the spec

whyrusleeping commented 5 years ago

further work here relies on the completion of #133

pooja commented 5 years ago

Moving forward with usage of rle+. Just needs to be written into the spec. @dignifiedquire Could you help with the spec'ing part?

anorth commented 5 years ago

Separate to the bitfield representation, the spec needs content similar to @whyrusleeping's comment above. This was also quite opaque to me.

Go-filecoin needs this to be specified so that the implementation can compute the appropriate fee to attach for temporary sector failures.