From 42a23d6a7b24df90e3c173700dade7abecda01fd Mon Sep 17 00:00:00 2001 From: mjalalzai <33738574+MForensic@users.noreply.github.com> Date: Tue, 4 Apr 2023 18:15:48 -0700 Subject: [PATCH] Make sure view changes are incrementally done in ascending order. --- carnot/carnot.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/carnot/carnot.py b/carnot/carnot.py index fd080ff..d141189 100644 --- a/carnot/carnot.py +++ b/carnot/carnot.py @@ -325,7 +325,10 @@ class Carnot: self.broadcast(block) def local_timeout(self, new_overlay: Overlay): - # This condition makes sure a node waits for timeout_qc from root committee to change it's view. + # This condition makes sure a node waits for timeout_qc from root committee to change increment its view with + # a view change. + # A node must change its view after making sure it has the high_Qc or last_timeout_view_qc + # from previous view. assert (is_sequential_ascending(self.current_view, self.local_high_qc.view) or is_sequential_ascending(self.current_view, self.last_timeout_view_qc.view)) self.increment_voted_view(self.current_view)