zcash / zips

Zcash Improvement Proposals
https://zips.z.cash
MIT License
268 stars 152 forks source link

Allow Orchard funding stream addresses #524

Open teor2345 opened 3 years ago

teor2345 commented 3 years ago

As of 21 June 2021, the Zcash protocol spec only allows Transparent and Sapling funding stream addresses.

But Orchard outputs are allowed in coinbase transactions. So they should also be allowed for funding stream outputs in coinbase transactions.

F93E6F33-EF28-4271-8A0D-81A65EAF79C8

daira commented 3 years ago

I agree; this is an oversight.

str4d commented 3 years ago

It is certainly one of intended outcomes of allowing Orchard outputs in coinbase transactions. Note however that we would require a consensus rule change anyway to alter the funding stream addresses, so this particular change could have been made at that time.

daira commented 3 years ago

It should be consistent with Sapling. There's a minor technical problem in that the type of fs.AddressList is a sequence of strings (see ZIP 214), and there is no direct string form of an Orchard address; it would be complicated to use a unified address. However we can easily change the type to be a raw address, with a corresponding change to ZIP 214. Since we're very busy at the moment and it's not urgent, I'll defer that to a future version.

str4d commented 3 years ago

I would prefer that we use a Unified Address that we place additional restrictions on (if any, for simplicity). Those restrictions don't actually matter, since we'd be hard-coding the addresses anyway (which would most likely just be single-receiver Orchard addresses, as we will end up using elsewhere in zcashd to represent standalone Orchard addresses).