Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: framework for wallet cpp <> live daemon tests #9547

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

j-berman
Copy link
Collaborator

This adds a new functional test for direct wallet2 -> live RPC daemon interactions. The functional RPC tests currently test a wallet RPC -> live RPC daemon (to be clear, the functional tests currently use the wallet RPC as opposed to directly using wallet2 as this PR introduces).

The initial motivation for this framework was testing the new Seraphis lib async scanner with a live daemon (source). I used wallet2 as a base test to demonstrate the async scanner achieves the same expected results. The async scanner was/is a large enough component in and of itself that warranted direct testing with a live daemon (plus, setting up the wallet RPC to use the async scanner is its own significant task that is likely to take months of work, and testing the async scanner with a daemon in isolation enables smoother incremental progress).

More recently, @SNeedlewoods began an effort to add functions to the wallet API as part of a larger effort to deprecate wallet2 and replace it with the wallet API (#9464). In the latest "Monero Tech" (/"No Wallet Left Behind") working group meeting, @SNeedlewoods mentioned they would like a test framework to test the wallet API with a live daemon. They started using the existing libwallet API tests, however, those tests require manually starting daemons and running bash scripts. The reason I chose to implement this framework as part of the existing functional test framework is that there is already an automated setup established to start live daemons and execute daemon commands. I figure @SNeedlewoods may find it useful to reuse this framework to test their work as well.

I can keep this PR in draft status until another dependent PR wants it merged, since it's not testing anything uncovered by existing tests as is.

Note: this PR would also significantly reduce the diff and review burden for the async scanner (UkoeHB#23) when that is ready to be PR'd to the main repo.

Useful for tests, similar API to utils/python-rpc/framework/daemon.py
Adds a new functional test for direct wallet2 -> live RPC daemon
interactions. This sets up a framework to test pointing a wallet
lib written in C++ to a live daemon.

Tests sending and scanning:
- a normal transfer
- a sweep single (0 change)
- to a single subaddress
- to 3 subaddresses (i.e. scanning using additional pub keys)
@j-berman j-berman marked this pull request as draft October 29, 2024 19:34
@selsta selsta added the tests label Oct 29, 2024
SNeedlewoods pushed a commit to SNeedlewoods/seraphis_wallet that referenced this pull request Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants