Update Carnot-Specs

This commit is contained in:
mjalalzai 2023-02-25 18:15:08 -08:00 committed by GitHub
parent 4ebe426aa8
commit 4be882da84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -41,9 +41,10 @@ Local Variables:
Utilities: Utilities:
leader (randseed): returns the leader of the view leader (randseed): returns the leader of the view.
reset(): resets timer. If the timer expires a node times out 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. 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()
}