From 4be882da84091a29325d9a208441348d359c2d0b Mon Sep 17 00:00:00 2001 From: mjalalzai <33738574+MForensic@users.noreply.github.com> Date: Sat, 25 Feb 2023 18:15:08 -0800 Subject: [PATCH] Update Carnot-Specs --- .../consensus/candidates/carnot/Carnot-Specs | 32 ++++++++++++++++--- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/content/roadmap/consensus/candidates/carnot/Carnot-Specs b/content/roadmap/consensus/candidates/carnot/Carnot-Specs index c17f29aa6..6378f41b2 100644 --- a/content/roadmap/consensus/candidates/carnot/Carnot-Specs +++ b/content/roadmap/consensus/candidates/carnot/Carnot-Specs @@ -41,9 +41,10 @@ Local Variables: Utilities: - leader (randseed): returns the leader of the view - reset(): resets timer. If the timer expires a node times out + leader (randseed): returns the leader of the view. + reset(): resets timer. If the timer expires a node times out. extends(block, ancestor): returns true if block is descendant of the ancestor in the chain. + download(view): Download missing block for the view. @@ -67,9 +68,30 @@ Utilities: } - - - + Func update_higQC(qc, aggQC): + if qc != Null{ # Happy case + if qc.block.view > highQC.block.view{ + highQC = qc + } + if qc.block.view > curView { # download blocks from missing views + while curView++ <= qc.block.view { + download(curView) + } + } + reset() + } + + if aggQC != Null { # Unhappy case + if aggQC.highQC.block.view != highQC.block.view{ + highQC = aggQC.highQC # release the lock and adopt the global lock + if aggQC.highQC.block.view > curView { # download the blocks of the missed views + while curView++ <= aggQC.highQC.view { + download(curView) + } + } + reset() + + }