Skip to content

Commit 4157a01

Browse files
authored
Short pipeline document. (#24)
1 parent 6831421 commit 4157a01

File tree

3 files changed

+81
-0
lines changed

3 files changed

+81
-0
lines changed

docs/Short-Pipeline Leios.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# Short-Pipeline Leios
2+
3+
Leios as presented in the research paper is focused on optimal throughput in the network band assigned to input-block production. The effect is a heavy trade-off of throughput against latency. When willing to accept a throughput well below optimality, e.g., ½ of the respective network band, different approaches can result in much better latency, and yield even further advantages. Here, we propose a Leios variant to utilize close to 0.4 of the input-block network band and whose pipeline exists of only four slices, and where only one layer of endorser blocks is required (per pipeline). For simplicity, we only sketch the “simple” variant without recursion—noting that pipeline recursion needs to be added to cope with bad chain quality of the underlying consensus mechanism (i.e., Praos, in the case of Cardano).
4+
5+
# Short Pipeline
6+
7+
![Fig. 1\.Endorsing pipeline.](../images/short-pipeline-endorsing-pipeline.png)
8+
9+
The four stages consist of one slice each (cf. research paper). IBs are generated in the *propose* stage. EBs are generated in the *endorse* stage. An EB collects all IBs seen by the end of the *deliver* stage. During the *vote* stage, each EB from the endorse stage is upvoted whereof
10+
11+
1. all referenced IBs have been received by the end of the endorse stage,
12+
2. all IBs seen by the end of the propose stage are referenced, and,
13+
3. all referenced IBs validate (wrt. script execution).
14+
15+
In contrast to original Leios, all block opportunities during *propose* (IB) and *endorse* (EB) are “executed” (i.e., the blocks are generated and diffused) right at the beginning of the respective stage. This will guarantee fast delivery within the stage.[^1]
16+
17+
## Block delivery rules
18+
19+
IB bodies are requested (and delivered) in a freshest-first (FF) manner, i.e., in reverse order of their timestamps.
20+
21+
## Comparison to Original Leios
22+
23+
### Advantages
24+
25+
* Short pipeline
26+
* Guaranteed delivery of all IBs of an endorsed EB by the end of the vote stage—note that, in the original, the IBs may be accessible much later (depending on how close the throughput is pushed to 1).
27+
* One single layer of EBs, no majority-EB inclusion rule, and no endorsed EB can censor honest IBs.
28+
29+
### Disadvantages
30+
31+
* Execution spikes (may not be a problem—see footnote)
32+
33+
# References
34+
35+
[Leios Research Paper](https://iohk.io/en/research/library/papers/high-throughput-blockchain-consensus-under-realistic-network-assumptions/)
36+
37+
# Appendix
38+
39+
## Correctness
40+
41+
![Fig. 2\. Subsequent pipeline executions.](../images/short-pipeline-subsequent-pipeline-executions.png)
42+
43+
44+
Assume an IB rate of (0.4-ε)C where C is the bandwidth assigned to IB traffic and consider four subsequent pipeline instances as depicted in Fig. 2\. Thus, assuming large enough stage length and sufficiently large ε, no propose stage will produce more than 0.4C IB data, and each endorse stage will produce an honest EB.
45+
46+
We want to guarantee that:
47+
48+
1) all honest EBs get endorsed (honest stake-majority votes), and
49+
2) all endorsed EBs reference all honest IBs.
50+
51+
(1) is satisfied if, (A) all IBs referenced in an honest EB arrive (at every honest node) by the end of the endorse stage, and, (B) all IBs seen by an honest voter at the end of the *propose* stage are seen an honest EB producer at the end of the *deliver* stage—see [Short Pipeline](#short-pipeline).
52+
53+
### Establishing (1)
54+
55+
**Establishing (A):** all IBs referenced in an honest EB arrive (at every honest node) by the end of the endorse stage.
56+
Let Pipeline 1 (PL1, see Tab. 3\) be the pipeline in question. Due to FF, we can ignore the IBs of any prior pipeline since they have lower priority. Note that the honest IBs are always diffused on time but that the adversary can delay diffusion of his own IBs. Concretely, at least half of the IB load (0.2C) is issued on time where the remaining half can be delayed arbitrarily.
57+
In the worst case, the adversary sends all adversarial IBs to an honest EB producer just at the onset of the endorse stage of PL1—in the hope that some honest nodes may not receive them before the vote stage. Giving timely diffusion of honest IBs, this worst case is depicted in Tab. 3 for the pipelines (PL1–PL3): timely diffusion of the “honest” 0.2 during *propose* plus maximally delayed diffusion of all dishonest IBs to maximize traffic during the endorse stage of PL1.
58+
The resulting IB traffic during the endorse stage of PL1 is thus at most 0.8C, and delivery is guaranteed.
59+
60+
| PL1 (0.4) | propose | 0.2 | deliver | | endorse | 0.2 |
61+
| :---: | :---: | :---: | :---: | :---: | :---: | :---- |
62+
| PL2 (0.4) | | | propose | 0.2 | deliver | 0.2 |
63+
| PL3 (0.4) | | | | | propose | 0.2\+0.2 |
64+
65+
Tab. 3\. Pipeline stages and band utilization per pipeline.
66+
67+
**Establishing (B):** any IB seen by an honest node by the end of the *propose* stage is seen by all honest nodes by the end of the *deliver* stage.
68+
Let Pipeline 1 (PL1, see Tab. 4\) be the pipeline in question. Due to FF, we can ignore the IBs of any prior pipeline since they have lower priority. Note again that the honest IBs are always diffused on time but that the adversary can delay diffusion of his own IBs.
69+
In the worst case, the adversary sends all adversarial IBs to one single honest node just at the onset of the deliver stage of PL1—in the hope that some honest EB producer may not receive them before the endorse stage. Giving timely diffusion of honest IBs, this worst case is depicted in Tab. 3 for the pipelines (PL1–PL2): timely diffusion of the “honest” 0.2 during *propose* plus maximally delayed diffusion of all dishonest IBs to maximize traffic during the deliver stage of PL1. The resulting IB traffic during the deliver stage of PL1 is thus at most 0.6C, and delivery is guaranteed.
70+
71+
| PL1 (0.4) | propose | 0.2 | deliver | 0.2 |
72+
| :---: | :---: | :---: | :---: | :---: |
73+
| PL2 (0.4) | | | propose | 0.2\+0.2 |
74+
75+
Tab. 4\. Pipeline stages and band utilization per pipeline.
76+
77+
### Establishing (2)
78+
79+
All honest IBs are delivered by the end of the propose stage and thus required, by an honest voter, to be included in the EB the voter is voting on. Thus an endorsed EB references all honest IBs of the pipeline’s propose stage.
80+
81+
[^1]: Note, however, that Duncan Coutts argues against such “concentrated” block production to the end of avoiding network/CPU utilization spikes. However, in contrast, one may also argue that executing all at once and then queuing the work should not degrade performance (and might even improve it). This is an ongoing discussion.
14.4 KB
Loading
Loading

0 commit comments

Comments
 (0)