##流程图
/* * Empty <- incoming deals | | | v *<- WaitDeals <- incoming deals | | | v *<- Packing <- incoming committed capacity | | | v | GetTicket | | ^ | v | *<- PreCommit1 <--> SealPreCommit1Failed | | ^ ^^ | | *----------++----\ | v v || | *<- PreCommit2 --------++--> SealPreCommit2Failed | | || | v /-------/| * PreCommitting <-----+---> PreCommitFailed | | | ^ | v | | *<- WaitSeed -----------+-----/ | ||| ^ | | ||| \--------*-----/ | ||| | | vvv v----+----> ComputeProofFailed *<- Committing | | | ^--> CommitFailed | v ^ | SubmitCommit | | | | | v | *<- CommitWait ---/ | | | v | FinalizeSector <--> FinalizeFailed | | | v *<- Proving | v FailedUnrecoverable UndefinedSectorState <- ¯\_(ツ)_/¯ | ^ *---------------------/ */##意义
Empty SectorState = "Empty" WaitDeals SectorState = "WaitDeals" // waiting for more pieces (deals) to be added to the sector Packing SectorState = "Packing" // sector not in sealStore, and not on chain GetTicket SectorState = "GetTicket" // generate ticket PreCommit1 SectorState = "PreCommit1" // do PreCommit1 PreCommit2 SectorState = "PreCommit2" // do PreCommit2 PreCommitting SectorState = "PreCommitting" // on chain pre-commit PreCommitWait SectorState = "PreCommitWait" // waiting for precommit to land on chain WaitSeed SectorState = "WaitSeed" // waiting for seed Committing SectorState = "Committing" // compute PoRep SubmitCommit SectorState = "SubmitCommit" // send commit message to the chain CommitWait SectorState = "CommitWait" // wait for the commit message to land on chain FinalizeSector SectorState = "FinalizeSector" Proving SectorState = "Proving"
Empty - 空状态
Packing - 打包状态,多个Piece填充到一个Sector中
PreCommit1 - PreCommit1计算
PreCommit2 - PreCommit2计算
PreCommitting - 提交Precommit2的结果到链上
WaitSeed - 等待随机种子(给定10个区块的时间,让随机数种子不可提前预测)
Committing - 计算Commit1/Commit2,并将证明提交到链上
CommitWait - 等待链上确认
FinalizeSector - Sector状态确定