Add a focused zcashd ZIP 317 fee bug repro test#91
Draft
pacu wants to merge 16 commits intozcash:mainfrom
Draft
Conversation
git-subtree-dir: lightwallet-protocol git-subtree-split: 23f0768ea4471b63285f3c0e9b6fbb361674aa2b
Closes zcash#83 Runs Zainod and Lightwalletd side-by-side against the same Zebrad node and compares their CompactTxStreamer gRPC responses. Covers 21 test cases across 15 RPC methods and integrates with the existing BitcoinTestFramework and CI pipeline. - `lightwallet-protocol/` — canonical proto source via `git subtree` from `zcash/lightwallet-protocol` v0.4.0 - `qa/rpc-tests/test_framework/proto/` — generated Python gRPC stubs committed so CI needs only `grpcio` at runtime - `scripts/generate_proto.sh` — regenerates stubs after a protocol version bump and fixes flat imports to relative - `util.py` / `test_framework.py` — Lightwalletd process lifecycle (`lwd_grpc_port`, `write_lwd_conf`, `start_lightwalletd`, `wait_for_lwd_start`, teardown) - `qa/rpc-tests/grpc_comparison.py` — test file - `qa/zcash/grpc_comparison_tests.py` — convenience runner - CI: `lightwalletd-interop-request` dispatch trigger, `build-lightwalletd` job, artifact download in `test-rpc` - Docs: README and book updated with prerequisites and run instructions 1. **`vtx` in compact blocks** — For blocks containing only transparent transactions, Zainod returns empty `vtx`; Lightwalletd includes them. Block comparison currently covers header fields only. 2. **gRPC error codes on out-of-bounds requests** — Zainod returns `OUT_OF_RANGE`; Lightwalletd returns `INVALID_ARGUMENT`. Tests assert only that both sides raise an error. - `GetMempoolTx` / `GetMempoolStream` (need wallet integration) - Shielded transaction coverage (need Zallet or chain cache) - Completed subtree roots (need 2^16 outputs per tree) - `SendTransaction`, darkside mode Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Fix flat import in service_pb2.pyi (relative import was missing, unlike the .py counterpart); extend generate_proto.sh to rewrite imports in .pyi files as well - Add missing height assertion in test_get_taddress_txids_lower - Add per-element data+height assertions in test_get_taddress_txids_upper (previously only checked stream length) - Add missing script and height assertions in test_get_address_utxos_stream to match the coverage in test_get_address_utxos - Fix gRPC channel leak in _wait_for_indexers: wrap channel lifecycle in try/finally and close both channels on exit - Pad chain to 100 blocks before starting indexers: Zainod requires a minimum of 100 blocks; the three mining phases only produce 36 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ddress config setmineraddress has been removed from this zcashd version, so the mining address must be set via zcash.conf; zcashd is restarted between phases. P2P block propagation is replaced by submitblock to sidestep known zcashd↔zebrad P2P issues (zebra#10329, #10332). Chain layout changes to match: Blocks 1–100 — Orchard coinbase (single zcashd restart with orchard_addr). Block 101 — z_sendmany confirmation: transparent + Sapling outputs in one tx. The Sapling tree is now correctly expected to be empty at Orchard-coinbase height and non-empty only after block 101. authproxy.py is fixed to accept both 'application/json' and 'application/json; charset=utf-8' so zcashd RPC calls no longer raise a content-type error.
This adds wallet_zip317_fee_repro.py, a small standalone zcashd repro for the Sapling-to-Orchard z_sendmany fee-selection failure that grpc_comparison.py surfaced. The test mirrors the wallet path that actually reached the bug in the gRPC fixture: - fund the Sapling receiver of a full UA on node 0, - restart the standalone sender wallet, - send from that UA to an Orchard-only UA on node 1 with AllowRevealedAmounts, - verify that ZIP_317_FEE fails with the unpaid action error, - verify that conventional_fee(4) succeeds for the same transaction shape. Builds atop zcash#84. Closes zcash#90.
7 tasks
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.
This adds wallet_zip317_fee_repro.py, a small standalone zcashd repro for
the Sapling-to-Orchard z_sendmany fee-selection failure that grpc_comparison.py surfaced
that was already documented in zcash/zcash#6956
The test mirrors the wallet path that actually reached the bug in the gRPC fixture:
Builds atop [#83] add: gRPC parity test suite (Zainod vs. Lightwalletd) #84.
Closes Create a test that reproduces Sapling-to-Orchard ZIP-317 fee bug #90.