Add wallet_transparent_coinbase_balance test; support post-beta.1 zallet encryption init#174
Open
pacu wants to merge 7 commits into
Open
Add wallet_transparent_coinbase_balance test; support post-beta.1 zallet encryption init#174pacu wants to merge 7 commits into
pacu wants to merge 7 commits into
Conversation
Add the lightwallet-protocol proto definitions and generated Python gRPC stubs used by future gRPC parity tests. Include the grpcio/protobuf dependencies and a helper script for regenerating the stubs. Co-Authored-By: OpenAI Codex <codex@openai.com>
Add framework support for starting lightwalletd and standalone zcashd fixtures, then add a manual gRPC parity test comparing zainod and lightwalletd responses. Include cached regtest fixtures and documentation so the test can run locally without rebuilding the fixture chain every time. Co-Authored-By: OpenAI Codex <codex@openai.com>
Build and package lightwalletd for integration tests, use the uv-managed environment in RPC jobs, and register grpc_comparison.py in the RPC test matrix. Keep the workflow changes separate from the manual test so reviewers can evaluate CI enablement independently. Co-Authored-By: OpenAI Codex <codex@openai.com>
…nbase split and z_listunspent generated flag Integration test for zcash/zallet#635: z_getbalances now splits each account's transparent pool into regular (non-coinbase) and coinbase buckets, with immature coinbase under pending and mature coinbase under spendable, and folds transparent value into the account total. z_listunspent transparent entries gain a boolean "generated" flag (absent on shielded entries), while immature coinbase stays excluded from z_listunspent and z_gettotalbalance semantics are unchanged. The test drives four phases against the Z3 stack: immature-only coinbase, matured coinbase, a regular UTXO created by shielding and then sending back to a second wallet-owned taddr, and a final z_gettotalbalance cross-check. Registered in NEW_SCRIPTS. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017WB1TU6tyLmMa1n4SQ9XgK
…ncryption Zallet after 0.1.0-beta.1 requires an age encryption identity to exist before init-wallet-encryption succeeds (zcash/zallet#621 made recipient initialization atomic and moved identity generation to a dedicated generate-encryption-identity subcommand). Run it first at every wallet provisioning site, tolerating failure so older zallet binaries (which lack the subcommand and generate the identity inside init-wallet-encryption) keep working. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017WB1TU6tyLmMa1n4SQ9XgK
…re sending z_gettotalbalance's private field counts pending value, so polling it is not sufficient before z_sendmany: the freshly-shielded note must become spendable (zcash/zallet#316 lag) or the send fails with insufficient balance. Poll the shielded spendable buckets from z_getbalances, with ZIP-317 fee headroom, before proposing the send. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017WB1TU6tyLmMa1n4SQ9XgK
pacu
marked this pull request as ready for review
July 17, 2026 13:19
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #173.
Summary
End-to-end regtest coverage for zcash/zallet#639 / zcash/librustzcash#2654 (the fix for zcash/zallet#635), plus a framework compatibility fix for zallet builds after 0.1.0-beta.1.
New test:
qa/rpc-tests/wallet_transparent_coinbase_balance.py(registered inNEW_SCRIPTS), single zebrad+zainod node with a wallet-owned miner address, four phases:z_getbalancesreports it undertransparent.coinbase.pending(zero spendable, noregularkey);z_listunspentshows no coinbase entries (upstream maturity clause).coinbase.spendableequals the mature UTXO sum to the zatoshi;total.spendable/total.pendingequal the sum of parts bucket-by-bucket; every transparent entry hasgenerated == true.z_shieldcoinbase→z_sendmanyz→t to a second wallet taddr; the new UTXO lands inregular.spendableonly,z_listunspentreports it withgenerated == false, shielded entries carry nogeneratedkey.z_gettotalbalance.transparentequals the regular+coinbase bucket totals.Framework fix:
init_wallet_encryptionhelper — zallet after 0.1.0-beta.1 requiresgenerate-encryption-identitybeforeinit-wallet-encryption(zcash/zallet#621). All three wallet-provisioning sites now run it first, tolerating older binaries that lack the subcommand. Without this, wallet prep silently produces an empty miner address and zebrad fails to start.Verification
Full run against locally-built zallet from the zcash/zallet#639 branch (zaino backend): all four phases pass.
pyflakes qaandtest/lint/lint-whitespace.shclean.Note: the new test requires a zallet build containing zcash/zallet#639; against current release binaries the split assertions will fail (by design).
🤖 Generated with Claude Code
https://claude.ai/code/session_017WB1TU6tyLmMa1n4SQ9XgK