Skip to content

feat: add zallet-rpc-diff parity harness (MVP)#404

Open
CreativesOnchain wants to merge 11 commits intozcash:mainfrom
CreativesOnchain:feat/zallet-rpc-diff-milestone-1
Open

feat: add zallet-rpc-diff parity harness (MVP)#404
CreativesOnchain wants to merge 11 commits intozcash:mainfrom
CreativesOnchain:feat/zallet-rpc-diff-milestone-1

Conversation

@CreativesOnchain
Copy link
Copy Markdown

@CreativesOnchain CreativesOnchain commented Mar 26, 2026

Summary

This draft PR introduces the zallet-rpc-diff parity harness — a reproducible, production-grade CLI tool that compares zcashd and Zallet wallet JSON-RPC responses, classifying each method as MATCH / DIFF / MISSING / ERROR.

This addresses the upstream request in #16.


✅ MVP Deliverables

Design & Scaffolding

See tools/zallet-rpc-diff/DESIGN_NOTE.md which explicitly defines the result categories, report.json schema, and the versioned manifest.toml format.

Rust Crate + CLI Skeleton

  • zallet-parity-core — library with custom Error types and result categorization.
  • zallet-parity-cli — binary zallet-rpc-diff with clap v4, color-eyre, and tracing.
  • zallet-parity-testkit — test helpers suite.

CI Workflow

.github/workflows/zallet-rpc-diff.yml — scoped workspace checks (build, test, fmt, clippy).

Execution Engine & Reporting

Implemented an async runner in zallet-parity-core using tokio::task::JoinSet. It executes the entire manifest suite concurrently against both upstream and target endpoints.

Deep Semantic Comparison

Integrated assert-json-diff to perform recursive comparison of serde_json::Value responses. It correctly identifies differences while being resilient to key ordering.

Premium CLI & Reporting

  • Progress Tracking: Added indicatif progress bars for real-time feedback during large suites.
  • Reporting: Automatically generates report.json (for automation) and a human-readable report.md (for PR review).

Automated Verification Suite

Implemented a robust testing suite using wiremock in the testkit:

  • Unit Tests: Verify the parity logic for matches and diffs.
  • Integration Tests: Verify the E2E CLI workflow against mock RPC nodes.
  • Run with: cargo test --workspace

Questions for Maintainers

  1. Location: Is tools/zallet-rpc-diff/ acceptable, or would you prefer testing/zallet-rpc-diff/?
  2. Workspace membership: Should these crates be added to the root workspace members list, or kept as a self-contained sub-workspace?
  3. Method suite: The current manifest.toml is a sample; I'm happy to align the v1 allowlist with your priorities.

TODOs (Future Milestones)

  • Implement JSON-RPC execution engine (MVP)
  • Normalization + ignore paths
  • Expected-differences file
  • Method suite v1 + runbook

@CreativesOnchain CreativesOnchain changed the title feat: zallet rpc diff (milestone 1 & 2) feat: add zallet-rpc-diff parity harness (Milestones 1 & 2) Mar 26, 2026
- Add tools/zallet-rpc-diff workspace with three crates:
  - zallet-parity-core: library with custom Error types
  - zallet-parity-cli: binary (zallet-rpc-diff) with clap, color-eyre, tracing
  - zallet-parity-testkit: test helpers with wiremock
- Add DESIGN_NOTE.md defining MATCH/DIFF/MISSING/ERROR categories,
  report schema, and manifest format
- Add CI workflow (.github/workflows/zallet-rpc-diff.yml)
- All crates compile cleanly in the workspace

This satisfies Milestone 1 deliverables:
  - Clearly defined report format and manifest structure
  - Rust crate + CLI skeleton ready for maintainer review
@CreativesOnchain CreativesOnchain force-pushed the feat/zallet-rpc-diff-milestone-1 branch from bb258ae to 84e8790 Compare March 26, 2026 16:09
@CreativesOnchain CreativesOnchain changed the title feat: add zallet-rpc-diff parity harness (Milestones 1 & 2) feat: add zallet-rpc-diff parity harness (MVP) Mar 26, 2026
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