Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into next
Browse files Browse the repository at this point in the history
  • Loading branch information
magik6k committed Mar 10, 2021
2 parents 504affd + 4abb333 commit 6315523
Show file tree
Hide file tree
Showing 11 changed files with 225 additions and 45 deletions.
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: Bug Report
about: Create a report to help us improve
title: "[BUG] "
labels: hint/needs-triaging, kind/bug
assignees: ''

---

> Note: For security-related bugs/issues, please follow the [security policy](https://github.com/filecoin-project/lotus/security/policy).
**Describe the bug**
A clear and concise description of what the bug is.
(If you are not sure what the bug is, try to figure it out via a [discussion](https://github.com/filecoin-project/lotus/discussions/new) first!

**Version (run `lotus version`):**

**To Reproduce**
Steps to reproduce the behavior:
1. Run '...'
2. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Logs**
Provide daemon/miner/worker logs, and goroutines(if available) for troubleshooting.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Additional context**
Add any other context about the problem here.
27 changes: 0 additions & 27 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

49 changes: 49 additions & 0 deletions .github/ISSUE_TEMPLATE/deal-making-issues.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
name: Deal Making Issues
about: Create a report for help with deal making failures.
title: "[Deal Making Issue]"
labels: hint/needs-triaging, area/markets
assignees: ''

---

> Note: For security-related bugs/issues, please follow the [security policy](https://github.com/filecoin-project/lotus/security/policy).
Please provide all the information requested here to help us troubleshoot "deal making failed" issues.
If the information requested is missing, we will probably have to just ask you to provide it anyway,
before we can help debug.

**Basic Information**
Including information like, Are you the client or the miner? Is this a storage deal or a retrieval deal? Is it an offline deal?

**Describe the problem**

A brief description of the problem you encountered while trying to make a deal.

**Version**

The output of `lotus --version`.

**Setup**

You miner(if applicable) and daemon setup, i.e: What hardware do you use, how much ram and etc.

**To Reproduce**
Steps to reproduce the behavior:
1. Run '...'
2. See error

**Deal status**

The output of `lotus client list-deals -v` and/or `lotus-miner storage-deals|retrieval-deals|data-transfers list [-v]` commands for the deal(s) in question.

**Lotus daemon and miner logs**

Please go through the logs of your daemon and miner(if applicable), and include screenshots of any error/warning-like messages you find.

Alternatively please upload full log files and share a link here

** Code modifications **

If you have modified parts of lotus, please describe which areas were modified,
and the scope of those modifications
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: "[Feature Request]"
labels: hint/needs-triaging
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
35 changes: 35 additions & 0 deletions .github/ISSUE_TEMPLATE/mining-issues.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: Mining Issues
about: Create a report for help with mining failures.
title: "[Mining Issue]"
labels: hint/needs-triaging, area/mining
assignees: ''

---

> Note: For security-related bugs/issues, please follow the [security policy](https://github.com/filecoin-project/lotus/security/policy).
Please provide all the information requested here to help us troubleshoot "mining/WinningPoSt failed" issues.
If the information requested is missing, you may be asked you to provide it.

**Describe the problem**
A brief description of the problem you encountered while mining new blocks.

**Version**

The output of `lotus --version`.

**Setup**

You miner and daemon setup, including what hardware do you use, your environment variable settings, how do you run your miner and worker, do you use GPU and etc.

**Lotus daemon and miner logs**

Please go through the logs of your daemon and miner, and include screenshots of any error/warning-like messages you find, highlighting the one has "winning post" in it.

Alternatively please upload full log files and share a link here

** Code modifications **

If you have modified parts of lotus, please describe which areas were modified,
and the scope of those modifications
46 changes: 46 additions & 0 deletions .github/ISSUE_TEMPLATE/proving-issues.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
name: Proving Issues
about: Create a report for help with proving failures.
title: "[Proving Issue]"
labels: area/proving, hint/needs-triaging
assignees: ''

---

> Note: For security-related bugs/issues, please follow the [security policy](https://github.com/filecoin-project/lotus/security/policy).
Please provide all the information requested here to help us troubleshoot "proving/window PoSt failed" issues.
If the information requested is missing, we will probably have to just ask you to provide it anyway,
before we can help debug.

**Describe the problem**
A brief description of the problem you encountered while proving the storage.

**Version**

The output of `lotus --version`.

**Setup**

You miner and daemon setup, including what hardware do you use, your environment variable settings, how do you run your miner and worker, do you use GPU and etc.

**Proving status**

The output of `lotus-miner proving` info.

**Lotus miner logs**

Please go through the logs of your miner, and include screenshots of any error-like messages you find, highlighting the one has "window post" in it.

Alternatively please upload full log files and share a link here

**Lotus miner diagnostic info**

Please collect the following diagnostic information, and share a link here

* lotus-miner diagnostic info `lotus-miner info all > allinfo.txt`

** Code modifications **

If you have modified parts of lotus, please describe which areas were modified,
and the scope of those modifications
Original file line number Diff line number Diff line change
@@ -1,21 +1,32 @@
---
name: Sealing Issues
about: Create a report for help with sealing (commit) failures.
title: ''
labels: 'sealing'
title: "[Sealing Issue]"
labels: hint/needs-triaging, area/sealing
assignees: ''

---

> Note: For security-related bugs/issues, please follow the [security policy](https://github.com/filecoin-project/lotus/security/policy).
Please provide all the information requested here to help us troubleshoot "commit failed" issues.
If the information requested is missing, we will probably have to just ask you to provide it anyway,
before we can help debug.

**Describe the problem**
A brief description of the problem you encountered while sealing a sector.

**Version**

The output of `lotus --version`.

**Setup**

A brief description of the problem you encountered while proving (sealing) a sector.
You miner and daemon setup, including what hardware do you use, your environment variable settings, how do you run your miner and worker, do you use GPU and etc.

Including what commands you ran, and a description of your setup, is very helpful.
**Commands**

Commands you ran.

**Sectors status**

Expand All @@ -37,7 +48,3 @@ Please collect the following diagnostic information, and share a link here

If you have modified parts of lotus, please describe which areas were modified,
and the scope of those modifications

**Version**

The output of `lotus --version`.
7 changes: 5 additions & 2 deletions storage/wdpost_changehandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ import (
"github.com/filecoin-project/lotus/chain/types"
)

const SubmitConfidence = 4
const (
SubmitConfidence = 4
ChallengeConfidence = 10
)

type CompleteGeneratePoSTCb func(posts []miner.SubmitWindowedPoStParams, err error)
type CompleteSubmitPoSTCb func(err error)
Expand Down Expand Up @@ -230,7 +233,7 @@ func (p *proveHandler) processHeadChange(ctx context.Context, newTS *types.TipSe
}

// Check if the chain is above the Challenge height for the post window
if newTS.Height() < di.Challenge {
if newTS.Height() < di.Challenge+ChallengeConfidence {
return
}

Expand Down
12 changes: 6 additions & 6 deletions storage/wdpost_changehandler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ func TestChangeHandlerStartProvingNextDeadline(t *testing.T) {

// Trigger a head change
currentEpoch := abi.ChainEpoch(1)
go triggerHeadAdvance(t, s, currentEpoch)
go triggerHeadAdvance(t, s, currentEpoch+ChallengeConfidence)

// Should start proving
<-s.ch.proveHdlr.processedHeadChanges
Expand All @@ -405,7 +405,7 @@ func TestChangeHandlerStartProvingNextDeadline(t *testing.T) {
// Trigger a head change that advances the chain beyond the submit
// confidence
currentEpoch = 1 + SubmitConfidence
go triggerHeadAdvance(t, s, currentEpoch)
go triggerHeadAdvance(t, s, currentEpoch+ChallengeConfidence)

// Should be no change to state yet
<-s.ch.proveHdlr.processedHeadChanges
Expand All @@ -424,7 +424,7 @@ func TestChangeHandlerStartProvingNextDeadline(t *testing.T) {
// the next deadline
go func() {
di = nextDeadline(di)
currentEpoch = di.Challenge
currentEpoch = di.Challenge + ChallengeConfidence
triggerHeadAdvance(t, s, currentEpoch)
}()

Expand All @@ -446,7 +446,7 @@ func TestChangeHandlerProvingRounds(t *testing.T) {
for currentEpoch := abi.ChainEpoch(1); currentEpoch < miner.WPoStChallengeWindow*5; currentEpoch++ {
// Trigger a head change
di := mock.getDeadline(currentEpoch)
go triggerHeadAdvance(t, s, currentEpoch)
go triggerHeadAdvance(t, s, currentEpoch+ChallengeConfidence)

// Wait for prover to process head change
<-s.ch.proveHdlr.processedHeadChanges
Expand Down Expand Up @@ -913,7 +913,7 @@ func TestChangeHandlerSubmitRevertTwoEpochs(t *testing.T) {

// Move to the challenge epoch for the next deadline
diE2 := nextDeadline(diE1)
currentEpoch = diE2.Challenge
currentEpoch = diE2.Challenge + ChallengeConfidence
go triggerHeadAdvance(t, s, currentEpoch)

// Should move to submitting state for epoch 1
Expand Down Expand Up @@ -1014,7 +1014,7 @@ func TestChangeHandlerSubmitRevertAdvanceLess(t *testing.T) {

// Move to the challenge epoch for the next deadline
diE2 := nextDeadline(diE1)
currentEpoch = diE2.Challenge
currentEpoch = diE2.Challenge + ChallengeConfidence
go triggerHeadAdvance(t, s, currentEpoch)

// Should move to submitting state for epoch 1
Expand Down
16 changes: 15 additions & 1 deletion storage/wdpost_run.go
Original file line number Diff line number Diff line change
Expand Up @@ -600,9 +600,23 @@ func (s *WindowPoStScheduler) runPost(ctx context.Context, di dline.Info, ts *ty
return nil, xerrors.Errorf("received no proofs back from generate window post")
}

headTs, err := s.api.ChainHead(ctx)
if err != nil {
return nil, xerrors.Errorf("getting current head: %w", err)
}

checkRand, err := s.api.ChainGetRandomnessFromBeacon(ctx, headTs.Key(), crypto.DomainSeparationTag_WindowedPoStChallengeSeed, di.Challenge, buf.Bytes())
if err != nil {
return nil, xerrors.Errorf("failed to get chain randomness from beacon for window post (ts=%d; deadline=%d): %w", ts.Height(), di, err)
}

if !bytes.Equal(checkRand, rand) {
log.Warnw("windowpost randomness changed", "old", rand, "new", checkRand, "ts-height", ts.Height(), "challenge-height", di.Challenge, "tsk", ts.Key())
}

// If we generated an incorrect proof, try again.
if correct, err := s.verifier.VerifyWindowPoSt(ctx, proof.WindowPoStVerifyInfo{
Randomness: abi.PoStRandomness(rand),
Randomness: abi.PoStRandomness(checkRand),
Proofs: postOut,
ChallengedSectors: sinfos,
Prover: abi.ActorID(mid),
Expand Down
2 changes: 1 addition & 1 deletion storage/wdpost_run_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ func (m *mockStorageMinerAPI) GasEstimateMessageGas(ctx context.Context, message
}

func (m *mockStorageMinerAPI) ChainHead(ctx context.Context) (*types.TipSet, error) {
panic("implement me")
return nil, nil
}

func (m *mockStorageMinerAPI) ChainNotify(ctx context.Context) (<-chan []*api.HeadChange, error) {
Expand Down

0 comments on commit 6315523

Please sign in to comment.