#35342 test: fuzz wallet_rpc target
| Reviewability | Reviews | Agreement | Size | |||||||
|---|---|---|---|---|---|---|---|---|---|---|
| #35342 test: fuzz wallet_rpc target | Waiting on author | 0 -1 | Mild | 0 + 530 tests | ||||||
|
|
|
|
| ||||||
Reviewability: ReadyStalePaused Agreement: StrongPositivePositive w/ caveatsNeutralMildDisputedBlockedCrickets Reviews: current code-review ACKs, then (+stale ACKs) and -NACKs; greener = more ACKs. Size: lines added or modified outside tests, then in tests; greener = smaller. | ||||||||||
Goal
This pull request introduces a new `wallet_rpc` fuzz target to test wallet RPC commands with randomized arguments. It also extracts shared RPC argument generation logic into a common test utility file (`src/test/fuzz/util/rpc.{h,cpp}`).
Problem: Wallet RPC methods have zero fuzz coverage on OSS-Fuzz, leaving wallet RPC parameter parsing and validation less tested against malformed inputs.
Reviewability
Paused · Waiting on author
Open objection from brunoerg with no author reply for 158 days; review would repeat what has been asked.
Agreement
Mild
objection that needs a change was answered, no reply from the objector (brunoerg (NACK): fuzzing wallet RPCs in isolation without context such as blocks or spendable coins yields minimal testing value); objection that needs an answer has none yet (brunoerg)
Thread notes: First read of the PR. brunoerg raised an approach objection noting that fuzzing wallet RPCs without state/context has low efficacy, and maflcko raised questions about performance.
Objections, suggestions, and questions:
| Reviewer | Type | Harm, request, or question | Status | Must be | Author replied | Quote |
|---|---|---|---|---|---|---|
| brunoerg (contributor) | objection, approach | fuzzing wallet RPCs in isolation without context such as blocks or spendable coins yields minimal testing value | answered · reply on record; standing not assessed yet · v1, not yet re-checked | changed | yes | 2026-05-21: 'This is basically fuzzing the RPC without any other context that might affect the RPCs. I mean, what would be the efficacy of fuzzing the RPC `listsinceblock` if this harness is not producing blocks?' |
| brunoerg (contributor) | objection, approach | limiting keypool size to 1 to avoid performance issues further degrades the effectiveness of fuzzing RPCs like getnewaddress | open · v1, not yet re-checked | answered | no | 2026-05-21: 'We usually need to set the keypool size to 1 in wallet targets to avoid performance issues, and this is one more reason that fuzzing some of these RPCs would not have much effect' |
Participants:
- brunoerg (contributor, objection, 4 statements 2026-05-21 to 2026-05-27): tended toward approach NACK over low efficacy of fuzzing wallet RPCs without context
- maflcko (member, question, 2 statements 2026-05-22 to 2026-05-26): asked about the performance of calling several wallet RPCs per run
Files
706 lines under test/bench/ci.
- src/wallet/test/fuzz/rpc.cpp +302/-0
- src/test/fuzz/util/rpc.cpp +195/-0
- src/test/fuzz/rpc.cpp +4/-176
- src/test/fuzz/util/rpc.h +27/-0
- src/test/fuzz/util/CMakeLists.txt +1/-0
- src/wallet/test/fuzz/CMakeLists.txt +1/-0
Card
The short text the ranking pass compares across PRs.
This PR adds a wallet_rpc fuzz target and refactors RPC argument fuzzing helpers into a shared utility. It aims to provide fuzz coverage for wallet RPCs, which currently have zero coverage on OSS-Fuzz. Reviewers expressed strong approach doubts, arguing that fuzzing wallet RPCs without blockchain context or UTXOs has very low efficacy and that multi-call chaining would suffer poor performance. The author has not responded to the latest reviewer comments for nearly four months.
Data
thread read through 2026-05-27 (10 statements), head 9d2b44b752
Discussion read under schema 1 rules: suggestions and questions may be missing, and an objection may combine several harms (schema history).
labels: Tests
Categories
Test infrastructure
P4 · test coverage (assessed alone as P3; Lowered to P4: reviewers argue fuzzing wallet RPCs without chain state or UTXOs has very low efficacy, so the claimed coverage gain is weakly supported.)
Extracts shared fuzz harness utility code and introduces fuzzing for RPC endpoints that previously had zero OSS-Fuzz coverage. While fuzzing wallet RPCs in isolation does not touch consensus or P2P code paths, expanding fuzz harness coverage to unexercised parameter parsing paths is worthwhile test infrastructure work.
Membership: Matches label 'Tests', modifies fuzz harness utilities in 'src/test/fuzz/util/rpc.{cpp,h}', and creates a new fuzz harness
Factors: security/stability 1, bug 0, performance 0, user value 0, leverage 0
Wallet
P4 · test coverage (assessed alone as P3; Lowered from P3: fuzzing wallet RPCs without chain state or UTXOs yields very little real coverage, making the benefit weakly justified.)
Addresses the lack of fuzz testing for wallet RPC parameter parsing and input validation. While isolated fuzzing without full state limits coverage of stateful wallet operations, hardening wallet RPC entry points against malformed inputs provides genuine stability value.
Membership: Adds a wallet-specific fuzz harness in 'src/wallet/test/fuzz/rpc.cpp' targeting wallet RPC methods
Factors: security/stability 1, bug 0, performance 0, user value 0, leverage 0