AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Informational 15 Bitcoin

Merge bitcoin/bitcoin#36128: test: add script_tests cases covering more interpreter mutants

Public commit record

What the developer wrote

Authored by merge-script

91/100 · Strong
Merge bitcoin/bitcoin#36128: test: add script_tests cases covering more interpreter mutants

44a7083d43604b3d5c923ffc9011d8043a27d052 test: cover MAX_OPS_PER_SCRIPT in P2WSH witness scripts (ViniciusCestarii)
f1380123b6f8912e2ca599f30f2d89c0af9b9c5f test: cover P2WSH trailing byte mismatch (ViniciusCestarii)
4e7de2ac4cc6c08ff27620de01ccd9d66c568459 test: cover TAPSCRIPT_MINIMALIF for OP_IF and OP_NOTIF with 1-byte vector 0x00 (ViniciusCestarii)

Pull request description:

Kills some live mutants on interpreter.cpp that affect consensus found with https://github.com/ViniciusCestarii/mutant-harness. They are:

interpreter.cpp (killed by 4e7de2ac4cc6c08ff27620de01ccd9d66c568459): `OP_IF / OP_NOTIF` tapscript minimal-IF:
```diff
diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp
index 98b16ec..f9b08fe 100644
--- a/src/script/interpreter.cpp
+++ b/src/script/interpreter.cpp
@@ -624,7 +624,7 @@ bool EvalScript(std::vector<std::vector<unsigned char> >& stack, const CScript&
- if (vch.size() > 1 || (vch.size() == 1 && vch[0] != 1)) {
+ if (vch.size() > 1 || (vch.size() == 1 && vch[0] > 1)) {
```

interpreter.cpp (killed by f1380123b6f8912e2ca599f30f2d89c0af9b9c5f): P2WSH:

```diff
diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp
index 98b16ec..73a1bb5 100644
--- a/src/script/interpreter.cpp
+++ b/src/script/interpreter.cpp
@@ -1940,7 +1940,7 @@ static bool VerifyWitnessProgram(const CScriptWitness& witness, int witversion,
- if (memcmp(hash_exec_script.begin(), program.data(), 32)) {
+ if (memcmp(hash_exec_script.begin(), program.data(), 31)) {
```

interpreter.cpp (killed by 44a7083d43604b3d5c923ffc9011d8043a27d052): opcode limit:

```diff
diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp
index 98b16ec..b117045 100644
--- a/src/script/interpreter.cpp
+++ b/src/script/interpreter.cpp
@@ -457,7 +457,7 @@ bool EvalScript(std::vector<std::vector<unsigned char> >& stack, const CScript&
- if (sigversion == SigVersion::BASE || sigversion == SigVersion::WITNESS_V0) {
+ if (sigversion == SigVersion::BASE) {
```

Recommend reviewing per commit.

ACKs for top commit:
aaron-leeb:
tACK [44a7083](https://github.com/bitcoin/bitcoin/pull/36128/commits/44a7083d43604b3d5c923ffc9011d8043a27d052)
fametrano:
ACK 44a7083d43604b3d5c923ffc9011d8043a27d052
sedited:
ACK 44a7083d43604b3d5c923ffc9011d8043a27d052

Tree-SHA512: 62a41df06422e8981f0ab4be30563e513ce8a7b566f674662300f0466efa35b87ef658e8c8a01a2911c8bab9e5d6060fa7ff279a41669bf131766379e2f75027
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This commit only adds new test cases to Bitcoin Core's test suite. It does not change any production consensus code. The tests are designed to catch accidental code changes ('mutants') in the script interpreter that could break consensus rules, but the commit itself is a defensive testing improvement, not a vulnerability fix.

Recommended action

No security response required. Treat as a normal test-coverage improvement. Reviewers may optionally verify that the new test vectors correctly exercise the intended consensus rules.

Security signals we found

01

Adds consensus-relevant test coverage for script interpreter behavior

02

Pull request description discusses hypothetical mutants in interpreter.cpp, but these are not present in the diff

03

No changes to production consensus, networking, wallet, or RPC code

Risk score

Why this scored 15/100

Our methodology →
Potential impact 0/30
Exploitability 0/25
Stealth signal 0/15
Affected reach 0/15
Confidence 10/10
Evidence quality 5/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.