Skip to content
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

Merged
merged 16 commits into from
Jun 4, 2021

Conversation

AdoAdoAdo
Copy link
Contributor

@AdoAdoAdo AdoAdoAdo commented May 31, 2021

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.

@AdoAdoAdo AdoAdoAdo self-assigned this Jun 1, 2021
@sasurobert sasurobert self-requested a review June 1, 2021 06:33
@iulianpascalau iulianpascalau self-requested a review June 1, 2021 06:51
…lock

# Conflicts:
#	process/mock/headerHandlerStub.go
#	sharding/mock/headerHandlerStub.go
consensus/spos/bls/subroundBlock.go Show resolved Hide resolved
consensus/spos/bls/subroundEndRound.go Show resolved Hide resolved
processingErrorString = "processing error"
inProgressString = "processing in progress"
processingOKString = "processing OK"
unexpectedString = "processing OK"
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

consensus/spos/scheduledProcessor.go Outdated Show resolved Hide resolved
consensus/spos/scheduledProcessor.go Show resolved Hide resolved
consensus/spos/scheduledProcessor.go Outdated Show resolved Hide resolved
data/block/block.go Outdated Show resolved Hide resolved
data/block/blockV2.go Outdated Show resolved Hide resolved
data/block/metaBlock.go Outdated Show resolved Hide resolved
integrationTests/consensus/consensus_test.go Outdated Show resolved Hide resolved
iulianpascalau
iulianpascalau previously approved these changes Jun 1, 2021
@@ -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(
Copy link
Contributor

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

Copy link
Contributor Author

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.

consensus/spos/bls/subroundBlock.go Show resolved Hide resolved
consensus/spos/bls/subroundBlock.go Show resolved Hide resolved
consensus/spos/scheduledProcessor.go Show resolved Hide resolved
consensus/spos/scheduledProcessor.go Show resolved Hide resolved
return sp == nil
}

func (sp *scheduledProcessorWrapper) emptyStopChannel() {
Copy link
Contributor

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.

Copy link
Contributor

@sasurobert sasurobert left a 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.

@AdoAdoAdo AdoAdoAdo merged commit a46e245 into feat/scheduled-sc-execution Jun 4, 2021
@AdoAdoAdo AdoAdoAdo deleted the consensus-scheduled-block branch June 4, 2021 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants