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 consensus originator check #1984

Merged
merged 6 commits into from
Jun 22, 2020

Conversation

iulianpascalau
Copy link
Contributor

  • added peer id in consensus message as to not allow impersonating. Anyone caught sending a consensus message that won't contain its originator peer id will be subject to peer banning.

…nyone caught sending a consensus message that won't contain its originator peer id will be subject to peer banning.
@sasurobert sasurobert self-requested a review June 21, 2020 09:14
andreibancioiu
andreibancioiu previously approved these changes Jun 21, 2020
@@ -31,7 +31,7 @@ message HeartbeatDTO {
string PeerType = 11;
string Identity = 12;
bool IsValidator = 13;
int64 LastUptimeDowntime = 14;
int64 LastUptimeDowntime = 14;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Indentation is not correct.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

:( will fix that. Gofmt does not run automatically for .proto files

@@ -83,6 +84,12 @@ func (wrk *Worker) checkConsensusMessageValidity(cnsMsg *consensus.Message) erro
err.Error())
}

cnsMsgOriginator := core.PeerID(cnsMsg.OriginatorPid)
if cnsMsgOriginator != originator {
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

sasurobert
sasurobert previously approved these changes Jun 22, 2020
Base automatically changed from add-feedback-for-peer-honesty-in-consensus to release-candidate June 22, 2020 14:22
@LucianMincu LucianMincu dismissed stale reviews from sasurobert and andreibancioiu June 22, 2020 14:22

The base branch was changed.

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 1eeed8a into release-candidate Jun 22, 2020
@LucianMincu LucianMincu deleted the add-consensus-originator-check branch June 22, 2020 16:33
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

4 participants