update ffi

This commit is contained in:
Łukasz Magiera 2021-05-18 12:46:13 +02:00
parent e56960f245
commit fe9311e435
4 changed files with 11 additions and 8 deletions

2
extern/filecoin-ffi vendored

@ -1 +1 @@
Subproject commit 525851103fcf548dff1d4db6b5a1a2a6d9e10833
Subproject commit 178ac15a537626cac07d8af68bffc603011c0310

View File

@ -513,8 +513,11 @@ func TestSealAndVerifyAggregate(t *testing.T) {
defer cleanup()
avi := proof5.AggregateSealVerifyProofAndInfos{
Miner: miner,
Infos: make([]proof5.AggregateSealVerifyInfo, numAgg),
Miner: miner,
SealProof: sealProofType,
AggregateProof: policy.GetDefaultAggregationProof(),
Proof: nil,
Infos: make([]proof5.AggregateSealVerifyInfo, numAgg),
}
toAggregate := make([][]byte, numAgg)
@ -539,12 +542,12 @@ func TestSealAndVerifyAggregate(t *testing.T) {
aggStart := time.Now()
avi.Proof, err = ProofVerifier.AggregateSealProofs(sealProofType, policy.GetDefaultAggregationProof(), toAggregate)
avi.Proof, err = ProofVerifier.AggregateSealProofs(avi, toAggregate)
require.NoError(t, err)
aggDone := time.Now()
_, err = ProofVerifier.AggregateSealProofs(sealProofType, policy.GetDefaultAggregationProof(), toAggregate)
_, err = ProofVerifier.AggregateSealProofs(avi, toAggregate)
require.NoError(t, err)
aggHot := time.Now()

View File

@ -42,7 +42,7 @@ type Verifier interface {
GenerateWinningPoStSectorChallenge(context.Context, abi.RegisteredPoStProof, abi.ActorID, abi.PoStRandomness, uint64) ([]uint64, error)
// cheap, makes no sense to put this on the storage interface
AggregateSealProofs(proofType abi.RegisteredSealProof, rap abi.RegisteredAggregationProof, proofs [][]byte) ([]byte, error)
AggregateSealProofs(aggregateInfo proof5.AggregateSealVerifyProofAndInfos, proofs [][]byte) ([]byte, error)
}
type SectorProvider interface {

View File

@ -140,6 +140,6 @@ func (proofVerifier) GenerateWinningPoStSectorChallenge(ctx context.Context, pro
return ffi.GenerateWinningPoStSectorChallenge(proofType, minerID, randomness, eligibleSectorCount)
}
func (v proofVerifier) AggregateSealProofs(proofType abi.RegisteredSealProof, rap abi.RegisteredAggregationProof, proofs [][]byte) ([]byte, error) {
return ffi.AggregateSealProofs(proofType, rap, proofs)
func (v proofVerifier) AggregateSealProofs(aggregateInfo proof5.AggregateSealVerifyProofAndInfos, proofs [][]byte) ([]byte, error) {
return ffi.AggregateSealProofs(aggregateInfo, proofs)
}