{
 "number": 35342,
 "repo": "bitcoin/bitcoin",
 "url": "https://github.com/bitcoin/bitcoin/pull/35342",
 "title": "test: fuzz wallet_rpc target",
 "author": "kevkevinpal",
 "author_association": "CONTRIBUTOR",
 "created_at": "2026-05-21T03:35:06Z",
 "updated_at": "2026-05-27T13:23:40Z",
 "age_days": 119,
 "draft": false,
 "labels": [
  "Tests"
 ],
 "milestone": null,
 "base": "master",
 "head_sha": "9d2b44b752c7d3e76d77cde7eb104b7fc36fcbfe",
 "head_ref": "fuzzwalletrpc",
 "head_repo": "kevkevinpal/bitcoin",
 "head_history": [
  {
   "t": "2026-05-21T03:51:51Z",
   "sha": "8122475161fe23f9daced39bbac70fa7c41a59ec"
  },
  {
   "t": "2026-05-21T04:14:47Z",
   "sha": "9d2b44b752c7d3e76d77cde7eb104b7fc36fcbfe"
  }
 ],
 "additions": 530,
 "deletions": 176,
 "changed_files": 6,
 "commit_count": 2,
 "size_bucket": "L",
 "mergeable_state": "blocked",
 "bot": {
  "drahtbot": {
   "present": true,
   "reviews": {
    "approach_nack": [
     {
      "login": "brunoerg",
      "url": "https://github.com/bitcoin/bitcoin/pull/35342#pullrequestreview-4341392399"
     }
    ]
   },
   "conflicts": [
    {
     "number": 32993,
     "title": "fuzz: wallet: add target for tx scanning",
     "author": "brunoerg"
    }
   ]
  }
 },
 "acks_parsed": {},
 "acks_tally": {
  "ack": 0,
  "stale_ack": 0,
  "concept_ack": 0,
  "approach_ack": 0,
  "nack": 0,
  "concept_nack": 0,
  "approach_nack": 0
 },
 "reviews": {
  "approved": 0,
  "changes_requested": 0,
  "distinct_reviewers": [
   "brunoerg",
   "maflcko"
  ]
 },
 "signals": {
  "needs_rebase": false,
  "ci_failed": false,
  "mergeable_state": "blocked",
  "last_author_activity": "2026-05-23T13:00:14Z",
  "last_reviewer_activity": "2026-05-27T13:23:40Z",
  "last_reviewer": "brunoerg",
  "author_silent_days": 117,
  "waiting_on_author_days": 113,
  "days_since_update": 113
 },
 "refs": {
  "mentioned": [],
  "depends_on": [],
  "fixes": [],
  "linked_issues": [],
  "references": [],
  "conflicts": [
   32993
  ]
 },
 "stack": {
  "shares_commits_with": [],
  "based_on": [],
  "base_for": []
 },
 "review_paths": [
  "src/wallet/test/fuzz/rpc.cpp"
 ],
 "body": "### Summary\nThis is part of https://github.com/bitcoin/bitcoin/issues/29901 and a resurrection of https://github.com/bitcoin/bitcoin/pull/30570, which I had left up for grabs earlier.\n\nThis change adds a new fuzz target `wallet_rpc` that fuzz tests the wallet RPC\n\nThis PR also moves and modifies `ConsumeScalarRPCArgument` to be used for the `wallet_rpc` target\n\n---\n\nRight now, I see zero fuzz coverage for the wallet rpc, this new target will add some coverage there.\nhttps://storage.googleapis.com/oss-fuzz-coverage/bitcoin-core/reports/20260519/linux/src/bitcoin-core/src/wallet/rpc/report.html",
 "commits": [
  {
   "sha": "cf5829f16d00d103c264cd1551fe2ba313520250",
   "date": "2026-05-21T02:28:07Z",
   "message": "test/refactor: move RPC fuzz helpers to util/rpc\n\nMoved ConsumeScalarRPCArgument to its own fuzz util file"
  },
  {
   "sha": "9d2b44b752c7d3e76d77cde7eb104b7fc36fcbfe",
   "date": "2026-05-21T04:14:42Z",
   "message": "test: add wallet_rpc fuzz target\n\nBy reusing some of the logic for the rpc fuzz target this new fuzz\ntarget wallet_rpc adds coverage to the wallet rpc calls."
  }
 ],
 "timeline": [
  {
   "t": "2026-05-21T03:51:51Z",
   "kind": "force_push",
   "who": "kevkevinpal",
   "commit": "8122475161fe23f9daced39bbac70fa7c41a59ec"
  },
  {
   "t": "2026-05-21T04:14:47Z",
   "kind": "force_push",
   "who": "kevkevinpal",
   "commit": "9d2b44b752c7d3e76d77cde7eb104b7fc36fcbfe"
  },
  {
   "t": "2026-05-21T04:25:35Z",
   "kind": "comment",
   "who": "kevkevinpal",
   "assoc": "CONTRIBUTOR",
   "text": "This is the coverage I was able to generate in the short time I had it running."
  },
  {
   "t": "2026-05-21T23:23:40Z",
   "kind": "review",
   "who": "brunoerg",
   "assoc": "CONTRIBUTOR",
   "state": "COMMENTED",
   "commit": "9d2b44b752c7d3e76d77cde7eb104b7fc36fcbfe",
   "text": "I'm tending to approach NACK, will explain:\n\nI understand the need of fuzzing the RPCs but I have been wondering about the efficacy of the approach like this. 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? Or even RPCs that need spendable coins.\n\nIn general, I think running it will not produce results as expected."
  },
  {
   "t": "2026-05-21T23:25:40Z",
   "kind": "review_comment",
   "who": "brunoerg",
   "assoc": "CONTRIBUTOR",
   "path": "src/wallet/test/fuzz/rpc.cpp",
   "commit": "9d2b44b752c7d3e76d77cde7eb104b7fc36fcbfe",
   "in_reply_to": null,
   "text": "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 (e.g. `getnewaddress`)."
  },
  {
   "t": "2026-05-22T05:54:43Z",
   "kind": "comment",
   "who": "maflcko",
   "assoc": "MEMBER",
   "text": "Maybe the fuzz target can be allowed to call several wallet RPCs, but I am not sure what the performance of this would be?"
  },
  {
   "t": "2026-05-22T12:20:33Z",
   "kind": "comment",
   "who": "kevkevinpal",
   "assoc": "CONTRIBUTOR",
   "text": "[quoted text omitted]\n\nMaybe I'm not understanding the comment, but in this change, there is a list of wallet RPCs to call, some marked as. safe and others marked as unsafe. https://github.com/bitcoin/bitcoin/pull/35342/changes#diff-8ae84e14f2db08a67e421373290af839a5490843b50423f7ab8256509888acd3R86-R150"
  },
  {
   "t": "2026-05-22T12:29:24Z",
   "kind": "comment",
   "who": "kevkevinpal",
   "assoc": "CONTRIBUTOR",
   "text": "[quoted text omitted]\n\nGotcha, and thanks for the review. I do think that makes sense as well. It does make little sense to fuzz `listsinceblock` if no blocks are being made, and the same for some of the other RPCs.\n\nDo you think it would make more sense to create individual harnesses for each RPC? So we can build a fuzz test suite that serves it better? I have a feeling that would be cumbersome on the fuzz test suite.\n\nDo you think this same logic also applies to the existing `rpc` harness? I've tried to replicate it closely to that one."
  },
  {
   "t": "2026-05-22T12:50:02Z",
   "kind": "comment",
   "who": "brunoerg",
   "assoc": "CONTRIBUTOR",
   "text": "[quoted text omitted]\n\nPretty sure the performance would be terrible."
  },
  {
   "t": "2026-05-23T13:00:14Z",
   "kind": "comment",
   "who": "kevkevinpal",
   "assoc": "CONTRIBUTOR",
   "text": "[quoted text omitted]\n\nOh, I see what you mean, within the same run. Do you think it would still be terrible if we had a limit to how many RPC's can be called at a time?"
  },
  {
   "t": "2026-05-26T07:19:54Z",
   "kind": "comment",
   "who": "maflcko",
   "assoc": "MEMBER",
   "text": "[quoted text omitted]\n\nAlso, a bit unrelated, I think the search space for the `rpc` target is too large. However, fixing that requires a fuzz-engine specific workaround IIUC (https://github.com/maflcko/bitcoin-core/issues/99) :("
  },
  {
   "t": "2026-05-27T13:23:40Z",
   "kind": "comment",
   "who": "brunoerg",
   "assoc": "CONTRIBUTOR",
   "text": "[quoted text omitted]\n\nI think so. I still have some concerns about the efficacy as well."
  }
 ],
 "labels_log": [
  {
   "t": "2026-05-21T03:35:09Z",
   "action": "labeled",
   "label": "Tests",
   "who": "DrahtBot"
  },
  {
   "t": "2026-05-21T03:52:20Z",
   "action": "labeled",
   "label": "CI failed",
   "who": "DrahtBot"
  },
  {
   "t": "2026-05-21T05:03:06Z",
   "action": "unlabeled",
   "label": "CI failed",
   "who": "DrahtBot"
  }
 ],
 "state_log": [],
 "text_chars": 3180,
 "text_tokens_estimate": 795,
 "changed_paths": [
  "src/test/fuzz/rpc.cpp",
  "src/test/fuzz/util/CMakeLists.txt",
  "src/test/fuzz/util/rpc.cpp",
  "src/test/fuzz/util/rpc.h",
  "src/wallet/test/fuzz/CMakeLists.txt",
  "src/wallet/test/fuzz/rpc.cpp"
 ],
 "files": [
  {
   "path": "src/test/fuzz/rpc.cpp",
   "add": 4,
   "del": 176
  },
  {
   "path": "src/test/fuzz/util/CMakeLists.txt",
   "add": 1,
   "del": 0
  },
  {
   "path": "src/test/fuzz/util/rpc.cpp",
   "add": 195,
   "del": 0
  },
  {
   "path": "src/test/fuzz/util/rpc.h",
   "add": 27,
   "del": 0
  },
  {
   "path": "src/wallet/test/fuzz/CMakeLists.txt",
   "add": 1,
   "del": 0
  },
  {
   "path": "src/wallet/test/fuzz/rpc.cpp",
   "add": 302,
   "del": 0
  }
 ],
 "test_lines": 706,
 "git": {
  "head": "9d2b44b752c7d3e76d77cde7eb104b7fc36fcbfe",
  "head_matches_backup": true,
  "base": "d406cffafdd111b34dc613b4cb82b4f0a264d225",
  "commits": [
   {
    "sha": "cf5829f16d",
    "subject": "test/refactor: move RPC fuzz helpers to util/rpc",
    "files": 4,
    "add": 227,
    "del": 176
   },
   {
    "sha": "9d2b44b752",
    "subject": "test: add wallet_rpc fuzz target",
    "files": 2,
    "add": 303,
    "del": 0
   }
  ],
  "patch_truncated": false
 },
 "input_hash": "9d4db724f41cc743",
 "extracted_at": "2026-09-17T16:15:31+00:00"
}