Tasks¶
deploy/scripts/submit.sh -action kv.put -input '{"key": "a", "value": 1}' -mode sync
Modes¶
| Mode | Order | Use |
|---|---|---|
sync |
Agreement by the quorum, then execution | Actions that must not be wrong |
async |
Execution, then audit | Fast actions that can be corrected |
Synchronous task¶
- The leader receives the task, stores it, and proposes it on the ledger.
- Every member of the quorum verifies the signature and the action, and votes on the ledger.
- With enough votes, the task is approved. Too many rejections reject it.
- The leader executes the action in its term and publishes the result.
- An auditor checks the result and finalizes the task.
Status on the ledger¶
| Status | Meaning |
|---|---|
proposed |
Waiting for votes |
approved, rejected |
Decision of the quorum |
executed |
The result is published |
finalized |
An auditor confirmed it |
disputed |
Evidence was submitted |
invalid |
Evidence was upheld |
If the term ends before execution, the task expires at the leader. Submit it again with a new identifier.
Exactly once¶
A task identifier is executed at most once. A leader that crashes after executing asks the action module whether it did, and publishes the same result.
Who may submit¶
Clients in the trust file and active entities of the scope. Only the current leader accepts tasks. Other controllers answer 409 with the leader's DID.