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

primitives: reject transactions with 0 outputs

Public commit record

What the developer wrote

Authored by jrakibi

86/100 · Strong
primitives: reject transactions with 0 outputs

Transactions must have at least one output.

This is another syntactic check that doesn't depend on any context,
and the last one on this list https://github.com/rust-bitcoin/rust-bitcoin/issues/5383#issuecomment-3646014920.
We add validation to reject transactions with empty outputs during decoding.

Two existing tests that created transactions with no outputs are ignored
and will be fixed in the next commit.
✓ 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 adds a rule to reject Bitcoin transactions that have no outputs when they are decoded. In Bitcoin, every valid transaction must send bitcoin somewhere, so a transaction with zero outputs is invalid. The change prevents the library from accepting or processing such malformed transactions, which could otherwise lead to inconsistent behavior compared to Bitcoin Core and other nodes.

Recommended action

Review the ignored tests to ensure they are fixed promptly and do not leave coverage gaps. Verify that the NoOutputs check is applied consistently across all transaction construction and deserialization paths, not only the streaming decoder.

Security signals we found

01

New validation rejects zero-output transactions during decoding

02

Adds error variant TransactionDecoderErrorInner::NoOutputs

03

Regression test references Bitcoin Core tx_invalid.json 'No outputs' vector

04

Existing invalid tests ignored rather than fixed in same commit

Risk score

Why this scored 47/100

Our methodology →
Potential impact 12/30
Exploitability 8/25
Stealth signal 5/15
Affected reach 10/15
Confidence 8/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.