From a756260c051d40138d147ca75663e6d4a193778b Mon Sep 17 00:00:00 2001 From: Daira Hopwood Date: Sat, 29 May 2021 17:55:45 +0100 Subject: [PATCH] ZIP 239: mention `getdata` in Motivation. Signed-off-by: Daira Hopwood --- zip-0239.html | 2 +- zip-0239.rst | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/zip-0239.html b/zip-0239.html index fc37b473..9168bffc 100644 --- a/zip-0239.html +++ b/zip-0239.html @@ -26,7 +26,7 @@ Pull-Request: <https://githu

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.

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 3 in the NU5 network upgrade 5, 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.

For v5 transactions, a new transaction digest algorithm is defined that constructs the txid from a tree of hashes, which include only effecting data 4. Witness data is committed to by a separate "authorizing digest".

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.

diff --git a/zip-0239.rst b/zip-0239.rst index 43f4f67b..79642406 100644 --- a/zip-0239.rst +++ b/zip-0239.rst @@ -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,