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

Merge rust-bitcoin/rust-bitcoin#7058: consensus_encoding: fix wrong default limit in CompactSizeDecoder docs

Public commit record

What the developer wrote

Authored by Andrew Poelstra

91/100 · Strong
Merge rust-bitcoin/rust-bitcoin#7058: consensus_encoding: fix wrong default limit in CompactSizeDecoder docs

20c2dc05939132e1747dd023196224c950a70239 consensus_encoding: fix wrong default limit in CompactSizeDecoder docs (kleonyuan)

Pull request description:

The `CompactSizeDecoder` documentation stated that the decoded value is bounded
by a default limit of 4,000,000. This is incorrect: the default limit is
`MAX_COMPACT_SIZE = 0x0200_0000`, i.e. 33,554,432 bytes (32 MiB), which is the
value used by `CompactSizeDecoder::new()` and is already stated elsewhere in the
same doc block (`new`, `new_with_limit`).

The 4,000,000 figure is the limit used by the vec decoders (`MAX_VEC_SIZE`), not
by compact-size decoding, so it looks like a copy-paste error.


ACKs for top commit:
apoelstra:
ACK 20c2dc05939132e1747dd023196224c950a70239; successfully ran local tests


Tree-SHA512: 51bf13b507e4b99d0bc8e2da9f0abaa6c312909ef1f8a87951ddbd97896d5257c795fa010a7d212640297fa9e8c2ae7990348c6750cbb0027c597eb11eeb4aea
✓ 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 change only corrects a mistake in a code comment. The documentation for CompactSizeDecoder wrongly said the default size limit was 4,000,000, when the actual default is about 33.5 million (32 MB). No program behavior was changed; only the explanatory text was fixed.

Recommended action

No action needed; this is a non-functional documentation correction.

Security signals we found

No strong security signals were identified.

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.