Skip to content

tests(wallet): Add initial framework to test zallet RPC methods#9554

Merged
mergify[bot] merged 15 commits into
mainfrom
qa-zallet
Jun 9, 2025
Merged

tests(wallet): Add initial framework to test zallet RPC methods#9554
mergify[bot] merged 15 commits into
mainfrom
qa-zallet

Conversation

@oxarbitrage
Copy link
Copy Markdown
Contributor

@oxarbitrage oxarbitrage commented May 27, 2025

Motivation

We want to run wallet-related tests from Zebra using the new zebra-zaino-zallet stack. These tests are Python-based and were originally ported from zcashd. While we previously updated the test framework to use zebrad instead of zcashd, most of the tests require wallet functionality, which was not clearly defined until recently. With recent progress, we now have a clearer path for integrating these features.

Closes #9296

Solution

This PR is the foundation for running wallet RPC tests in the new stack:

  • Build the zallet binary within Zebra when the env var is set.
  • Add Python helpers to start wallet instances with default configurations and a regtest Rage identity.
  • Add the initial version of the wallet.py test, based on zcash/qa/rpc-tests/wallet.py.

Tests

Build Zebra with the ZALLET env var set:

ZALLET=1 cargo build

Then run the wallet test from inside the zebra-rpc directory:

./qa/pull-tester/rpc-tests.py wallet.py

Follow-up Work

PR Checklist

  • The PR name is suitable for the release notes.
  • The solution is tested.
  • The documentation is up to date.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR lays the groundwork for wallet RPC tests using the new zebra-zaino-zallet stack in Zebra. Key changes include the addition of a zallet configuration file and identity file, the implementation of Python wallet RPC test helpers (with a basic wallet test), and updates to the build script to clone and build the external zallet repository.

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
zebra-rpc/qa/zallet-datadir/zallet.toml New configuration file for wallet regtest settings.
zebra-rpc/qa/zallet-datadir/identity.txt Adds an identity file with a generated key for testing.
zebra-rpc/qa/rpc-tests/wallet.py Introduces the initial Python-based wallet RPC test based on zcashd tests.
zebra-rpc/qa/rpc-tests/test_framework/util.py Adds wallet start/stop utilities and configuration update functions.
zebra-rpc/qa/rpc-tests/test_framework/proxy.py Updates JSON-RPC protocol version from 1.0 to 2.0.
zebra-rpc/qa/pull-tester/rpc-tests.py Extends the test runner to include the new wallet test.
zebra-rpc/qa/README.md Updates instructions for building and running wallet tests.
zebra-rpc/build.rs Adds cloning and building of the external zallet binary when enabled.

Copy link
Copy Markdown
Contributor

@arya2 arya2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-compatibility Area: Compatibility with other nodes or wallets, or standard rules C-testing Category: These are tests

Projects

No open projects
Status: Won't Fix

Development

Successfully merging this pull request may close these issues.

Integrate zallet into zebra's qa tests

4 participants