From f0d33a977c795aa6a498031b8da7561d2c140d46 Mon Sep 17 00:00:00 2001 From: zancas Date: Thu, 7 Sep 2023 14:27:22 -0600 Subject: [PATCH 1/2] prefix table with protocol labels to increase clarity --- zip-0317.html | 70 +++++++++++++-------------------------------------- zip-0317.rst | 29 +++++++++++++-------- 2 files changed, 36 insertions(+), 63 deletions(-) diff --git a/zip-0317.html b/zip-0317.html index acbb8520f..e30e7f7d6 100644 --- a/zip-0317.html +++ b/zip-0317.html @@ -126,59 +126,23 @@ conventional\_fee &=& marginal\_fee \cdot \mathsf{max}(grace\_actions, logical\_actions) \end{array}\)

The inputs to this formula are taken from transaction fields defined in the Zcash protocol specification 3:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
InputUnitsDescription
- \(tx\_in\_total\_size\) - bytestotal size in bytes of the tx_in field
- \(tx\_out\_total\_size\) - bytestotal size in bytes of the tx_out field
- \(nJoinSplit\) - numberthe number of Sprout JoinSplits
- \(nSpendsSapling\) - numberthe number of Sapling spends
- \(nOutputsSapling\) - numberthe number of Sapling outputs
- \(nActionsOrchard\) - numberthe number of Orchard actions
+
\(\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 information leakage, unless overridden by the user.

Rationale for logical actions

diff --git a/zip-0317.rst b/zip-0317.rst index b40bdc4e7..db141da1b 100644 --- a/zip-0317.rst +++ b/zip-0317.rst @@ -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 From 94cf2c7d5e6e5088b00dd8258eabae2679aca980 Mon Sep 17 00:00:00 2001 From: zancas Date: Thu, 7 Sep 2023 14:33:13 -0600 Subject: [PATCH 2/2] fix tx_in format --- zip-0317.html | 4 ++-- zip-0317.rst | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/zip-0317.html b/zip-0317.html index e30e7f7d6..e0f034033 100644 --- a/zip-0317.html +++ b/zip-0317.html @@ -130,9 +130,9 @@ \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} \\ +\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} \\ +& 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 diff --git a/zip-0317.rst b/zip-0317.rst index db141da1b..48101b068 100644 --- a/zip-0317.rst +++ b/zip-0317.rst @@ -129,9 +129,9 @@ specification [#protocol-txnencoding]_: \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} \\ + \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} \\ + & 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