Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prefix table with protocol labels to increase clarity #713

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 17 additions & 53 deletions zip-0317.html
Original file line number Diff line number Diff line change
Expand Up @@ -126,59 +126,23 @@
conventional\_fee &=& marginal\_fee \cdot \mathsf{max}(grace\_actions, logical\_actions)
\end{array}\)</div>
<p>The inputs to this formula are taken from transaction fields defined in the Zcash protocol specification <a id="footnote-reference-4" class="footnote_reference" href="#protocol-txnencoding">3</a>:</p>
<table>
<thead>
<tr>
<th>Input</th>
<th>Units</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<span class="math">\(tx\_in\_total\_size\)</span>
</td>
<td>bytes</td>
<td>total size in bytes of the <code>tx_in</code> field</td>
</tr>
<tr>
<td>
<span class="math">\(tx\_out\_total\_size\)</span>
</td>
<td>bytes</td>
<td>total size in bytes of the <code>tx_out</code> field</td>
</tr>
<tr>
<td>
<span class="math">\(nJoinSplit\)</span>
</td>
<td>number</td>
<td>the number of Sprout JoinSplits</td>
</tr>
<tr>
<td>
<span class="math">\(nSpendsSapling\)</span>
</td>
<td>number</td>
<td>the number of Sapling spends</td>
</tr>
<tr>
<td>
<span class="math">\(nOutputsSapling\)</span>
</td>
<td>number</td>
<td>the number of Sapling outputs</td>
</tr>
<tr>
<td>
<span class="math">\(nActionsOrchard\)</span>
</td>
<td>number</td>
<td>the number of Orchard actions</td>
</tr>
</tbody>
</table>
<div class="math">\(\begin{array}{|l|l|l|l|}
\hline
\text{Protocol} &amp; \text{Input} &amp; \text{Units} &amp; \text{Description} \\
\hline
\text{Transparent} &amp; tx\_in\_total\_size &amp; \text{bytes} &amp; \text{total size in bytes of the } tx\_in \\
\hline
&amp; tx\_out\_total\_size &amp; \text{bytes} &amp; \text{total size in bytes of the } tx\_out \\
\hline
\text{Sprout} &amp; nJoinSplit &amp; \text{number} &amp; \text{the number of Sprout JoinSplits} \\
\hline
\text{Sapling} &amp; nSpendsSapling &amp; \text{number} &amp; \text{the number of Sapling spends} \\
\hline
&amp; nOutputsSapling &amp; \text{number} &amp; \text{the number of Sapling outputs} \\
\hline
\text{Orchard} &amp; nActionsOrchard &amp; \text{number} &amp; \text{the number of Orchard actions} \\
\hline
\end{array}\)</div>
<p>It is not a consensus requirement that fees follow this formula; however, wallets SHOULD create transactions that pay this fee, in order to reduce information leakage, unless overridden by the user.</p>
<section id="rationale-for-logical-actions"><h4><span class="section-heading">Rationale for logical actions</span><span class="section-anchor"> <a rel="bookmark" href="#rationale-for-logical-actions"><img width="24" height="24" class="section-anchor" src="assets/images/section-anchor.png" alt=""></a></span></h4>
<details>
Expand Down
29 changes: 19 additions & 10 deletions zip-0317.rst
Original file line number Diff line number Diff line change
Expand Up @@ -123,16 +123,25 @@ calculated in zatoshis per the following formula:
The inputs to this formula are taken from transaction fields defined in the Zcash protocol
specification [#protocol-txnencoding]_:

============================ ====== ===========================================
Input Units Description
============================ ====== ===========================================
:math:`tx\_in\_total\_size` bytes total size in bytes of the ``tx_in`` field
:math:`tx\_out\_total\_size` bytes total size in bytes of the ``tx_out`` field
:math:`nJoinSplit` number the number of Sprout JoinSplits
:math:`nSpendsSapling` number the number of Sapling spends
:math:`nOutputsSapling` number the number of Sapling outputs
:math:`nActionsOrchard` number the number of Orchard actions
============================ ====== ===========================================
.. math::

\begin{array}{|l|l|l|l|}
\hline
\text{Protocol} & \text{Input} & \text{Units} & \text{Description} \\
\hline
\text{Transparent} & tx\_in\_total\_size & \text{bytes} & \text{total size in bytes of the } tx\_in \\
\hline
& tx\_out\_total\_size & \text{bytes} & \text{total size in bytes of the } tx\_out \\
\hline
\text{Sprout} & nJoinSplit & \text{number} & \text{the number of Sprout JoinSplits} \\
\hline
\text{Sapling} & nSpendsSapling & \text{number} & \text{the number of Sapling spends} \\
\hline
& nOutputsSapling & \text{number} & \text{the number of Sapling outputs} \\
\hline
\text{Orchard} & nActionsOrchard & \text{number} & \text{the number of Orchard actions} \\
\hline
\end{array}

It is not a consensus requirement that fees follow this formula; however,
wallets SHOULD create transactions that pay this fee, in order to reduce
Expand Down