-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: niporep: multi-sector onboarding through UnmanagedMiner #12180
Conversation
06022ee
to
7cb4edb
Compare
Working
|
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.
Review 1
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.
Review 2
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.
Finished.
94ab87c
to
dcbebdb
Compare
dcbebdb
to
aa4d6a1
Compare
* Test various multi-sector cases with niporep * UnmanagedMiner can now onboard multiple sectors for one miner and manage PoSt for all of them
d0343b2
to
676dbec
Compare
This has tests for both real and mock proofs with NI-PoRep, it includes testing 1 and more (up to max 65) sectors in mock proofs, including cases where there are expected sector failures but activation can still continue. They also proceed to confirm Window PoSt on all the sectors and that the miner gets the appropriate power for them all. Then they continue to snap a deal into one of the onboarded sectors (and because of the new PoSt handling, the new snapped sector can be successfully PoSted if need be--although there's no need here beyond just possible accident of snapping and then needing to PoSt before the test ends).
Lots of refactoring in UnmanagedMiner to make this all work, and because I've spent so much time in there there's a fair bit of reorganisation too. Unfortunately that means there's a significant amount of diff churn in here, some of which is just moving things around. There's now only 1 main onboarding method:
TestUnmanagedMiner#OnboardSectors(proofType abi.RegisteredSealProof, withPieces bool, count int, opts ...OnboardOpt) []OnboardedSector
. This handles all cases of onboarding new sectors, including for the existing manual onboarding test. There's alsoSnapDeal
to do a single deal snap into a specific sector.WindowPoSt stuff has been heavily reworked, some of it simplified, although there's new complexity thanks to partition management.
There's an internal
sectorInfo
map for all committed sectors for a miner that retains all properties (we kept a lot of these in separate maps previously). This only gets saved to the miner on commit, but prior to that it gets built up through the precommit and provecommit generation phases. Only after we successfully submit a commit and the sector is acknowledged as successfully activated do we save it to the miner, and then Window PoSt can pick it up, andSnapDeal
can work with it. There's alsoOnboardedSector
which is a subset of sector info that we can return to the caller. I decided not to expose everything but to keep the public bits as simple as is needed for now.In the NI-PoRep itest, it now has a list of scenarios that it runs through. Currently only the mock proofs ones are run locally or in CI. The real proofs need
LOTUS_RUN_VERY_EXPENSIVE_TESTS=1
and some of them are explicitly skipped so theskip: true
needs to be commented out. They are mostly useful for now for local testing as they are quite costly and not as useful for a future where we have some way of runningLOTUS_RUN_VERY_EXPENSIVE_TESTS=1
in CI.