Skip to content

test: zebra zcashd compat tests#5

Merged
p0mvn merged 1 commit into
mainfrom
roman/zcashd-wrap-tests
Jun 13, 2026
Merged

test: zebra zcashd compat tests#5
p0mvn merged 1 commit into
mainfrom
roman/zcashd-wrap-tests

Conversation

@p0mvn

@p0mvn p0mvn commented Jun 13, 2026

Copy link
Copy Markdown

Summary

Adds an opt-in zcashd-compat stack profile to the integration-test harness: each test "node" becomes a paired regtest stack of zebrad + zcashd -zebra-compat (P2P disabled, ingesting blocks from zebrad over JSON-RPC).

This lets the repo run zcashd RPC/wallet coverage against a stack where zebrad owns consensus, serving the
"benchmark for the replacement stack" intent for the parts that still depend on the zcashd wallet/RPC surface.

Motivation

Many migrated tests sit in DISABLED_SCRIPTS because they exercise zcashd RPCs with no zallet equivalent yet (key export/import, legacy wallet history, HTTP basic auth, chainstate/reorg behavior). This profile runs the real zcashd wallet/RPC surface against zebrad-driven consensus, so that behavior can be validated and used as a completeness benchmark while the Z3 stack (zallet/zainod) converges.

What this adds

Harness support (qa/rpc-tests/test_framework/)

  • zcashd_compat.py: proxy that routes P2P/topology RPCs and generate to zebrad and everything else to zcashd, paired startup, static MINER_KEYS funding, ZebraArgs.activation_heights ↔ zcashd-nuparams translation, and a zebrad-datadir-only chain cache builder.
  • util.py: process management utilities
  • test_framework.py: custom edits/wiring to enable zcashd compat

Tests (ZCASHD_COMPAT_SCRIPTS, run single-threaded) — 7 profile-native + 2 re-enabled:

Test Covers
zcashd_compat_smoke.py Ingestion, wallet credit, sendtoaddress, forwarding into zebra's mempool, confirmation, tip equality (2 nodes)
zcashd_compat_identity.py getzebracompatinfo health/identity: service/sync state, reachability, identity, genesis/tip agreement
zcashd_compat_reorg.py Chain reorg following at depths 3 and 25, orphaned valid-fork with −1 confirmations
zcashd_compat_reorg_wallet.py A confirmed wallet tx survives a competing-chain reorg: re-mined into the new chain, no double-count
zcashd_compat_persistence.py -zebra-compat-flush-interval=1 flushes chainstate to the tip; survives a SIGKILL + zcashd-only restart
zcashd_compat_wallet.py Single-node mutative wallet round-trip + read surface (gettransaction/listunspent/listtransactions, dumpprivkey)
zcashd_compat_wallet_import.py Cross-wallet dumpprivkeyimportprivkey with rescan reconstructs the UTXO set (2-node direct delivery)
multi_rpc.py zcashd RPC basic-auth surface
keypool.py Keypool refill + encryptwallet/restart path

CI (.github/workflows/ci.yml): downloads a SHA256-pinned zcashd release artifact and runs the tests.

Docs: qa/zcashd-compat/README.md (profile design, per-test coverage, scope & non-goals), plus qa/README.md and the book's running-tests page.

Test evidence

Full suite green locally, single-threaded (matching CI): 9/9 pass. New tests additionally stress-looped in isolation: wallet 10/10, wallet_import 5/5, reorg_wallet 5/5, persistence 5/5. Without --zcashd-compat, the executed test list is unchanged.

AI Disclosure

This contribution was prepared with assistance from Claude Code (Anthropic). The author is solely responsible for the change. Per AGENTS.md, the commit(s) carry a Co-Authored-By: trailer identifying the AI agent.

Co-Authored-By: Claude <noreply@anthropic.com>
@p0mvn
p0mvn force-pushed the roman/zcashd-wrap-tests branch from 93aca42 to b078eff Compare June 13, 2026 18:29
@p0mvn
p0mvn merged commit cafd726 into main Jun 13, 2026
33 of 36 checks passed
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.

1 participant