-
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
markets - separate watching for pre-commit from prove-commit #4945
Conversation
fa85007
to
078e0c9
Compare
fe3db0b
to
ce3dbda
Compare
6d8a8d7
to
37a212d
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.
Looks good, but it seems we want filecoin-project/go-fil-markets#453 in before this lands
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.
There's a lot of logic in here to deal with the ProveCommitSector message in OnDealSectorPreCommitted -- why would we need this? The problem 4900 captures is that we weren't persisting the progression from PreCommit to PostCommit, so, theoretically, if node restarts in between, we lose the sector number from the pre-commit and never get to the end. It's not to cover for the possibility of missing PreCommit entirely. Unless @magik6k wants to say otherwise, I think we can remove the ProveCommitSector logic (which is complicated) from OnDealSectorPreCommitted.
} else { | ||
// If it's a prove-commit message, the parameters don't have deal IDs, | ||
// just a sector number | ||
var params miner.ProveCommitSectorParams |
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.
There is a lot of logic in here to deal with ProveCommitSector messages -- I'm not clear why we're dealing with this. As I see it, the only case of isActive = true we need to deal with is in the called function.
The goal of #4900 is designed to fix the case where a restart happens between pre-commit and prove-commit. We don't need this code for that.
What is the scenario that causes us to miss the pre-commit message entirely? Even if we shut down the node a long time, we will see the pre-commit when we sync the chain.
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.
Ah yes that's a good point 👍
Nice catch @hannahhoward. I think it is worth the effort to refactor the code because it will simplify things significantly. I will do so today.
Edit: this is now fixed
37a212d
to
c00e19d
Compare
Oh dear, I think I broke this. So now I need to fix the problem actually. |
c00e19d
to
47a4128
Compare
I've fixed the history... #oops And I downgraded my comment from a "request changes" to a suggestion, it's up to you if you want to change. Either way, you can merge at your leisure pending @magik6k's approval |
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.
(testing on my miner; will merge in a bit)
Depends on filecoin-project/go-fil-markets#453
Fixes #4900
TODO: