-
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
Snap Deals Lotus Integration: FSM Posting and integration test #7810
Conversation
extern/storage-sealing/input.go
Outdated
@@ -358,6 +370,11 @@ func (m *Sealing) updateInput(ctx context.Context, sp abi.RegisteredSealProof) e | |||
|
|||
for id, sector := range m.openSectors { | |||
avail := abi.PaddedPieceSize(ssize).Unpadded() - sector.used | |||
// check that sector lifetime is long enough to fit deal | |||
if sector.expiration > 0 && sector.expiration < piece.deal.DealProposal.EndEpoch { |
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.
should only need the later check cuz dealproposal must >0?
f5de275
to
784aa86
Compare
ea1e282
to
0da857f
Compare
a19741f
to
b98138e
Compare
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 of the consensus parts of things seems fine, will tackle miner tomorrow. Hopefully.
chain/vm/invoker.go
Outdated
@@ -74,6 +74,9 @@ func NewActorRegistry() *ActorRegistry { | |||
} | |||
|
|||
func (ar *ActorRegistry) Invoke(codeCid cid.Cid, rt vmr.Runtime, method abi.MethodNum, params []byte) ([]byte, aerrors.ActorError) { | |||
if method == 27 { |
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.
No, sir. I say to you, no.
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.
Looks reasonable, a couple of comments.
The market integration is quite a hack, I would like suggestions on how to make it cleaner
I can't think of any cleaner way to do this, I'd say it's not more hacky than the thing we have right now.
@@ -110,7 +111,7 @@ func (mgr *SectorCommittedManager) OnDealSectorPreCommitted(ctx context.Context, | |||
|
|||
// Watch for a pre-commit message to the provider. | |||
matchEvent := func(msg *types.Message) (bool, error) { | |||
matched := msg.To == provider && (msg.Method == miner.Methods.PreCommitSector || msg.Method == miner.Methods.PreCommitSectorBatch) | |||
matched := msg.To == provider && (msg.Method == miner.Methods.PreCommitSector || msg.Method == miner.Methods.PreCommitSectorBatch || msg.Method == miner.Methods.ProveReplicaUpdates) |
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.
We will need to make sure other market users are aware of this change (filc/boost/others?)
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.
Any advice on how to propagate this information?
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.
Another review wave
VerifySeal(proof.SealVerifyInfo) (bool, error) | ||
VerifyAggregateSeals(aggregate proof.AggregateSealVerifyProofAndInfos) (bool, error) | ||
VerifyReplicaUpdate(update proof.ReplicaUpdateInfo) (bool, error) | ||
VerifyWinningPoSt(ctx context.Context, info proof.WinningPoStVerifyInfo, currEpoch abi.ChainEpoch, v network.Version) (bool, error) |
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.
new params can go i think
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.
No harm keeping them all up to date right?
if err != nil { | ||
return nil, nil, xerrors.Errorf("gathering sector info: %w", err) | ||
} | ||
log.Errorf("got private sectors") |
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.
logs are bad
cache = paths.UpdateCache | ||
sealed = paths.Update | ||
} else { | ||
log.Errorf("Posting over sector key sector for sector id: %d", s.SectorNumber) |
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.
this log and the one above need to go?
e3cd18b
to
61e1732
Compare
- FSM handles the actual cc upgrade process including error states - PoSting (winning and window) works over upgraded and upgrading sectors - Integration test and changes to itest framework to reduce flakes - Update CLI to handle new upgrade - Update dependencies
415360c
to
825e2c9
Compare
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.
2 small things
6f656cc
to
7382c53
Compare
7382c53
to
d645c5f
Compare
Implements the miner node logic to run snap deals upgrades. It also handles posting (winning and window) over upgraded sectors.