Skip to content

qa: rewrite wallet_z_sendmany for the Z3 stack and re-enable it#147

Open
dannywillems wants to merge 3 commits into
mainfrom
dw/wallet-z-sendmany-z3
Open

qa: rewrite wallet_z_sendmany for the Z3 stack and re-enable it#147
dannywillems wants to merge 3 commits into
mainfrom
dw/wallet-z-sendmany-z3

Conversation

@dannywillems

@dannywillems dannywillems commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Was initially part of !145 as sendmany and sendfromaccount share some logic.


The historical zcashd z_sendmany test relied on RPCs zallet does not implement (z_exportviewingkey, sendtoaddress, the getwalletinfo shielded-balance fields, sapling z_getnewaddress) and on a pre-NU5 regtest chain, so it was disabled pending migration.

Rewrite it against zebrad + zaino + zallet, preserving the coverage that remains meaningful on the Z3 regtest (NU5+ active from height 1): argument validation, a shielded Orchard happy path, multi-recipient sends, and the privacy-policy gating that is the core of z_sendmany (a transparent recipient is refused by default and allowed with AllowRevealedRecipients; a memo to a transparent recipient is rejected). The account is funded via z_shieldcoinbase, the source is an account UA, and the mandatory-null fee is exercised. Because zallet still maps some backend errors to a non-zcashd shape, the privacy-gating tests assert the success/failure outcome rather than pinning exact wording; the synchronous parse errors, which are stable, are asserted exactly.

Move the test out of DISABLED_SCRIPTS and BASE_SCRIPTS into the Z3-stack NEW_SCRIPTS group.

dannywillems and others added 2 commits July 1, 2026 14:14
The historical zcashd z_sendmany test relied on RPCs zallet does not
implement (z_exportviewingkey, sendtoaddress, the getwalletinfo
shielded-balance fields, sapling z_getnewaddress) and on a pre-NU5
regtest chain, so it was disabled pending migration.

Rewrite it against zebrad + zaino + zallet, preserving the coverage that
remains meaningful on the Z3 regtest (NU5+ active from height 1):
argument validation, a shielded Orchard happy path, multi-recipient
sends, and the privacy-policy gating that is the core of z_sendmany
(a transparent recipient is refused by default and allowed with
AllowRevealedRecipients; a memo to a transparent recipient is rejected).
The account is funded via z_shieldcoinbase, the source is an account UA,
and the mandatory-null fee is exercised. Because zallet still maps some
backend errors to a non-zcashd shape, the privacy-gating tests assert
the success/failure outcome rather than pinning exact wording; the
synchronous parse errors, which are stable, are asserted exactly.

Move the test out of DISABLED_SCRIPTS and BASE_SCRIPTS into the
Z3-stack NEW_SCRIPTS group.

Co-Authored-By: Claude <noreply@anthropic.com>
Add a TODO documenting the privacy policies not yet covered by the Z3
rewrite (AllowRevealedSenders, AllowRevealedAmounts, AllowLinking-
AccountAddresses, NoPrivacy), blocked until zallet can spend
transparent/coinbase and Sapling sources in z_sendmany.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@dannywillems

Copy link
Copy Markdown
Contributor Author

We might deprecate sendmany when sendfromaccount is added. Still making this test passing as I'm working on sendfromaccount.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants