-
Notifications
You must be signed in to change notification settings - Fork 198
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
Consensus scheduled block #3136
Consensus scheduled block #3136
Conversation
…lock # Conflicts: # process/mock/headerHandlerStub.go # sharding/mock/headerHandlerStub.go
consensus/spos/scheduledProcessor.go
Outdated
processingErrorString = "processing error" | ||
inProgressString = "processing in progress" | ||
processingOKString = "processing OK" | ||
unexpectedString = "processing OK" |
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.
maybe change the string here?
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.
done
consensus/spos/bls/subroundBlock.go
Outdated
@@ -160,8 +162,8 @@ func (sr *subroundBlock) createBlock(header data.HeaderHandler) (data.HeaderHand | |||
|
|||
// sendBlockBodyAndHeader method sends the proposed block body and header in the subround Block | |||
func (sr *subroundBlock) sendBlockBodyAndHeader( |
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 you changed the order. maybe rename the method name as well to sendHeaderAndBlockBody
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.
renamed, the parameter order was changed for consistency with the other methods.
…e consensus revert account state
return sp == nil | ||
} | ||
|
||
func (sp *scheduledProcessorWrapper) emptyStopChannel() { |
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 resembles with the core.EmptyChannel function. could have used that by changing stopExecution to be a buffered chan of type 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.
Schedule Block Processing has to be called in sync as well.
This pull request starts the pipeline processing for the proposer and validators during consensus for the v2 blocks with scheduled miniblocks and validates the end result.
The proposer does not send the block final info if either there was an error with the block processing (coding errors - should be caught during testing phase if any) or timeout during execution - this is tricky and could happen in case of bad gas estimation, or starved processor.
As the consensus round is elastic, with early finalization in case all signatures are received ahead of time, the checking for the scheduled miniblocks execution result is delayed until either a final status is available or the scheduled mb execution has timedout.