ZIP 239: mention `getdata` in Motivation.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
Daira Hopwood 2021-05-29 17:55:45 +01:00
parent 16f48e70d2
commit a756260c05
2 changed files with 4 additions and 3 deletions

View File

@ -26,7 +26,7 @@ Pull-Request: &lt;<a href="https://github.com/zcash/zips/pull/516">https://githu
<p>This ZIP describes changes to the Zcash peer-to-peer protocol to support transaction relay based on a transaction's authorizing digest as well as its txid.</p>
</section>
<section id="motivation"><h2><span class="section-heading">Motivation</span><span class="section-anchor"> <a rel="bookmark" href="#motivation"><img width="24" height="24" src="assets/images/section-anchor.png" alt=""></a></span></h2>
<p>Historically, as in Bitcoin, the <code>inv</code> messages sent on the Zcash peer-to-peer network to announce transactions have referred to those transactions by their txid.</p>
<p>Historically, as in Bitcoin, the <code>inv</code> and <code>getdata</code> messages sent on the Zcash peer-to-peer network to announce or request transactions have referred to those transactions by txid.</p>
<p>Prior to the introduction of v5 transactions <a id="id5" class="footnote_reference" href="#zip-0225">3</a> in the NU5 network upgrade <a id="id6" class="footnote_reference" href="#zip-0252">5</a>, a txid was always defined as the SHA-256d hash of the transaction data, the encoding of which is the same in block data and in the peer-to-peer protocol.</p>
<p>For v5 transactions, a new transaction digest algorithm is defined that constructs the txid from a tree of hashes, which include only effecting data <a id="id7" class="footnote_reference" href="#zip-0244">4</a>. Witness data is committed to by a separate "authorizing digest".</p>
<p>Not committing to the witness data in v5 transaction announcements would create inefficiencies: because a v5 transaction's witness can be malleated without altering the txid, a node in receipt of a v5 transaction that the node does not accept would generally still have to download that same transaction when announced by other peers. This is because the alternative — of not downloading a v5 transaction with a given txid after rejecting a previous transaction with that txid — would allow a third party to interfere with transaction relay by malleating a transaction's witness and announcing the resulting invalid transaction to nodes, preventing relay of the valid version of the transaction as well.</p>

View File

@ -39,8 +39,9 @@ relay based on a transaction's authorizing digest as well as its txid.
Motivation
==========
Historically, as in Bitcoin, the ``inv`` messages sent on the Zcash peer-to-peer
network to announce transactions have referred to those transactions by their txid.
Historically, as in Bitcoin, the ``inv`` and ``getdata`` messages sent on the Zcash
peer-to-peer network to announce or request transactions have referred to those
transactions by txid.
Prior to the introduction of v5 transactions [#zip-0225]_ in the NU5 network upgrade
[#zip-0252]_, a txid was always defined as the SHA-256d hash of the transaction data,