{
 "number": 33904,
 "repo": "bitcoin/bitcoin",
 "url": "https://github.com/bitcoin/bitcoin/pull/33904",
 "title": "rest: add interface for gettxspendingprevout rpc",
 "author": "kevkevinpal",
 "author_association": "CONTRIBUTOR",
 "created_at": "2025-11-18T16:37:00Z",
 "updated_at": "2026-09-03T23:34:53Z",
 "age_days": 302,
 "draft": false,
 "labels": [
  "RPC/REST/ZMQ"
 ],
 "milestone": null,
 "base": "master",
 "head_sha": "fdab73e28be476ed6d1b38dc1ae021e8926719f1",
 "head_ref": "feat/rest-gettxspendingprevout",
 "head_repo": "kevkevinpal/bitcoin",
 "head_history": [
  {
   "t": "2025-11-18T16:41:11Z",
   "sha": "f178d37c4e0aa232cb206e1fb91c7f71f4a053a9"
  },
  {
   "t": "2026-03-16T13:19:34Z",
   "sha": "9b4bc2748579bd25f3df76b53416643a9899a403"
  },
  {
   "t": "2026-03-16T14:00:57Z",
   "sha": "296b7ade1152fcd95d5d59464afd79b4716be47f"
  },
  {
   "t": "2026-05-11T13:54:56Z",
   "sha": "84a1f671de679ca2de718d99a9db18315ff683f5"
  },
  {
   "t": "2026-06-17T01:49:34Z",
   "sha": "b7a73192b7f33d583f81a05d6b46c61d0ebffb72"
  },
  {
   "t": "2026-06-20T15:52:13Z",
   "sha": "231eafec0215495c00c027f2eef80f752e85ef8d"
  },
  {
   "t": "2026-09-01T15:28:48Z",
   "sha": "fdab73e28be476ed6d1b38dc1ae021e8926719f1"
  }
 ],
 "additions": 294,
 "deletions": 1,
 "changed_files": 3,
 "commit_count": 1,
 "size_bucket": "M",
 "mergeable_state": "clean",
 "bot": {
  "drahtbot": {
   "present": true,
   "reviews": {
    "concept_ack": [
     {
      "login": "sedited",
      "url": "https://github.com/bitcoin/bitcoin/pull/33904#issuecomment-4414975851"
     }
    ]
   },
   "conflicts": []
  }
 },
 "acks_parsed": {
  "sedited": {
   "kind": "concept_ack",
   "hash": null,
   "t": "2026-05-10T09:42:27Z",
   "stale": false
  }
 },
 "acks_tally": {
  "ack": 0,
  "stale_ack": 0,
  "concept_ack": 1,
  "approach_ack": 0,
  "nack": 0,
  "concept_nack": 0,
  "approach_nack": 0
 },
 "reviews": {
  "approved": 0,
  "changes_requested": 0,
  "distinct_reviewers": [
   "fanquake",
   "maflcko",
   "sedited"
  ]
 },
 "signals": {
  "needs_rebase": false,
  "ci_failed": false,
  "mergeable_state": "clean",
  "last_author_activity": "2026-09-01T15:29:23Z",
  "last_reviewer_activity": "2026-08-27T11:03:15Z",
  "last_reviewer": "sedited",
  "author_silent_days": 16,
  "waiting_on_author_days": 0,
  "days_since_update": 13
 },
 "refs": {
  "mentioned": [],
  "depends_on": [],
  "fixes": [],
  "linked_issues": [],
  "references": [],
  "conflicts": []
 },
 "stack": {
  "shares_commits_with": [],
  "based_on": [],
  "base_for": []
 },
 "review_paths": [
  "doc/REST-interface.md",
  "src/rest.cpp",
  "test/functional/interface_rest.py"
 ],
 "body": "## Summary\nThis creates a REST interface for the `gettxspendingprevout` RPC, it also includes functional tests and updates to the REST docs\n\nThis is part of https://github.com/bitcoin/bitcoin/issues/33808, and now that sstone\u2019s PR https://github.com/bitcoin/bitcoin/pull/24539 is merged, I added `mempool_only` and `return_spending_tx` as query params.",
 "commits": [
  {
   "sha": "fdab73e28be476ed6d1b38dc1ae021e8926719f1",
   "date": "2026-09-01T15:28:01Z",
   "message": "rest: add interface for gettxspendingprevout rpc\n\nThis creates a REST interface for the gettxspendingprevout rpc and also\nincludes functional tests"
  }
 ],
 "timeline": [
  {
   "t": "2025-11-18T16:41:11Z",
   "kind": "force_push",
   "who": "kevkevinpal",
   "commit": "f178d37c4e0aa232cb206e1fb91c7f71f4a053a9"
  },
  {
   "t": "2026-03-16T07:21:40Z",
   "kind": "comment",
   "who": "fanquake",
   "assoc": "MEMBER",
   "text": "[quoted text omitted]\n\nThat PR has been merged."
  },
  {
   "t": "2026-03-16T13:19:34Z",
   "kind": "force_push",
   "who": "kevkevinpal",
   "commit": "9b4bc2748579bd25f3df76b53416643a9899a403"
  },
  {
   "t": "2026-03-16T13:20:17Z",
   "kind": "comment",
   "who": "kevkevinpal",
   "assoc": "CONTRIBUTOR",
   "text": "rebased to [9b4bc27](https://github.com/bitcoin/bitcoin/pull/33904/commits/9b4bc2748579bd25f3df76b53416643a9899a403)"
  },
  {
   "t": "2026-03-16T14:00:57Z",
   "kind": "force_push",
   "who": "kevkevinpal",
   "commit": "296b7ade1152fcd95d5d59464afd79b4716be47f"
  },
  {
   "t": "2026-03-16T14:09:06Z",
   "kind": "comment",
   "who": "kevkevinpal",
   "assoc": "CONTRIBUTOR",
   "text": "I updated to add `mempool_only` and `return_spending_tx` as query params"
  },
  {
   "t": "2026-05-10T09:42:27Z",
   "kind": "comment",
   "who": "sedited",
   "assoc": "MEMBER",
   "text": "Concept ACK"
  },
  {
   "t": "2026-05-11T08:07:32Z",
   "kind": "review_comment",
   "who": "maflcko",
   "assoc": "MEMBER",
   "path": "src/rest.cpp",
   "commit": "296b7ade1152fcd95d5d59464afd79b4716be47f",
   "in_reply_to": null,
   "text": "please no redundant and confusing c-style casts.\n\nAlso, the new code should follow the code style for new code:\n\n* Clang-format-diff\n* multi-line ifs with `{}` braces\n* ..."
  },
  {
   "t": "2026-05-11T13:54:56Z",
   "kind": "force_push",
   "who": "kevkevinpal",
   "commit": "84a1f671de679ca2de718d99a9db18315ff683f5"
  },
  {
   "t": "2026-05-11T13:55:48Z",
   "kind": "review_comment",
   "who": "kevkevinpal",
   "assoc": "CONTRIBUTOR",
   "path": "src/rest.cpp",
   "commit": "296b7ade1152fcd95d5d59464afd79b4716be47f",
   "in_reply_to": 3217237433,
   "text": "Thanks for the review! I pushed updates for the code style in [84a1f67](https://github.com/bitcoin/bitcoin/pull/33904/commits/84a1f671de679ca2de718d99a9db18315ff683f5)"
  },
  {
   "t": "2026-05-11T14:02:38Z",
   "kind": "comment",
   "who": "maflcko",
   "assoc": "MEMBER",
   "text": "Also, please reword the pull description to remove `@` mentions, which will turn into spam pings, when the text ends up in commit message(s)"
  },
  {
   "t": "2026-05-11T14:06:12Z",
   "kind": "comment",
   "who": "kevkevinpal",
   "assoc": "CONTRIBUTOR",
   "text": "[quoted text omitted]\n\nOops, good point. removed!"
  },
  {
   "t": "2026-05-11T14:19:38Z",
   "kind": "comment",
   "who": "kevkevinpal",
   "assoc": "CONTRIBUTOR",
   "text": "CI failure for [Windows native, fuzz, VS](https://github.com/bitcoin/bitcoin/actions/runs/25674590333/job/75368795218?pr=33904#logs)[Windows native, fuzz, VS](https://github.com/bitcoin/bitcoin/actions/runs/25674590333/job/75368795218?pr=33904#logs) is unrelated to the changes"
  },
  {
   "t": "2026-06-11T12:11:08Z",
   "kind": "review_comment",
   "who": "sedited",
   "assoc": "MEMBER",
   "path": "src/rest.cpp",
   "commit": "fdab73e28be476ed6d1b38dc1ae021e8926719f1",
   "in_reply_to": null,
   "text": "Can you take a look at how this was now implemented in the RPC code and align this implementation with that code? The `prevouts_to_process` and `make_output` helpers make this a bit easier to deal with and the code easier to understand."
  },
  {
   "t": "2026-06-11T12:18:11Z",
   "kind": "review_comment",
   "who": "sedited",
   "assoc": "MEMBER",
   "path": "doc/REST-interface.md",
   "commit": "fdab73e28be476ed6d1b38dc1ae021e8926719f1",
   "in_reply_to": null,
   "text": "Should we be limiting the number of outpoints that can be queried at once?"
  },
  {
   "t": "2026-06-11T12:20:20Z",
   "kind": "review_comment",
   "who": "sedited",
   "assoc": "MEMBER",
   "path": "test/functional/interface_rest.py",
   "commit": "fdab73e28be476ed6d1b38dc1ae021e8926719f1",
   "in_reply_to": null,
   "text": "We already switch on the `blockfilterindex` in this test. Should we switch on the `txospenderindex` to exercise that logic too?"
  },
  {
   "t": "2026-06-17T01:49:34Z",
   "kind": "force_push",
   "who": "kevkevinpal",
   "commit": "b7a73192b7f33d583f81a05d6b46c61d0ebffb72"
  },
  {
   "t": "2026-06-17T01:55:45Z",
   "kind": "review_comment",
   "who": "kevkevinpal",
   "assoc": "CONTRIBUTOR",
   "path": "doc/REST-interface.md",
   "commit": "fdab73e28be476ed6d1b38dc1ae021e8926719f1",
   "in_reply_to": 3395755131,
   "text": "Yeah, that makes sense. I pushed b7a73192b7f33d583f81a05d6b46c61d0ebffb72 that reuses `MAX_GETUTXOS_OUTPOINTS` to limit the number of outpoints a user can query at once."
  },
  {
   "t": "2026-06-17T01:56:27Z",
   "kind": "review_comment",
   "who": "kevkevinpal",
   "assoc": "CONTRIBUTOR",
   "path": "src/rest.cpp",
   "commit": "fdab73e28be476ed6d1b38dc1ae021e8926719f1",
   "in_reply_to": 3395710851,
   "text": "I agree that makes sense in b7a73192b7f33d583f81a05d6b46c61d0ebffb72 I used `prevouts_to_process` and `make_output`"
  },
  {
   "t": "2026-06-17T01:56:56Z",
   "kind": "review_comment",
   "who": "kevkevinpal",
   "assoc": "CONTRIBUTOR",
   "path": "test/functional/interface_rest.py",
   "commit": "fdab73e28be476ed6d1b38dc1ae021e8926719f1",
   "in_reply_to": 3395769561,
   "text": "Yup added it in b7a73192b7f33d583f81a05d6b46c61d0ebffb72\n\nThanks for the review!"
  },
  {
   "t": "2026-06-20T15:52:13Z",
   "kind": "force_push",
   "who": "kevkevinpal",
   "commit": "231eafec0215495c00c027f2eef80f752e85ef8d"
  },
  {
   "t": "2026-08-27T11:03:15Z",
   "kind": "comment",
   "who": "sedited",
   "assoc": "MEMBER",
   "text": "Ping for rebase @kevkevinpal"
  },
  {
   "t": "2026-09-01T15:28:48Z",
   "kind": "force_push",
   "who": "kevkevinpal",
   "commit": "fdab73e28be476ed6d1b38dc1ae021e8926719f1"
  },
  {
   "t": "2026-09-01T15:29:23Z",
   "kind": "comment",
   "who": "kevkevinpal",
   "assoc": "CONTRIBUTOR",
   "text": "[quoted text omitted]\n\nSorry about that. Rebased!"
  }
 ],
 "labels_log": [
  {
   "t": "2025-11-18T16:37:05Z",
   "action": "labeled",
   "label": "RPC/REST/ZMQ",
   "who": "DrahtBot"
  },
  {
   "t": "2025-11-18T16:41:41Z",
   "action": "labeled",
   "label": "CI failed",
   "who": "DrahtBot"
  },
  {
   "t": "2025-11-18T17:33:34Z",
   "action": "unlabeled",
   "label": "CI failed",
   "who": "DrahtBot"
  },
  {
   "t": "2025-12-17T16:59:18Z",
   "action": "labeled",
   "label": "Needs rebase",
   "who": "DrahtBot"
  },
  {
   "t": "2026-03-16T13:30:02Z",
   "action": "unlabeled",
   "label": "Needs rebase",
   "who": "DrahtBot"
  },
  {
   "t": "2026-03-16T14:01:27Z",
   "action": "labeled",
   "label": "CI failed",
   "who": "DrahtBot"
  },
  {
   "t": "2026-03-16T14:46:09Z",
   "action": "unlabeled",
   "label": "CI failed",
   "who": "DrahtBot"
  },
  {
   "t": "2026-05-11T14:54:02Z",
   "action": "labeled",
   "label": "CI failed",
   "who": "DrahtBot"
  },
  {
   "t": "2026-05-12T15:25:57Z",
   "action": "unlabeled",
   "label": "CI failed",
   "who": "DrahtBot"
  },
  {
   "t": "2026-06-17T03:53:25Z",
   "action": "labeled",
   "label": "CI failed",
   "who": "DrahtBot"
  },
  {
   "t": "2026-06-20T17:03:04Z",
   "action": "unlabeled",
   "label": "CI failed",
   "who": "DrahtBot"
  },
  {
   "t": "2026-08-10T10:17:24Z",
   "action": "labeled",
   "label": "Needs rebase",
   "who": "DrahtBot"
  },
  {
   "t": "2026-09-01T16:30:51Z",
   "action": "unlabeled",
   "label": "Needs rebase",
   "who": "DrahtBot"
  }
 ],
 "state_log": [
  {
   "t": "2026-06-19T08:53:35Z",
   "kind": "convert_to_draft",
   "who": "DrahtBot"
  },
  {
   "t": "2026-06-23T01:53:08Z",
   "kind": "ready_for_review",
   "who": "kevkevinpal"
  }
 ],
 "text_chars": 2501,
 "text_tokens_estimate": 625,
 "changed_paths": [
  "doc/REST-interface.md",
  "src/rest.cpp",
  "test/functional/interface_rest.py"
 ],
 "files": [
  {
   "path": "doc/REST-interface.md",
   "add": 43,
   "del": 0
  },
  {
   "path": "src/rest.cpp",
   "add": 141,
   "del": 0
  },
  {
   "path": "test/functional/interface_rest.py",
   "add": 110,
   "del": 1
  }
 ],
 "test_lines": 111,
 "git": {
  "head": "fdab73e28be476ed6d1b38dc1ae021e8926719f1",
  "head_matches_backup": true,
  "base": "dc0395c5858a1d55239b82a834e5075cf2069219",
  "commits": [
   {
    "sha": "fdab73e28b",
    "subject": "rest: add interface for gettxspendingprevout rpc",
    "files": 3,
    "add": 294,
    "del": 1
   }
  ],
  "patch_truncated": false
 },
 "input_hash": "8a089e39b5f16d72",
 "extracted_at": "2026-09-17T16:15:31+00:00"
}