Merge pull request #6322 from filecoin-project/feat/dispute-log
feat: log dispute rate
This commit is contained in:
commit
10927daa53
@ -238,6 +238,9 @@ var disputerStartCmd = &cli.Command{
|
|||||||
|
|
||||||
dpmsgs := make([]*types.Message, 0)
|
dpmsgs := make([]*types.Message, 0)
|
||||||
|
|
||||||
|
startTime := time.Now()
|
||||||
|
proofsChecked := uint64(0)
|
||||||
|
|
||||||
// TODO: Parallelizeable
|
// TODO: Parallelizeable
|
||||||
for _, dl := range dls {
|
for _, dl := range dls {
|
||||||
fullDeadlines, err := api.StateMinerDeadlines(ctx, dl.miner, tsk)
|
fullDeadlines, err := api.StateMinerDeadlines(ctx, dl.miner, tsk)
|
||||||
@ -249,7 +252,10 @@ var disputerStartCmd = &cli.Command{
|
|||||||
return xerrors.Errorf("deadline index %d not found in deadlines", dl.index)
|
return xerrors.Errorf("deadline index %d not found in deadlines", dl.index)
|
||||||
}
|
}
|
||||||
|
|
||||||
ms, err := makeDisputeWindowedPosts(ctx, api, dl, fullDeadlines[dl.index].DisputableProofCount, fromAddr)
|
disputableProofs := fullDeadlines[dl.index].DisputableProofCount
|
||||||
|
proofsChecked += disputableProofs
|
||||||
|
|
||||||
|
ms, err := makeDisputeWindowedPosts(ctx, api, dl, disputableProofs, fromAddr)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return xerrors.Errorf("failed to check for disputes: %w", err)
|
return xerrors.Errorf("failed to check for disputes: %w", err)
|
||||||
}
|
}
|
||||||
@ -264,6 +270,8 @@ var disputerStartCmd = &cli.Command{
|
|||||||
deadlineMap[dClose+Confidence] = append(deadlineMap[dClose+Confidence], *dl)
|
deadlineMap[dClose+Confidence] = append(deadlineMap[dClose+Confidence], *dl)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
disputeLog.Infow("checked proofs", "count", proofsChecked, "duration", time.Since(startTime))
|
||||||
|
|
||||||
// TODO: Parallelizeable / can be integrated into the previous deadline-iterating for loop
|
// TODO: Parallelizeable / can be integrated into the previous deadline-iterating for loop
|
||||||
for _, dpmsg := range dpmsgs {
|
for _, dpmsg := range dpmsgs {
|
||||||
disputeLog.Infow("disputing a PoSt", "miner", dpmsg.To)
|
disputeLog.Infow("disputing a PoSt", "miner", dpmsg.To)
|
||||||
|
Loading…
Reference in New Issue
Block a user