zcash / zcash

Zcash - Internet Money

Home Page:https://z.cash/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wallet tx builder will add spurious Orchard bundles for v6+ transaction versions

str4d opened this issue · comments

&& (InvolvesOrchard() || nPreferredTxVersion > ZIP225_MIN_TX_VERSION)

I suspect that the > here was intended to be a >= (inverting a < in equivalent logic elsewhere), but it actually means we do the right thing for the current network: if a transaction doesn't involve Orchard, we don't add an Orchard anchor (and thus no Orchard bundle). However, once zcashd has v6 or later transaction versions, the effect of this will be that for transactions without any Orchard spends or outputs, an Orchard bundle with two completely dummy actions will get added (because the orchard crate's builder, at least as of 0.6.0, always pads bundles to two actions even if there are no spends or outputs, and the C++ builder creates an Orchard bundle builder if an Orchard anchor is provided).