clarify execution model

This commit is contained in:
Giacomo Pasini 2023-03-21 15:16:31 +01:00
parent 4f6c297815
commit 69ff7401d6
No known key found for this signature in database
GPG Key ID: A03851B78A6C9A46

View File

@ -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