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

Bugs on MoreThanFNodesCommittedOrLost - Logic probably not used for changeview #781

Open
vncoelho opened this issue Dec 21, 2022 · 4 comments
Assignees

Comments

@vncoelho
Copy link
Member

vncoelho commented Dec 21, 2022

Also related to issue #780,
there is something strange in the logic for avoiding nodes to accept payloads.

As I remember, this logic was also created for avoiding a node to change view if more than F nodes are committed or lost.

This needs a double check.

public bool NotAcceptingPayloadsDueToViewChanging => ViewChanging && !MoreThanFNodesCommittedOrLost;
// A possible attack can happen if the last node to commit is malicious and either sends change view after his
// commit to stall nodes in a higher view, or if he refuses to send recovery messages. In addition, if a node
// asking change views loses network or crashes and comes back when nodes are committed in more than one higher
// numbered view, it is possible for the node accepting recovery to commit in any of the higher views, thus
// potentially splitting nodes among views and stalling the network.
public bool MoreThanFNodesCommittedOrLost => (CountCommitted + CountFailed) > F;

@vncoelho vncoelho changed the title Bugs on NotAcceptingPayloadsDueToViewChanging - Logic probably changed Bugs on MoreThanFNodesCommittedOrLost - Logic probably not used for changeview Dec 21, 2022
@vncoelho
Copy link
Member Author

I double checked again and it looks like the problem in a missing use of MoreThanFNodesCommittedOrLost.

Currently, the logic for NotAcceptingPayloadsDueToViewChanging => ViewChanging && !MoreThanFNodesCommittedOrLost; is correct. However, we are still changing view if MoreThanFNodesCommittedOrLost. This should be avoided because nodes will be isolated.

@ZhangTao1596
Copy link
Collaborator

Consensus nodes can't change view if MoreThanFNodesCommittedOrLost . Not enough nodes.

@vncoelho
Copy link
Member Author

vncoelho commented Jan 3, 2023

Exactly, @ZhangTao1596 .
Currently, it is changing.

@vncoelho
Copy link
Member Author

vncoelho commented Jan 3, 2023

But In the beginning of dbft 2.0 we designed for not changing. I am not sure what happened.

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

No branches or pull requests

4 participants