From 69ff7401d698aa2900900a4152a17c0b7e26bed8 Mon Sep 17 00:00:00 2001 From: Giacomo Pasini Date: Tue, 21 Mar 2023 15:16:31 +0100 Subject: [PATCH] clarify execution model --- carnot/spec.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/carnot/spec.md b/carnot/spec.md index 259b3e1..772a088 100644 --- a/carnot/spec.md +++ b/carnot/spec.md @@ -142,11 +142,13 @@ The following functions are expected to be available to participants during the ## Core functions -These are the core functions necessary for the Carnot consensus protocol, to be executed in response of incoming messages, except for `timeout` which is triggered by a participant configurable timer. +These are the core functions necessary for the Carnot consensus protocol and correspond to the actions to take for each input event. +A total order on input events is enforced by appending them into a queue, from which the abstract consensus machine will pop them one by one. +The special `timeout` routine is triggered by a timer and results in appending a `Timeout` event to the queue. ### Receive block -```python3 +```python def receive_block(block: Block): if block.id() is known or block.view <=LATEST_COMMITTED_VIEW: return