zebra icon indicating copy to clipboard operation
zebra copied to clipboard

Fix future compatibility of address RPCs with unknown unified receivers

Open teor2345 opened this issue 1 year ago • 2 comments

Motivation

Unknown unified receivers are valid according to the spec, but Zebra's RPCs reject them.

Unified addresses are designed to be forwards-compatible, so new or experimental receiver types can be added at any time. In this case, we can ignore them because the RPC doesn't have fields for them.

Originally posted by @teor2345 in https://github.com/ZcashFoundation/zebra/pull/6185#discussion_r1112266164

Specifications

Every Wallet must properly parse a Unified Address or Unified Viewing Key containing unrecognized Items. A Wallet may process unrecognized Items by indicating to the user their presence or similar information for usability or diagnostic purposes. ... When executing a Transfer the Sender selects a Receiver via a Selection process. Given a valid UA, Selection must treat any unrecognized Item as though it were absent. This property is crucial for forward compatibility to ensure users who upgrade to newer protocols / UAs don't lose the ability to smoothly interact with older wallets.

https://zips.z.cash/zip-0316#receivers

Complex Code or Requirements

ZIP-316 is reasonably complex, but this particular bug is not consensus-critical. (It causes an error, not a consensus split.)

Testing

We don't have test vectors for this yet, and it might not be worth the effort of creating them.

Related Work

Follow up to:

  • #6185

teor2345 avatar Feb 20 '23 19:02 teor2345