@@ -12,21 +12,22 @@ import (
1212 "os"
1313 "runtime"
1414
15+ "github.com/filecoin-project/go-state-types/proof"
16+
1517 "github.com/ipfs/go-cid"
1618 "github.com/pkg/errors"
1719 "golang.org/x/xerrors"
1820
1921 "github.com/filecoin-project/go-address"
2022 commcid "github.com/filecoin-project/go-fil-commcid"
2123 "github.com/filecoin-project/go-state-types/abi"
22- proof5 "github.com/filecoin-project/specs-actors/v5/actors/runtime/proof"
2324
2425 "github.com/filecoin-project/filecoin-ffi/cgo"
2526)
2627
2728// VerifySeal returns true if the sealing operation from which its inputs were
2829// derived was valid, and false if not.
29- func VerifySeal (info proof5 .SealVerifyInfo ) (bool , error ) {
30+ func VerifySeal (info proof .SealVerifyInfo ) (bool , error ) {
3031 sp , err := toFilRegisteredSealProof (info .SealProof )
3132 if err != nil {
3233 return false , err
@@ -53,7 +54,7 @@ func VerifySeal(info proof5.SealVerifyInfo) (bool, error) {
5354 return cgo .VerifySeal (sp , & commR , & commD , & proverID , & randomness , & interactiveRandomness , uint64 (info .SectorID .Number ), cgo .AsSliceRefUint8 (info .Proof ))
5455}
5556
56- func VerifyAggregateSeals (aggregate proof5 .AggregateSealVerifyProofAndInfos ) (bool , error ) {
57+ func VerifyAggregateSeals (aggregate proof .AggregateSealVerifyProofAndInfos ) (bool , error ) {
5758 if len (aggregate .Infos ) == 0 {
5859 return false , xerrors .New ("no seal verify infos" )
5960 }
@@ -102,7 +103,7 @@ func VerifyAggregateSeals(aggregate proof5.AggregateSealVerifyProofAndInfos) (bo
102103
103104// VerifyWinningPoSt returns true if the Winning PoSt-generation operation from which its
104105// inputs were derived was valid, and false if not.
105- func VerifyWinningPoSt (info proof5 .WinningPoStVerifyInfo ) (bool , error ) {
106+ func VerifyWinningPoSt (info proof .WinningPoStVerifyInfo ) (bool , error ) {
106107 filPublicReplicaInfos , err := toFilPublicReplicaInfos (info .ChallengedSectors , "winning" )
107108 if err != nil {
108109 return false , errors .Wrap (err , "failed to create public replica info array for FFI" )
@@ -129,7 +130,7 @@ func VerifyWinningPoSt(info proof5.WinningPoStVerifyInfo) (bool, error) {
129130
130131// VerifyWindowPoSt returns true if the Winning PoSt-generation operation from which its
131132// inputs were derived was valid, and false if not.
132- func VerifyWindowPoSt (info proof5 .WindowPoStVerifyInfo ) (bool , error ) {
133+ func VerifyWindowPoSt (info proof .WindowPoStVerifyInfo ) (bool , error ) {
133134 filPublicReplicaInfos , err := toFilPublicReplicaInfos (info .ChallengedSectors , "window" )
134135 if err != nil {
135136 return false , errors .Wrap (err , "failed to create public replica info array for FFI" )
@@ -409,7 +410,7 @@ func SealCommitPhase2(
409410}
410411
411412// TODO AggregateSealProofs it only needs InteractiveRandomness out of the aggregateInfo.Infos
412- func AggregateSealProofs (aggregateInfo proof5 .AggregateSealVerifyProofAndInfos , proofs [][]byte ) (out []byte , err error ) {
413+ func AggregateSealProofs (aggregateInfo proof .AggregateSealVerifyProofAndInfos , proofs [][]byte ) (out []byte , err error ) {
413414 sp , err := toFilRegisteredSealProof (aggregateInfo .SealProof )
414415 if err != nil {
415416 return nil , err
@@ -539,7 +540,7 @@ func GenerateWinningPoSt(
539540 minerID abi.ActorID ,
540541 privateSectorInfo SortedPrivateSectorInfo ,
541542 randomness abi.PoStRandomness ,
542- ) ([]proof5 .PoStProof , error ) {
543+ ) ([]proof .PoStProof , error ) {
543544 filReplicas , cleanup , err := toFilPrivateReplicaInfos (privateSectorInfo .Values (), "winning" )
544545 if err != nil {
545546 return nil , errors .Wrap (err , "failed to create private replica info array for FFI" )
@@ -569,7 +570,7 @@ func GenerateWindowPoSt(
569570 minerID abi.ActorID ,
570571 privateSectorInfo SortedPrivateSectorInfo ,
571572 randomness abi.PoStRandomness ,
572- ) ([]proof5 .PoStProof , []abi.SectorNumber , error ) {
573+ ) ([]proof .PoStProof , []abi.SectorNumber , error ) {
573574 filReplicas , cleanup , err := toFilPrivateReplicaInfos (privateSectorInfo .Values (), "window" )
574575 if err != nil {
575576 return nil , nil , errors .Wrap (err , "failed to create private replica info array for FFI" )
@@ -689,7 +690,7 @@ func toFilPublicPieceInfos(src []abi.PieceInfo) ([]cgo.PublicPieceInfo, error) {
689690 return out , nil
690691}
691692
692- func toFilPublicReplicaInfos (src []proof5 .SectorInfo , typ string ) ([]cgo.PublicReplicaInfo , error ) {
693+ func toFilPublicReplicaInfos (src []proof .SectorInfo , typ string ) ([]cgo.PublicReplicaInfo , error ) {
693694 out := make ([]cgo.PublicReplicaInfo , len (src ))
694695
695696 for idx := range out {
@@ -794,16 +795,16 @@ func fromFilPoStFaultySectors(ptr []uint64) []abi.SectorNumber {
794795 return snums
795796}
796797
797- func fromFilPoStProofs (src []cgo.PoStProofGo ) ([]proof5 .PoStProof , error ) {
798- out := make ([]proof5 .PoStProof , len (src ))
798+ func fromFilPoStProofs (src []cgo.PoStProofGo ) ([]proof .PoStProof , error ) {
799+ out := make ([]proof .PoStProof , len (src ))
799800
800801 for idx := range out {
801802 pp , err := fromFilRegisteredPoStProof (src [idx ].RegisteredProof )
802803 if err != nil {
803804 return nil , err
804805 }
805806
806- out [idx ] = proof5 .PoStProof {
807+ out [idx ] = proof .PoStProof {
807808 PoStProof : pp ,
808809 ProofBytes : src [idx ].Proof ,
809810 }
@@ -812,7 +813,7 @@ func fromFilPoStProofs(src []cgo.PoStProofGo) ([]proof5.PoStProof, error) {
812813 return out , nil
813814}
814815
815- func toFilPoStProofs (src []proof5 .PoStProof ) ([]cgo.PoStProof , error ) {
816+ func toFilPoStProofs (src []proof .PoStProof ) ([]cgo.PoStProof , error ) {
816817 out := make ([]cgo.PoStProof , len (src ))
817818 for idx := range out {
818819 pp , err := toFilRegisteredPoStProof (src [idx ].PoStProof )
0 commit comments