mirror of https://github.com/zcash/zips.git
ZIP 317: ensure that the case in block template construction where
all remaining transactions have zero weight ratio is well-defined. Signed-off-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
parent
2a6e5ae9e7
commit
fc56098315
|
@ -281,7 +281,7 @@ Pull-Request: <<a href="https://github.com/zcash/zips/pull/631">https://githu
|
||||||
<li>For each transaction
|
<li>For each transaction
|
||||||
<span class="math">\(tx\)</span>
|
<span class="math">\(tx\)</span>
|
||||||
in the mempool, calculate
|
in the mempool, calculate
|
||||||
<span class="math">\(tx.\!weight\_ratio = \mathsf{min}\!\left(\frac{tx.fee}{conventional\_fee(tx)},\, weight\_ratio\_cap\right)\!\)</span>
|
<span class="math">\(tx.\!weight\_ratio = \mathsf{min}\!\left(\frac{\mathsf{max}(1,\, tx.fee)}{conventional\_fee(tx)},\, weight\_ratio\_cap\right)\!\)</span>
|
||||||
and add the transaction to the set of candidate transactions.</li>
|
and add the transaction to the set of candidate transactions.</li>
|
||||||
<li>Repeat while there is any candidate transaction that pays at least the conventional fee:
|
<li>Repeat while there is any candidate transaction that pays at least the conventional fee:
|
||||||
<ol type="a">
|
<ol type="a">
|
||||||
|
|
|
@ -276,7 +276,7 @@ The following algorithm is RECOMMENDED for constructing block templates
|
||||||
from a set of transactions in a node's mempool:
|
from a set of transactions in a node's mempool:
|
||||||
|
|
||||||
1. For each transaction :math:`tx` in the mempool, calculate
|
1. For each transaction :math:`tx` in the mempool, calculate
|
||||||
:math:`tx.\!weight\_ratio = \mathsf{min}\!\left(\frac{tx.fee}{conventional\_fee(tx)},\, weight\_ratio\_cap\right)\!`
|
:math:`tx.\!weight\_ratio = \mathsf{min}\!\left(\frac{\mathsf{max}(1,\, tx.fee)}{conventional\_fee(tx)},\, weight\_ratio\_cap\right)\!`
|
||||||
and add the transaction to the set of candidate transactions.
|
and add the transaction to the set of candidate transactions.
|
||||||
|
|
||||||
2. Repeat while there is any candidate transaction that pays at least the
|
2. Repeat while there is any candidate transaction that pays at least the
|
||||||
|
|
Loading…
Reference in New Issue