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

Add feedback for peer honesty in consensus #1979

Merged

Conversation

SebastianMarian
Copy link
Contributor

  • Added a consensus rating mechanism to handle the situation when some peers would flood the consensus topic with invalid messages
  • Fixed an uncovered situation in which a blacklist should be applied for both, originator and the connected peer, if an invalid message would be received on consensus topic

…e peers would flood the consensus topic with invalid messages

* Fixed an uncovered situation in which a blacklist should be applied for both, originator and the connected peer, if an invalid message would be received on consensus topic
@SebastianMarian SebastianMarian added the type:feature New feature or request label Jun 18, 2020
@SebastianMarian SebastianMarian self-assigned this Jun 18, 2020
@sasurobert sasurobert self-requested a review June 18, 2020 16:24
@iulianpascalau iulianpascalau self-requested a review June 18, 2020 16:24
consensus/interface.go Outdated Show resolved Hide resolved
consensus/spos/common.go Show resolved Hide resolved
consensus/spos/constants.go Outdated Show resolved Hide resolved
consensus/interface.go Outdated Show resolved Hide resolved
consensus/mock/consensusRatingStub.go Outdated Show resolved Hide resolved
consensus/spos/bls/subroundBlock.go Outdated Show resolved Hide resolved
consensus/spos/bls/subroundBlock.go Show resolved Hide resolved
consensus/spos/bls/subroundBlock.go Show resolved Hide resolved
consensus/spos/worker.go Outdated Show resolved Hide resolved
@@ -589,3 +559,21 @@ func (sr *subroundBlock) getRoundInLastCommittedBlock() int64 {

return roundInLastCommittedBlock
}

func (sr *subroundBlock) updateLeaderPeerHonesty(node string) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Duplicate code with subroundEndRound. Suggestion to move this in Subround struct.

@@ -279,3 +269,21 @@ func (sr *subroundSignature) remainingTime() time.Duration {

return remainigTime
}

func (sr *subroundSignature) updateValidatorPeerHonesty(node string) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This can also be moved in Subround struct

iulianpascalau
iulianpascalau previously approved these changes Jun 19, 2020
Copy link
Contributor

@iulianpascalau iulianpascalau left a comment

Choose a reason for hiding this comment

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

Forgot to say anything about testing the 2 new functions UpdateValidatorPeerHonesty and UpdateLeaderPeerHonesty. Can be done later.

sasurobert
sasurobert previously approved these changes Jun 19, 2020
* Refactored Increase adn Decrease mechanism
* Fixed a blcklisted situation which should not be done
iulianpascalau
iulianpascalau previously approved these changes Jun 21, 2020
iulianpascalau and others added 3 commits June 21, 2020 13:49
…huffling out state (self shard ID could be reported differently for a while, max. 25% from an epoch time, by shard coordinator and by nodes coordinator)
…-consensus' into add-feedback-for-peer-honesty-in-consensus
iulianpascalau
iulianpascalau previously approved these changes Jun 21, 2020
Copy link
Contributor

@LucianMincu LucianMincu left a comment

Choose a reason for hiding this comment

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

System tests passed.

@LucianMincu LucianMincu merged commit 3667e5e into release-candidate Jun 22, 2020
@LucianMincu LucianMincu deleted the add-feedback-for-peer-honesty-in-consensus branch June 22, 2020 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants