zingolabs / zingolib

An API and test-app that exposes zcash functionality for app consumption
MIT License
15 stars 23 forks source link

`outgoing_tx_data.to_address` should not carry UA #758

Open AArnott opened 10 months ago

AArnott commented 10 months ago

Why is zingolib providing the compound UA in the to_address field, leaving the recipient_ua field empty for a transaction's outgoing_tx_data? I expected the to_address to always be the literal address used in the transaction, and if Zingolib is going to preserve the UA's other receivers in the change memo, that that would only appear under recipient_ua

image

AArnott commented 10 months ago

On matrix, altum suggested that the to_address is dropped on save and replaced with the value from recipient_ua. This is information lossy. It is not reconstructed on deserialization, and I'd argue cannot be, since the receiver that had previously been chosen cannot be reliably guessed from the many receivers in the UA later on, when perhaps zingolib supports more receiver types than it did when creating that transaction.