Skip to content

Commit

Permalink
Debug failing PoSts in staging
Browse files Browse the repository at this point in the history
  • Loading branch information
ZenGround0 committed Sep 16, 2019
1 parent 0f12cf6 commit a88558d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions actor/builtin/miner/miner.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"github.com/filecoin-project/go-sectorbuilder"
"github.com/ipfs/go-cid"
cbor "github.com/ipfs/go-ipld-cbor"
logging "github.com/ipfs/go-log"
"github.com/libp2p/go-libp2p-core/peer"
xerrors "github.com/pkg/errors"

Expand All @@ -19,6 +20,8 @@ import (
"github.com/filecoin-project/go-filecoin/vm/errors"
)

var log = logging.Logger("miner-actor")

func init() {
cbor.RegisterCborType(State{})
cbor.RegisterCborType(Ask{})
Expand Down Expand Up @@ -926,6 +929,7 @@ func (ma *Actor) SubmitPoSt(ctx exec.VMContext, poStProof types.PoStProof, fault
if err != nil {
return nil, errors.RevertErrorWrap(err, "failed to sample chain for challenge seed")
}
log.Infof("Verifying post for addr %s -- end: %s -- seed: %x \n", ctx.Message().To.String(), state.ProvingPeriodEnd.String(), seed)

var sectorInfos []go_sectorbuilder.SectorInfo
for _, id := range state.ProvingSet.Values() {
Expand Down
5 changes: 5 additions & 0 deletions protocol/storage/prover.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@ import (
"context"

"github.com/filecoin-project/go-sectorbuilder"
logging "github.com/ipfs/go-log"
"github.com/pkg/errors"

"github.com/filecoin-project/go-filecoin/actor/builtin/miner"
"github.com/filecoin-project/go-filecoin/address"
"github.com/filecoin-project/go-filecoin/types"
)

var logProver = logging.Logger("/fil/storage/prover")

const (
// Maximum number of rounds delay to allow for when submitting a PoSt for computing any
// fee necessary due to late submission. The miner expects the PoSt message to be mined
Expand Down Expand Up @@ -93,6 +96,8 @@ func (p *Prover) CalculatePoSt(ctx context.Context, start, end *types.BlockHeigh
}
sectorInfos[i] = info
}
logProver.Infof("Prover calculating post for addr %s -- start: %s -- end: %s -- seed: %x \n", p.actorAddress.String(), start.String(), end.String(), seed)

proof, err := p.calculator.CalculatePoSt(ctx, go_sectorbuilder.NewSortedSectorInfo(sectorInfos...), seed)
if err != nil {
return nil, errors.Wrap(err, "failed to calculate PoSt")
Expand Down

0 comments on commit a88558d

Please sign in to comment.