mostly wire up WindowedPoSt

This commit is contained in:
Łukasz Magiera
2020-04-10 23:07:18 +02:00
parent 1c75bf30ac
commit 613e61222b
17 changed files with 76 additions and 135 deletions
+10 -9
View File
@@ -174,7 +174,7 @@ var sealBenchCmd = &cli.Command{
}
sectorSize := abi.SectorSize(sectorSizeInt)
_, spt, err := ffiwrapper.ProofTypeFromSectorSize(sectorSize)
_, spt, err := ffiwrapper.SealProofTypeFromSectorSize(sectorSize)
if err != nil {
return err
}
@@ -401,7 +401,8 @@ var sealBenchCmd = &cli.Command{
candidates := make([]abi.SectorInfo, len(fcandidates))
for i, fcandidate := range fcandidates {
candidates[i] = sealedSectors[i]; _ = fcandidate // todo: I have no idea what is under fcandidate, but it's a large number
candidates[i] = sealedSectors[i]
_ = fcandidate // todo: I have no idea what is under fcandidate, but it's a large number
}
gencandidates := time.Now()
@@ -423,10 +424,10 @@ var sealBenchCmd = &cli.Command{
epost2 := time.Now()
pvi1 := abi.WinningPoStVerifyInfo{
Randomness: abi.PoStRandomness(challenge[:]),
Proofs: proof1,
Randomness: abi.PoStRandomness(challenge[:]),
Proofs: proof1,
ChallengedSectors: candidates,
Prover: mid,
Prover: mid,
}
ok, err := ffiwrapper.ProofVerifier.VerifyWinningPoSt(context.TODO(), pvi1)
if err != nil {
@@ -439,10 +440,10 @@ var sealBenchCmd = &cli.Command{
verifypost1 := time.Now()
pvi2 := abi.WinningPoStVerifyInfo{
Randomness: abi.PoStRandomness(challenge[:]),
Proofs: proof2,
Randomness: abi.PoStRandomness(challenge[:]),
Proofs: proof2,
ChallengedSectors: candidates,
Prover: mid,
Prover: mid,
}
ok, err = ffiwrapper.ProofVerifier.VerifyWinningPoSt(context.TODO(), pvi2)
@@ -534,7 +535,7 @@ var proveCmd = &cli.Command{
return err
}
_, spt, err := ffiwrapper.ProofTypeFromSectorSize(abi.SectorSize(c2in.SectorSize))
_, spt, err := ffiwrapper.SealProofTypeFromSectorSize(abi.SectorSize(c2in.SectorSize))
if err != nil {
return err
}
+1 -1
View File
@@ -242,7 +242,7 @@ var runCmd = &cli.Command{
}
// Setup remote sector store
_, spt, err := ffiwrapper.ProofTypeFromSectorSize(ssize)
_, spt, err := ffiwrapper.SealProofTypeFromSectorSize(ssize)
if err != nil {
return xerrors.Errorf("getting proof type: %w", err)
}
+1 -1
View File
@@ -120,7 +120,7 @@ var preSealCmd = &cli.Command{
}
sectorSize := abi.SectorSize(sectorSizeInt)
rp, _, err := ffiwrapper.ProofTypeFromSectorSize(sectorSize)
rp, _, err := ffiwrapper.SealProofTypeFromSectorSize(sectorSize)
if err != nil {
return err
}
+1 -1
View File
@@ -413,7 +413,7 @@ func storageMinerInit(ctx context.Context, cctx *cli.Context, api lapi.FullNode,
return err
}
ppt, spt, err := ffiwrapper.ProofTypeFromSectorSize(ssize)
ppt, spt, err := ffiwrapper.SealProofTypeFromSectorSize(ssize)
if err != nil {
return err
}