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

txscript: return ErrCleanStack for witness cleanstack failures

Public commit record

What the developer wrote

Authored by Olaoluwa Osuntokun

83/100 · Strong
txscript: return ErrCleanStack for witness cleanstack failures

The refreshed Bitcoin Core script reference tests expect witness
clean-stack failures to report CLEANSTACK rather than a generic
EVAL_FALSE result.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
The short version

What changed, and why it matters

This is a tiny one-line change in btcd's transaction-script engine. It swaps the error code returned when a SegWit (witness) script leaves extra items on the stack after execution. Previously the code reported a generic 'evaluation returned false' error; now it reports the more specific 'clean stack' error expected by Bitcoin Core's reference test suite. The commit message frames this as test-compatibility, not a security fix, and the change does not alter whether a transaction is accepted or rejected—only which diagnostic error is produced.

Recommended action

No security action required. Treat as a normal test-compatibility / code-quality patch. If desired, verify that updated Bitcoin Core script tests now pass and that no other ErrEvalFalse vs ErrCleanStack mismatches remain.

Security signals we found

01

Error-code change only; no acceptance/rejection behavior change

02

Touched code path is SegWit witness script final-stack validation

03

Commit message describes test-suite alignment, not a vulnerability

Risk score

Why this scored 19/100

Our methodology →
Potential impact 2/30
Exploitability 1/25
Stealth signal 1/15
Affected reach 2/15
Confidence 9/10
Evidence quality 4/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.