{
 "number": 36273,
 "repo": "bitcoin/bitcoin",
 "url": "https://github.com/bitcoin/bitcoin/pull/36273",
 "title": "rpc: unify the TX decode failure error message",
 "author": "MrHodlX",
 "author_association": "FIRST_TIME_CONTRIBUTOR",
 "created_at": "2026-09-16T14:16:06Z",
 "updated_at": "2026-09-16T15:11:44Z",
 "age_days": 1,
 "draft": false,
 "labels": [
  "RPC/REST/ZMQ"
 ],
 "milestone": null,
 "base": "master",
 "head_sha": "5b71447c63e671364c76072f23e201bd37d8966c",
 "head_ref": "rpc-uniform-decode-message",
 "head_repo": "MrHodlX/bitcoin",
 "head_history": [
  {
   "t": "2026-09-16T15:08:51Z",
   "sha": "5b71447c63e671364c76072f23e201bd37d8966c"
  }
 ],
 "additions": 31,
 "deletions": 14,
 "changed_files": 11,
 "commit_count": 2,
 "size_bucket": "S",
 "mergeable_state": "unstable",
 "bot": {
  "drahtbot": {
   "present": true,
   "reviews": {},
   "conflicts": []
  }
 },
 "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": [
   "maflcko"
  ]
 },
 "signals": {
  "needs_rebase": false,
  "ci_failed": false,
  "mergeable_state": "unstable",
  "last_author_activity": "2026-09-16T15:08:51Z",
  "last_reviewer_activity": "2026-09-16T14:29:42Z",
  "last_reviewer": "maflcko",
  "author_silent_days": 1,
  "waiting_on_author_days": 0,
  "days_since_update": 1
 },
 "refs": {
  "mentioned": [
   19836
  ],
  "depends_on": [],
  "fixes": [],
  "linked_issues": [],
  "references": [
   {
    "number": 19836,
    "type": "pull",
    "state": "closed",
    "merged": true,
    "merged_at": "2020-10-16",
    "title": "rpc: Properly deserialize txs with witness before signing"
   }
  ],
  "conflicts": []
 },
 "stack": {
  "shares_commits_with": [],
  "based_on": [],
  "base_for": []
 },
 "review_paths": [
  "src/rpc/util.h"
 ],
 "body": "The \"Make sure the tx has at least one input.\" advice is copied into every\nDecodeHexTx() error, even though that message also fires on bad hex and\ntruncated or padded serialization. This moves the advice into one shared\nconstant so the eight RPCs using it can't drift. The #19836 hint stays;\nit just now also names serialization and hex separately.\n\nArray RPCs report the failing index instead of echoing the raw hex back.\nsimulaterawtransaction's different wording is left alone.\n\nTests updated to match, plus malformed-payload coverage.",
 "commits": [
  {
   "sha": "3b7360ce0212c91ac5a701c4d093ac86225d1223",
   "date": "2026-09-16T15:08:19Z",
   "message": "rpc: unify the TX decode failure error message"
  },
  {
   "sha": "5b71447c63e671364c76072f23e201bd37d8966c",
   "date": "2026-09-16T15:08:20Z",
   "message": "test: cover malformed sendrawtransaction payloads"
  }
 ],
 "timeline": [
  {
   "t": "2026-09-16T14:28:55Z",
   "kind": "comment",
   "who": "maflcko",
   "assoc": "MEMBER",
   "text": "[quoted text omitted]\n\nAgain, please do not use LLM generated messages: https://github.com/bitcoin/bitcoin/blob/master/doc/AI_POLICY.md No one cares if those are 7 or 9 RPCs, or a full list with their names, in the pull description. Also, implementation details like `inline constexpr string_view` are irrelevant here. If anyone wanted to see the changes, they can just look at the changes themselves.\n\nPlease write comments yourself and explain why the change is needed. I am sure reviewers here have seen enough LLM-sounding output to be turned off by it. So seeing comments written with a human touch will likely attract more reviewers."
  },
  {
   "t": "2026-09-16T14:29:42Z",
   "kind": "review_comment",
   "who": "maflcko",
   "assoc": "MEMBER",
   "path": "src/rpc/util.h",
   "commit": "4ccf5a8b66c86112874c3c1afbe51640a1510a2a",
   "in_reply_to": null,
   "text": "```suggestion\n/// The shared advice in every \"TX decode failed\" RPC error. DecodeHexTx()\n/// fails on invalid hex and incomplete or malformed serialization too, not\n// only on the zero-input case it was written for (#19836); it never checks\n// vin emptiness (an empty-input transaction that decodes is rejected later\n// by CheckTransaction() as bad-txns-vin-empty).\n```\n\nnit: I think doxygen requires three `///` for this to end up in the docs."
  },
  {
   "t": "2026-09-16T15:08:51Z",
   "kind": "force_push",
   "who": "MrHodlX",
   "commit": "5b71447c63e671364c76072f23e201bd37d8966c"
  }
 ],
 "labels_log": [
  {
   "t": "2026-09-16T14:16:10Z",
   "action": "labeled",
   "label": "RPC/REST/ZMQ",
   "who": "DrahtBot"
  }
 ],
 "state_log": [],
 "text_chars": 1767,
 "text_tokens_estimate": 441,
 "changed_paths": [
  "src/rpc/mempool.cpp",
  "src/rpc/mining.cpp",
  "src/rpc/rawtransaction.cpp",
  "src/rpc/util.h",
  "src/wallet/rpc/backup.cpp",
  "src/wallet/rpc/spend.cpp",
  "test/functional/rpc_echo_payload.py",
  "test/functional/rpc_generate.py",
  "test/functional/rpc_packages.py",
  "test/functional/rpc_rawtransaction.py",
  "test/functional/rpc_signrawtransactionwithkey.py"
 ],
 "files": [
  {
   "path": "src/rpc/mempool.cpp",
   "add": 7,
   "del": 5
  },
  {
   "path": "src/rpc/mining.cpp",
   "add": 1,
   "del": 1
  },
  {
   "path": "src/rpc/rawtransaction.cpp",
   "add": 2,
   "del": 2
  },
  {
   "path": "src/rpc/util.h",
   "add": 8,
   "del": 0
  },
  {
   "path": "src/wallet/rpc/backup.cpp",
   "add": 1,
   "del": 1
  },
  {
   "path": "src/wallet/rpc/spend.cpp",
   "add": 1,
   "del": 1
  },
  {
   "path": "test/functional/rpc_echo_payload.py",
   "add": 1,
   "del": 1
  },
  {
   "path": "test/functional/rpc_generate.py",
   "add": 1,
   "del": 1
  },
  {
   "path": "test/functional/rpc_packages.py",
   "add": 1,
   "del": 1
  },
  {
   "path": "test/functional/rpc_rawtransaction.py",
   "add": 7,
   "del": 0
  },
  {
   "path": "test/functional/rpc_signrawtransactionwithkey.py",
   "add": 1,
   "del": 1
  }
 ],
 "test_lines": 15,
 "git": {
  "head": "5b71447c63e671364c76072f23e201bd37d8966c",
  "head_matches_backup": true,
  "base": "b8215855437288cac95c7fd5d41104c73c0f3495",
  "commits": [
   {
    "sha": "3b7360ce02",
    "subject": "rpc: unify the TX decode failure error message",
    "files": 10,
    "add": 24,
    "del": 14
   },
   {
    "sha": "5b71447c63",
    "subject": "test: cover malformed sendrawtransaction payloads",
    "files": 1,
    "add": 7,
    "del": 0
   }
  ],
  "patch_truncated": false
 },
 "input_hash": "80757722db09e4d6",
 "extracted_at": "2026-09-17T16:15:31+00:00"
}