Skip to content

Commit

Permalink
ZIP 317: put the values of parameters in the table describing them.
Browse files Browse the repository at this point in the history
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
  • Loading branch information
daira committed Nov 29, 2022
1 parent 4efcdcf commit ce4f564
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 30 deletions.
28 changes: 13 additions & 15 deletions zip-0317.html
Expand Up @@ -63,6 +63,7 @@
<thead>
<tr>
<th>Parameter</th>
<th>Value</th>
<th>Units</th>
</tr>
</thead>
Expand All @@ -71,24 +72,36 @@
<td>
<span class="math">\(marginal\_fee\)</span>
</td>
<td>
<span class="math">\(5000\)</span>
</td>
<td>zatoshis per logical action (as defined below)</td>
</tr>
<tr>
<td>
<span class="math">\(grace\_actions\)</span>
</td>
<td>
<span class="math">\(2\)</span>
</td>
<td>logical actions</td>
</tr>
<tr>
<td>
<span class="math">\(p2pkh\_standard\_input\_size\)</span>
</td>
<td>
<span class="math">\(150\)</span>
</td>
<td>bytes</td>
</tr>
<tr>
<td>
<span class="math">\(p2pkh\_standard\_output\_size\)</span>
</td>
<td>
<span class="math">\(34\)</span>
</td>
<td>bytes</td>
</tr>
</tbody>
Expand Down Expand Up @@ -156,21 +169,6 @@
</tr>
</tbody>
</table>
<p>The parameters are set to the following values:</p>
<ul>
<li>
<span class="math">\(marginal\_fee = 5000\)</span>
;</li>
<li>
<span class="math">\(grace\_actions = 2\)</span>
;</li>
<li>
<span class="math">\(p2pkh\_standard\_input\_size = 150\)</span>
bytes;</li>
<li>
<span class="math">\(p2pkh\_standard\_output\_size = 34\)</span>
bytes.</li>
</ul>
<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>
<p>The intention is to make the fee paid for a transaction depend on its impact on the network, without discriminating between different protocols (Orchard, Sapling, or transparent). The impact on the network depends on the numbers of inputs and outputs.</p>
Expand Down
23 changes: 8 additions & 15 deletions zip-0317.rst
Expand Up @@ -91,14 +91,14 @@ Fee calculation
This specification defines several parameters that are used to calculate the
conventional fee:

===================================== ==============================================
Parameter Units
===================================== ==============================================
:math:`marginal\_fee` zatoshis per logical action (as defined below)
:math:`grace\_actions` logical actions
:math:`p2pkh\_standard\_input\_size` bytes
:math:`p2pkh\_standard\_output\_size` bytes
===================================== ==============================================
===================================== ============= ==============================================
Parameter Value Units
===================================== ============= ==============================================
:math:`marginal\_fee` :math:`5000` zatoshis per logical action (as defined below)
:math:`grace\_actions` :math:`2` logical actions
:math:`p2pkh\_standard\_input\_size` :math:`150` bytes
:math:`p2pkh\_standard\_output\_size` :math:`34` bytes
===================================== ============= ==============================================

Wallets implementing this specification SHOULD use a conventional fee
calculated in zatoshis per the following formula:
Expand Down Expand Up @@ -128,13 +128,6 @@ Input Units Description
:math:`nActionsOrchard` number the number of Orchard actions
============================ ====== ===========================================

The parameters are set to the following values:

* :math:`marginal\_fee = 5000`;
* :math:`grace\_actions = 2`;
* :math:`p2pkh\_standard\_input\_size = 150` bytes;
* :math:`p2pkh\_standard\_output\_size = 34` bytes.

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.
Expand Down

0 comments on commit ce4f564

Please sign in to comment.