From b305a7ac08b35fb432f6c89baf9baac7dc6480b1 Mon Sep 17 00:00:00 2001 From: Brian W Bush Date: Wed, 25 Dec 2024 05:37:52 -0700 Subject: [PATCH] Text and plots for honest/adversarial EB production. --- docs/technical-report-1.md | 21 ++- images/prob-no-eb-1000.svg | 297 +++++++++++++++++++++++++++++++++++ images/prob-no-eb-2500.svg | 297 +++++++++++++++++++++++++++++++++++ images/prob-no-eb.svg | 312 +++++++++++++++++++++++++++++++------ 4 files changed, 874 insertions(+), 53 deletions(-) create mode 100644 images/prob-no-eb-1000.svg create mode 100644 images/prob-no-eb-2500.svg diff --git a/docs/technical-report-1.md b/docs/technical-report-1.md index ccb0624..7dde7fb 100644 --- a/docs/technical-report-1.md +++ b/docs/technical-report-1.md @@ -91,7 +91,7 @@ $$ \delta = 1 \cdot \phi_f\left(\frac{\sigma}{2}\right) + 1 \cdot \phi_f\left(\frac{\sigma}{2}\right) - 1 \cdot \phi_f(\sigma) = 2 \left[ 1 - (1 - f)^{\sigma/2} \right] - \left[ 1 - (1 - f)^\sigma \right] = \left[ 1 - (1 - f)^{\sigma/2} \right]^2 = \left[ \phi_f\left(\frac{\sigma}{2}\right) \right]^2 > 0 $$ -In relative terms, $\frac{\delta}{\phi_f(\sigma)} \approx \frac{\phi_f(\sigma)}{4}$ , so the advantage is small unless the node starts with an appreciable probability of producing a block. A Taylor-series expansion reveals $2\phi_f(\sigma/2) = \phi_g(\sigma)$ with $g = f \cdot (1 + \frac{1}{4}f \cdot \sigma) + \mathcal{O}(f^3)$, implying that the benefit of splitting stake in half is equivalent to the protocol parameter for the lottery being fractionally increased by $f \cdot \sigma / 4$. In the limit of splitting the stake into a large number of parts, we have the limit +In relative terms, $\frac{\delta}{\phi_f(\sigma)} \approx \frac{\phi_f(\sigma)}{4}$ , so the advantage is small unless the node starts with an appreciable probability of producing a block. A Taylor-series expansion reveals $2\phi_f(\sigma/2) = \phi_g(\sigma)$ with $g = f \cdot (1 + \frac{1}{4}f \cdot \sigma) + \mathcal{O}(f^3)$, implying that the benefit of splitting stake in half is equivalent to the protocol parameter for the lottery being fractionally increased by $f \cdot \sigma / 4$. This renormalization can be extended to the limit of splitting the stake into a large number of parts, where we have a simple result, $$ \lim_{k \rightarrow \infty} k \cdot \phi_f\left( \frac{\sigma}{k} \right) = \phi_h(\sigma) @@ -150,18 +150,25 @@ $$ p_\text{EB} = \phi_{f_\text{EB}}(\sigma) = 1 - (1 - f_\text{EB})^\sigma $$ -and the probability that no EB is produced by any node is +If $v_\text{EB} \in [0,1]$ is the node's EB VRF value for the current phase, then the node's eligibility condition is $v_\text{EB} \leq p_\text{EB}$. -$$ -q_\text{E} = 1 - f_\text{EB} -$$ +In Short Leios it is critically important that at least one EB be produced in the pipeline because, otherwise, the pipeline's IBs will not be referenced in the RB and the work done creating them will be lost and their transactions will have to wait for another IB. There are four situations of interest for EB production in a particular pipeline: -If $v_\text{EB} \in [0,1]$ is the node's EB VRF value for the current phase, then the node's eligibility condition is $v_\text{EB} \leq p_\text{EB}$. +1. No EB is produced: $(1 - p_\text{hon}) \cdot (1 - p_\text{adv}) = 1 - f_\text{EB}$. +2. Only honest parties produce EBs: $p_\text{hon} \cdot (1 - p_\text{adv})$. +3. Only adversarial parties produce EBs: $(1 - p_\text{hon}) \cdot p_\text{adv}$. +4. Both honest and adversarial parties produce EBs: $p_\text{hon} \cdot p_\text{adv}$. -In Short Leios it is critically important that at least one EB be produced in the pipeline because, otherwise, the pipeline's IBs will not be referenced in the RB and the work done creating them will be lost and their transactions will have to wait for another IB. +where $p_\text{hon} = \phi_{f_\text{EB}}(\sigma_\text{hon})$, $p_\text{adv} = \phi_{f_\text{EB}}(\sigma_\text{adv})$, and $\sigma_\text{hon} + \sigma_\text{adv} = 1$. For this analysis we ignore the splitting of stake because the analysis of it in a previous section indicated that it is inconsequential even in the worst case. ![Probability of no EB in phase](../images/prob-no-eb.svg) +If we account for stake being divided among many nodes, we get a nearly identical result. The left plot below shows the scenario where stake is divided evenly among 1000 nodes and the right plot shows when it is divided among 2500 nodes according to a non-uniform stake distribution similar to that of epoch 500. + +| Uniform stake among 1000 nodes | Realistic non-uniform stake among 2500 nodes | +| ------------------------------------------------------------------ | ---------------------------------------------------------------------- | +| ![EB production with uniform stake](../images/prob-no-eb-1000.svg) | ![EB production with non-uniform stake](../images/prob-no-eb-2500.svg) | + Short Leios also relies on the EB being included in an RB before another EB is produced: endorser blocks are not allowed to queue awaiting RBs or to reference other EBs. Thus, the EB rate should be consistent with the RB rate. diff --git a/images/prob-no-eb-1000.svg b/images/prob-no-eb-1000.svg new file mode 100644 index 0000000..64c3bc8 --- /dev/null +++ b/images/prob-no-eb-1000.svg @@ -0,0 +1,297 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Adversarial EBs only + + + + + + + + + + +Honest and adversarial EBs + + + + + + + + + + +No EB + + + + + + + + + + +Honest EBs only + + + + + + + +0 +25 +50 +75 +100 + + + + + +0 +25 +50 +75 +100 +0 +25 +50 +75 +100 + + + + + +0 +25 +50 +75 +100 + + + + + +Production rate [%/phase] +Probability [%] + +Adversarial +stake [%] + + + + + + + + + + + + + + + + + + + + +0 +5 +10 +15 +20 +25 +30 +35 +40 +45 + + diff --git a/images/prob-no-eb-2500.svg b/images/prob-no-eb-2500.svg new file mode 100644 index 0000000..59bc597 --- /dev/null +++ b/images/prob-no-eb-2500.svg @@ -0,0 +1,297 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Adversarial EBs only + + + + + + + + + + +Honest and adversarial EBs + + + + + + + + + + +No EB + + + + + + + + + + +Honest EBs only + + + + + + + +0 +25 +50 +75 +100 + + + + + +0 +25 +50 +75 +100 +0 +25 +50 +75 +100 + + + + + +0 +25 +50 +75 +100 + + + + + +Production rate [%/phase] +Probability [%] + +Adversarial +stake [%] + + + + + + + + + + + + + + + + + + + + +0 +5 +10 +15 +20 +25 +30 +35 +40 +45 + + diff --git a/images/prob-no-eb.svg b/images/prob-no-eb.svg index b6d6d02..0103e73 100644 --- a/images/prob-no-eb.svg +++ b/images/prob-no-eb.svg @@ -21,57 +21,277 @@ - + - - + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0 -25 -50 -75 -100 - - - - - - - - - - -0 -25 -50 -75 -100 -Per-phase probability of an EB [%] -Per-phase probability of no EB [%] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Adversarial EBs only + + + + + + + + + + +Honest and adversarial EBs + + + + + + + + + + +No EB + + + + + + + + + + +Honest EBs only + + + + + + + +0 +25 +50 +75 +100 + + + + + +0 +25 +50 +75 +100 +0 +25 +50 +75 +100 + + + + + +0 +25 +50 +75 +100 + + + + + +Production rate [%/phase] +Probability [%] + +Adversarial +stake [%] + + + + + + + + + + + + + + + + + + + + +0 +5 +10 +15 +20 +25 +30 +35 +40 +45