Skip to content
Merged
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
34 changes: 29 additions & 5 deletions zip-0227.html
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,13 @@
<section id="issuance-action-description"><h3><span class="section-heading">Issuance Action Description</span><span class="section-anchor"> <a rel="bookmark" href="#issuance-action-description"><img width="24" height="24" class="section-anchor" src="assets/images/section-anchor.png" alt=""></a></span></h3>
<p>An issuance action, <cite>IssueAction</cite>, is the instance of issuing a specific custom Asset, and contains the following fields:</p>
<ul>
<li>
<span class="math">\(\mathsf{assetDescSize}\)</span>
: the size of the Asset description, a number between
<span class="math">\(0\)</span>
and
<span class="math">\(512\)</span>
, stored in two bytes.</li>
<li>
<span class="math">\(\mathsf{asset\_desc}\)</span>
: the Asset description, a UTF-8 encoded string of up to 512 bytes</li>
Expand Down Expand Up @@ -208,13 +215,25 @@
</tr>
</thead>
<tbody>
<tr>
<td>2 bytes</td>
<td>
<span class="math">\(\mathsf{assetDescSize}\)</span>
</td>
<td>byte</td>
<td>The length of the
<span class="math">\(\mathsf{asset\_desc}\)</span>
string in bytes</td>
</tr>
<tr>
<td>Varies</td>
<td>
<span class="math">\(\mathsf{asset\_desc}\)</span>
</td>
<td>byte</td>
<td>UTF-8 encoded string of varied size, up to 512 bytes</td>
<td>UTF-8 encoded string, of size
<span class="math">\(\mathsf{assetDescSize}\)</span>
bytes</td>
</tr>
<tr>
<td>Varies</td>
Expand Down Expand Up @@ -247,7 +266,7 @@
<span class="math">\(\mathsf{AssetId}\)</span>
is properly associated with the issuer.</li>
<li><cite>actions</cite>: an array of issuance actions, of type <cite>IssueAction</cite>.</li>
<li><cite>authorization</cite>: the signature of the transaction SIGHASH, signed by the issuance authorizing key,
<li><cite>issueAuthSig</cite>: the signature of the transaction SIGHASH, signed by the issuance authorizing key,
<span class="math">\(\mathsf{isk}\)</span>
, that validates the issuance .</li>
</ul>
Expand Down Expand Up @@ -284,7 +303,7 @@
</tr>
<tr>
<td>64</td>
<td>authorization</td>
<td>issueAuthSig</td>
<td>byte[64]</td>
<td>The signature of the transaction SIGHASH, signed by the issuer</td>
</tr>
Expand Down Expand Up @@ -339,13 +358,18 @@
<section id="consensus-rule-changes"><h3><span class="section-heading">Consensus Rule Changes</span><span class="section-anchor"> <a rel="bookmark" href="#consensus-rule-changes"><img width="24" height="24" class="section-anchor" src="assets/images/section-anchor.png" alt=""></a></span></h3>
<p>For the IssueBundle:</p>
<ul>
<li>Verify the RedPallas-based issuance authorization signature on <cite>SIGHASH</cite>, <cite>authorization</cite>, is verified by invoking <cite>authorization.VerifySig(ik, SIGHASH)</cite></li>
<li>Verify the RedPallas-based issuance authorization signature on <cite>SIGHASH</cite>, <cite>issueAuthSig</cite>, is verified by invoking <cite>issueAuthSig.VerifySig(ik, SIGHASH)</cite></li>
</ul>
<p>For each <cite>IssueAction</cite> in <cite>IssueBundle</cite>:</p>
<ul>
<li>check that
<span class="math">\(0 &lt; \mathsf{assetDescSize} &lt;= 512\)</span>
.</li>
<li>check that
<span class="math">\(\mathsf{asset\_desc}\)</span>
is a string with <cite>0 &lt; byte size &lt;= 512</cite>.</li>
is a string of length
<span class="math">\(\mathsf{assetDescSize}\)</span>
bytes.</li>
<li>retrieve
<span class="math">\(\mathsf{AssetBase}\)</span>
from the first note in the sequence and check that
Expand Down
13 changes: 8 additions & 5 deletions zip-0227.rst
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ Issuance Action Description

An issuance action, `IssueAction`, is the instance of issuing a specific custom Asset, and contains the following fields:

- :math:`\mathsf{assetDescSize}`: the size of the Asset description, a number between :math:`0` and :math:`512`, stored in two bytes.
- :math:`\mathsf{asset\_desc}`: the Asset description, a UTF-8 encoded string of up to 512 bytes
- `notes`: an array containing the unencrypted output notes of the recipients of the Asset, of type `Note`
- ``finalize``: a boolean that defines whether the issuance of that specific custom Asset is finalized or not
Expand All @@ -178,7 +179,8 @@ An asset's :math:`\mathsf{AssetId}` is added to the :math:`\mathsf{previously\_f
================= =============================== ========================== ===========================================================================================
Size Name Data Type Description
================= =============================== ========================== ===========================================================================================
Varies :math:`\mathsf{asset\_desc}` byte UTF-8 encoded string of varied size, up to 512 bytes
2 bytes :math:`\mathsf{assetDescSize}` byte The length of the :math:`\mathsf{asset\_desc}` string in bytes
Varies :math:`\mathsf{asset\_desc}` byte UTF-8 encoded string, of size :math:`\mathsf{assetDescSize}` bytes
Varies nNotes compactSize The number of notes in the issuance action
noteSize * nNotes vNotes Note[nNotes] A sequence of note descriptions within the issuance action
1 byte ``flagsIssuance`` byte An 8-bit value with the ``finalize`` boolean value as the LSB, and the other bits set to 0.
Expand All @@ -193,7 +195,7 @@ An issuance bundle, `IssueBundle`, is the aggregate of all the issuance-related

- :math:`\mathsf{ik}`: the issuance validating key, that allows the validators to verify that the :math:`\mathsf{AssetId}` is properly associated with the issuer.
- `actions`: an array of issuance actions, of type `IssueAction`.
- `authorization`: the signature of the transaction SIGHASH, signed by the issuance authorizing key, :math:`\mathsf{isk}`, that validates the issuance .
- `issueAuthSig`: the signature of the transaction SIGHASH, signed by the issuance authorizing key, :math:`\mathsf{isk}`, that validates the issuance .

The issuance bundle is then added within the transaction format as a new bundle. That is, issuance requires the addition of the following information to the transaction format [#protocol-transactionstructure]_.

Expand All @@ -203,7 +205,7 @@ Bytes Name Data Type Description
Varies nIssueActions compactSize The number of issuance actions in the bundle
Varies vIssueActions IssueAction[nIssueActions] A sequence of issuance actions descriptions
32 :math:`\mathsf{ik}` byte[32] The issuance validating key of the issuer, used to validate the signature
64 authorization byte[64] The signature of the transaction SIGHASH, signed by the issuer
64 issueAuthSig byte[64] The signature of the transaction SIGHASH, signed by the issuer
======= ==================== ========================== =========================================================================

Issuance Protocol
Expand Down Expand Up @@ -237,11 +239,12 @@ Consensus Rule Changes

For the IssueBundle:

- Verify the RedPallas-based issuance authorization signature on `SIGHASH`, `authorization`, is verified by invoking `authorization.VerifySig(ik, SIGHASH)`
- Verify the RedPallas-based issuance authorization signature on `SIGHASH`, `issueAuthSig`, is verified by invoking `issueAuthSig.VerifySig(ik, SIGHASH)`

For each `IssueAction` in `IssueBundle`:

- check that :math:`\mathsf{asset\_desc}` is a string with `0 < byte size <= 512`.
- check that :math:`0 < \mathsf{assetDescSize} <= 512`.
- check that :math:`\mathsf{asset\_desc}` is a string of length :math:`\mathsf{assetDescSize}` bytes.
- retrieve :math:`\mathsf{AssetBase}` from the first note in the sequence and check that :math:`\mathsf{AssetBase}` is derived from the issuance validating key :math:`\mathsf{ik}` and :math:`\mathsf{asset\_desc}` as described in the `Asset Identifier`_ section.
- check that the :math:`\mathsf{AssetId}` does not exist in the ``previously_finalized`` set in the global state.
- check that every note in the `IssueAction` contains the same :math:`\mathsf{AssetBase}` and is properly constructed as :math:`note = (\mathsf{g_d, pk_d, v, \rho, \psi, AssetBase})`.
Expand Down