tests(wallet): Add initial framework to test zallet RPC methods#9554
Merged
Conversation
Contributor
There was a problem hiding this comment.
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. |
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.
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:
Tests
Build Zebra with the
ZALLETenv var set:Then run the wallet test from inside the zebra-rpc directory:
Follow-up Work
migrate_zcashd_walletcommand. zcash/wallet#152)addnodeRPC method #9555)stopRPC method zcash/wallet#153)getwalletinfozcash/wallet#55)PR Checklist