-
Notifications
You must be signed in to change notification settings - Fork 102
add some unhappy scenarios for cc upgrade #1034
Conversation
The power for the new sector is not added until the first PoSt, so it should not be removed. I might be confused whether "cc upgrade sector" refers to the upgraded (replaced) or new sector, tho |
LGTM. As alex said, power for the new sector isn't added till the first PoSt. I wonder if it'd be helpful to try and test some of the params for |
I think both new and old sectors are faulting in the same deadline resulting in the miner losing power for the old sector. I'll try to tease them apart to show that the old sector isn't faulted until it misses its own PoSt. |
bce5c99
to
8ad7e00
Compare
Codecov Report
@@ Coverage Diff @@
## master #1034 +/- ##
======================================
Coverage 74.3% 74.3%
======================================
Files 57 57
Lines 6576 6576
======================================
Hits 4886 4886
Misses 1067 1067
Partials 623 623 |
Partitions: []miner.PoStPartition{{ | ||
Index: pIdx, | ||
// skip cc upgrade | ||
Skipped: bitfield.NewFromSet([]uint64{uint64(ccSectorNumber)}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The nameccSectorNumber
is quite confusing here. A committed capacity sector is a sector that has no deals. This, however, is the a sector that has deals that is replacing a committed capacity sector.
Please rename sectorNumber
and ccSectorNumber
. Perhaps:
- ccSectorNumber, upgrade/replacementSectorNumber?
- oldSectorNumber, newSectorNumber?
Use those terms consistently in the comments and other code (you already use old/new a lot).
Name sectorPower
to match.
8ad7e00
to
232feba
Compare
follow up to #1030
Motivation
CC upgrades have a happy-path scenario test. We want to check some of the unhappy scenarios as well.
Proposed Changes