Skip to content

rpc: add conformance coverage for wallet RPC methods that mirror Zebra/zcashd #450

@peter941221

Description

@peter941221

I think the recent wallet RPC bug reports point to one shared gap: Zallet does not yet have regression coverage for response-shape compatibility on wallet RPC methods that intentionally mirror Zebra or zcashd.

Evidence from the current open issue cluster:

  1. rpc(z_viewtransaction): SqliteFailure "no such column: tx" for all wallet-owned transactions #440 reports that z_viewtransaction fails outright for wallet-owned transactions because the wallet-side query path is missing coverage.
  2. rpc(z_listunspent): address field absent on walletInternal=true change outputs #441 reports that z_listunspent omits the address field on walletInternal change outputs, which breaks typed clients that treat the response schema as stable.
  3. rpc(getrawtransaction): reply omits in_active_chain and vjoinsplit relative to Zebra #442 reports that getrawtransaction omits in_active_chain and vjoinsplit relative to Zebra for the same txid and verbosity.

These look different on the surface, but they have the same downstream effect: client code that treats same-named wallet RPC methods as stable adapters over Zebra or zcashd behavior has to learn Zallet-specific exceptions one bug at a time.

I think we should add explicit conformance coverage for the wallet RPC methods where response-shape compatibility matters most to downstream consumers. My suggestion is to start with the methods that already have open shape or serialization bugs:

  1. getrawtransaction
  2. z_listunspent
  3. z_viewtransaction

I am not proposing that every field must be byte-for-byte identical to every backend forever. I am proposing that for methods intentionally exposed under the same names, we should have regression tests that lock the fields and invariants that client code is expected to rely on.

A concrete first step would be:

  1. add focused regression tests for the current failures in rpc(z_viewtransaction): SqliteFailure "no such column: tx" for all wallet-owned transactions #440, rpc(z_listunspent): address field absent on walletInternal=true change outputs #441, and rpc(getrawtransaction): reply omits in_active_chain and vjoinsplit relative to Zebra #442;
  2. group those tests under a small wallet RPC conformance area so future parity regressions land in one place;
  3. document any intentional divergences when the wallet cannot or should not match Zebra or zcashd.

If this direction makes sense, I can put together the first patch starting with #442 and the associated regression coverage.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions