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

Removed outdated flag, additional checks and simplified logic. #4621

Merged
merged 3 commits into from
Jan 30, 2024

Conversation

Frozen
Copy link
Contributor

@Frozen Frozen commented Jan 26, 2024

No description provided.

@sophoah sophoah requested a review from diego1q2w January 29, 2024 08:02
@sophoah
Copy link
Contributor

sophoah commented Jan 29, 2024

since the logic has changed, the proper way to upgrade the node with this PR would be :

  • stop all of them
  • upgrade
  • start all of them

there might be some node with a weird state after that if something goes wrong, so if that happened we can still reset devnet cc @diego1q2w

@sophoah
Copy link
Contributor

sophoah commented Jan 30, 2024

@Frozen would be great to explain the new logic when you implement one. So from what i could read can you confirm if the new logic is as follow, from multiple set of error checking, if any of them happen, you are returning the leader that committed the last block.

consensus.setupForNewConsensus(blk, committedMsg)

I think it's a good approach and worst that can happen, we'll always have the same leader until next election. In the other hand, a malicious leader could try to fail condition right after he become leader, luckily that bad leader should not be able to do more than being the leader since bad block / tx would be rejected by other validator in the network

what do you think @ONECasey @GheisMohammadi @diego1q2w

@GheisMohammadi
Copy link
Contributor

@Frozen would be great to explain the new logic when you implement one. So from what i could read can you confirm if the new logic is as follow, from multiple set of error checking, if any of them happen, you are returning the leader that committed the last block.

consensus.setupForNewConsensus(blk, committedMsg)

I think it's a good approach and worst that can happen, we'll always have the same leader until next election. In the other hand, a malicious leader could try to fail condition right after he become leader, luckily that bad leader should not be able to do more than being the leader since bad block / tx would be rejected by other validator in the network

what do you think @ONECasey @GheisMohammadi @diego1q2w

What do we do with the malicious leader then? Can it be present in the next election again? Can the same situation occur again in subsequent elections?

@sophoah
Copy link
Contributor

sophoah commented Jan 30, 2024

What do we do with the malicious leader then? Can it be present in the next election again? Can the same situation occur again in subsequent elections?

i think first is to be able to detect it. However, without moving further into those detail now are we ok with @Frozen proposed changes.

@Frozen Frozen merged commit 8d5f20f into dev Jan 30, 2024
4 checks passed
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.

4 participants