Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
str4d opened this issue Dec 12, 2023 · 0 comments
Labels
A-orchard Area: Orchard protocol A-wallet Area: Wallet C-cleanup Category: PRs that clean code up or issues documenting cleanup.

Comments

@str4d
Copy link
Contributor

str4d commented Dec 12, 2023

&& (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).

@str4d str4d added A-wallet Area: Wallet C-cleanup Category: PRs that clean code up or issues documenting cleanup. A-orchard Area: Orchard protocol labels Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-orchard Area: Orchard protocol A-wallet Area: Wallet C-cleanup Category: PRs that clean code up or issues documenting cleanup.
Projects
None yet
Development

No branches or pull requests

1 participant