-
Notifications
You must be signed in to change notification settings - Fork 215
Fix shard stuck #6739
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
Fix shard stuck #6739
Conversation
| return sr.finalizeConfirmedBlock() | ||
| } | ||
|
|
||
| func (sr *subroundEndRound) waitForProof(shardID uint32, headerHash []byte) bool { |
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.
parameters are not necessarily needed
| } | ||
|
|
||
| func (sr *subroundEndRound) finalizeConfirmedBlock() bool { | ||
| sr.waitForProof(sr.ShardCoordinator().SelfId(), sr.GetData()) |
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.
check result of waitForProof and do not proceed in case of false?
| if !sr.waitForSignalSync() { | ||
| return false | ||
| } | ||
| _, _ = sr.sendProof() |
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 can remove the return values of sendProof now
| // broadcast header proof | ||
| proof, err := sr.createAndBroadcastProof(sig, bitmap) | ||
| return proof, err == nil | ||
| _, err = sr.createAndBroadcastProof(sig, bitmap) |
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.
returned proof variable here can also be removed
| func (sr *subroundEndRound) waitForProof() bool { | ||
| shardID := sr.ShardCoordinator().SelfId() | ||
| headerHash := sr.GetData() | ||
| if sr.EquivalentProofsPool().HasProof(sr.ShardCoordinator().SelfId(), sr.GetData()) { |
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.
| if sr.EquivalentProofsPool().HasProof(sr.ShardCoordinator().SelfId(), sr.GetData()) { | |
| if sr.EquivalentProofsPool().HasProof(shardID, headerHash) { |
?
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.
yes, forgot it.
Reasoning behind the pull request
Proposed changes
Testing procedure
Pre-requisites
Based on the Contributing Guidelines the PR author and the reviewers must check the following requirements are met:
featbranch created?featbranch merging, do all satellite projects have a proper tag insidego.mod?