{
 "number": 36128,
 "repo": "bitcoin/bitcoin",
 "url": "https://github.com/bitcoin/bitcoin/pull/36128",
 "title": "test: add script_tests cases covering more interpreter mutants",
 "author": "ViniciusCestarii",
 "author_association": "CONTRIBUTOR",
 "created_at": "2026-08-31T13:21:30Z",
 "updated_at": "2026-09-05T13:26:41Z",
 "age_days": 17,
 "draft": false,
 "labels": [
  "Tests"
 ],
 "milestone": null,
 "base": "master",
 "head_sha": "44a7083d43604b3d5c923ffc9011d8043a27d052",
 "head_ref": "kill-more-interpreter-mutants",
 "head_repo": "ViniciusCestarii/bitcoin",
 "head_history": [],
 "additions": 34,
 "deletions": 0,
 "changed_files": 2,
 "commit_count": 3,
 "size_bucket": "S",
 "mergeable_state": "clean",
 "bot": {
  "drahtbot": {
   "present": true,
   "reviews": {
    "ack": [
     {
      "login": "sedited",
      "url": "https://github.com/bitcoin/bitcoin/pull/36128#pullrequestreview-5121402214"
     }
    ]
   },
   "conflicts": []
  }
 },
 "acks_parsed": {
  "sedited": {
   "kind": "ack",
   "hash": "44a7083d43604b3d5c923ffc9011d8043a27d052",
   "t": "2026-09-05T13:26:38Z",
   "stale": false
  }
 },
 "acks_tally": {
  "ack": 1,
  "stale_ack": 0,
  "concept_ack": 0,
  "approach_ack": 0,
  "nack": 0,
  "concept_nack": 0,
  "approach_nack": 0
 },
 "reviews": {
  "approved": 1,
  "changes_requested": 0,
  "distinct_reviewers": [
   "sedited"
  ]
 },
 "signals": {
  "needs_rebase": false,
  "ci_failed": false,
  "mergeable_state": "clean",
  "last_author_activity": "2026-08-24T12:59:53Z",
  "last_reviewer_activity": "2026-09-05T13:26:38Z",
  "last_reviewer": "sedited",
  "author_silent_days": 24,
  "waiting_on_author_days": 12,
  "days_since_update": 12
 },
 "refs": {
  "mentioned": [],
  "depends_on": [],
  "fixes": [],
  "linked_issues": [],
  "references": [],
  "conflicts": []
 },
 "stack": {
  "shares_commits_with": [],
  "based_on": [],
  "base_for": []
 },
 "review_paths": [],
 "body": "Kills some live mutants on interpreter.cpp that affect consensus found with https://github.com/ViniciusCestarii/mutant-harness. They are:\n\ninterpreter.cpp (killed by 4e7de2ac4cc6c08ff27620de01ccd9d66c568459):  <code>OP_IF</code>/<code>OP_NOTIF</code> tapscript minimal-IF: <code>vch[0] != 1</code> -> <code>vch[0] > 1</code>\n\n```diff\ndiff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp\nindex 98b16ec..f9b08fe 100644\n--- a/src/script/interpreter.cpp\n+++ b/src/script/interpreter.cpp\n@@ -624,7 +624,7 @@ bool EvalScript(std::vector<std::vector<unsigned char> >& stack, const CScript&\n                         if (sigversion == SigVersion::TAPSCRIPT) {\n                             // The input argument to the OP_IF and OP_NOTIF opcodes must be either\n                             // exactly 0 (the empty vector) or exactly 1 (the one-byte vector with value 1).\n-                            if (vch.size() > 1 || (vch.size() == 1 && vch[0] != 1)) {\n+                            if (vch.size() > 1 || (vch.size() == 1 && vch[0] > 1)) {\n                                 return set_error(serror, SCRIPT_ERR_TAPSCRIPT_MINIMALIF);\n                             }\n                         }\n```\n\ninterpreter.cpp (killed by f1380123b6f8912e2ca599f30f2d89c0af9b9c5f): P2WSH: <code>memcmp(hash_exec_script.begin(), program.data(), 32)</code> -> <code>31</code>\n\n```diff\ndiff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp\nindex 98b16ec..73a1bb5 100644\n--- a/src/script/interpreter.cpp\n+++ b/src/script/interpreter.cpp\n@@ -1940,7 +1940,7 @@ static bool VerifyWitnessProgram(const CScriptWitness& witness, int witversion,\n             exec_script = CScript(script_bytes.begin(), script_bytes.end());\n             uint256 hash_exec_script;\n             CSHA256().Write(exec_script.data(), exec_script.size()).Finalize(hash_exec_script.begin());\n-            if (memcmp(hash_exec_script.begin(), program.data(), 32)) {\n+            if (memcmp(hash_exec_script.begin(), program.data(), 31)) {\n                 return set_error(serror, SCRIPT_ERR_WITNESS_PROGRAM_MISMATCH);\n             }\n             return ExecuteWitnessScript(stack, exec_script, flags, SigVersion::WITNESS_V0, checker, execdata, serror);\n```\n\ninterpreter.cpp (killed by 44a7083d43604b3d5c923ffc9011d8043a27d052): opcode limit: <code>sigversion == BASE || sigversion == WITNESS_V0</code> -> <code>sigversion == BASE</code>\n\n```diff\ndiff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp\nindex 98b16ec..b117045 100644\n--- a/src/script/interpreter.cpp\n+++ b/src/script/interpreter.cpp\n@@ -457,7 +457,7 @@ bool EvalScript(std::vector<std::vector<unsigned char> >& stack, const CScript&\n             if (vchPushValue.size() > MAX_SCRIPT_ELEMENT_SIZE)\n                 return set_error(serror, SCRIPT_ERR_PUSH_SIZE);\n\n-            if (sigversion == SigVersion::BASE || sigversion == SigVersion::WITNESS_V0) {\n+            if (sigversion == SigVersion::BASE) {\n                 // Note how OP_RESERVED does not count towards the opcode limit.\n                 if (opcode > OP_16 && ++nOpCount > MAX_OPS_PER_SCRIPT) {\n                     return set_error(serror, SCRIPT_ERR_OP_COUNT);\n```\n\nRecommend reviewing per commit.",
 "commits": [
  {
   "sha": "4e7de2ac4cc6c08ff27620de01ccd9d66c568459",
   "date": "2026-08-23T17:53:51Z",
   "message": "test: cover TAPSCRIPT_MINIMALIF for OP_IF and OP_NOTIF with 1-byte vector 0x00"
  },
  {
   "sha": "f1380123b6f8912e2ca599f30f2d89c0af9b9c5f",
   "date": "2026-08-23T18:34:36Z",
   "message": "test: cover P2WSH trailing byte mismatch"
  },
  {
   "sha": "44a7083d43604b3d5c923ffc9011d8043a27d052",
   "date": "2026-08-24T12:59:53Z",
   "message": "test: cover MAX_OPS_PER_SCRIPT in P2WSH witness scripts"
  }
 ],
 "timeline": [
  {
   "t": "2026-09-05T13:26:38Z",
   "kind": "review",
   "who": "sedited",
   "assoc": "MEMBER",
   "state": "APPROVED",
   "commit": "44a7083d43604b3d5c923ffc9011d8043a27d052",
   "text": "ACK 44a7083d43604b3d5c923ffc9011d8043a27d052"
  }
 ],
 "labels_log": [
  {
   "t": "2026-08-31T13:21:34Z",
   "action": "labeled",
   "label": "Tests",
   "who": "DrahtBot"
  }
 ],
 "state_log": [],
 "text_chars": 3498,
 "text_tokens_estimate": 874,
 "changed_paths": [
  "src/test/data/script_tests.json",
  "src/test/script_tests.cpp"
 ],
 "files": [
  {
   "path": "src/test/data/script_tests.json",
   "add": 33,
   "del": 0
  },
  {
   "path": "src/test/script_tests.cpp",
   "add": 1,
   "del": 0
  }
 ],
 "test_lines": 34,
 "git": {
  "head": "44a7083d43604b3d5c923ffc9011d8043a27d052",
  "head_matches_backup": true,
  "base": "58a7869f860f022e6163dc3fae3106a0599830c5",
  "commits": [
   {
    "sha": "4e7de2ac4c",
    "subject": "test: cover TAPSCRIPT_MINIMALIF for OP_IF and OP_NOTIF with 1-byte vector 0x00",
    "files": 2,
    "add": 27,
    "del": 0
   },
   {
    "sha": "f1380123b6",
    "subject": "test: cover P2WSH trailing byte mismatch",
    "files": 1,
    "add": 1,
    "del": 0
   },
   {
    "sha": "44a7083d43",
    "subject": "test: cover MAX_OPS_PER_SCRIPT in P2WSH witness scripts",
    "files": 1,
    "add": 6,
    "del": 0
   }
  ],
  "patch_truncated": false
 },
 "input_hash": "2e3ef838b38a41f1",
 "extracted_at": "2026-09-17T16:15:31+00:00"
}