Fix aggregation inputs

This commit is contained in:
Łukasz Magiera 2021-05-18 20:34:23 +02:00
parent 0419c64a06
commit dd393b470f
4 changed files with 10 additions and 6 deletions

View File

@ -181,7 +181,6 @@ func (b *CommitBatcher) processBatch(notif, after bool) (*cid.Cid, error) {
return nil, nil return nil, nil
} }
spt := b.todo[0].spt
proofs := make([][]byte, 0, total) proofs := make([][]byte, 0, total)
infos := make([]proof5.AggregateSealVerifyInfo, 0, total) infos := make([]proof5.AggregateSealVerifyInfo, 0, total)
@ -198,9 +197,14 @@ func (b *CommitBatcher) processBatch(notif, after bool) (*cid.Cid, error) {
proofs = append(proofs, b.todo[info.Number].proof) proofs = append(proofs, b.todo[info.Number].proof)
} }
mid, err := address.IDFromAddress(b.maddr)
if err != nil {
return nil, xerrors.Errorf("getting miner id: %w", err)
}
params.AggregateProof, err = b.verif.AggregateSealProofs(proof5.AggregateSealVerifyProofAndInfos{ params.AggregateProof, err = b.verif.AggregateSealProofs(proof5.AggregateSealVerifyProofAndInfos{
Miner: 0, Miner: abi.ActorID(mid),
SealProof: spt, SealProof: b.todo[infos[0].Number].spt,
AggregateProof: arp, AggregateProof: arp,
Infos: infos, Infos: infos,
}, proofs) }, proofs)

View File

@ -3,7 +3,6 @@ package sealing
import ( import (
"bytes" "bytes"
"context" "context"
"github.com/ipfs/go-cid" "github.com/ipfs/go-cid"
"golang.org/x/xerrors" "golang.org/x/xerrors"
@ -590,6 +589,7 @@ func (m *Sealing) handleSubmitCommitAggregate(ctx statemachine.Context, sector S
UnsealedCID: *sector.CommD, UnsealedCID: *sector.CommD,
}, },
proof: sector.Proof, // todo: this correct?? proof: sector.Proof, // todo: this correct??
spt: sector.SectorType,
}) })
if err != nil { if err != nil {
return ctx.Send(SectorCommitFailed{xerrors.Errorf("queuing commit for aggregation failed: %w", err)}) return ctx.Send(SectorCommitFailed{xerrors.Errorf("queuing commit for aggregation failed: %w", err)})