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

units: remove Default from Sequence

Public commit record

What the developer wrote

Authored by satsfy (Renato Britto)

78/100 · Adequate
units: remove Default from Sequence

The Sequence gets the Default trait but misses a `new()` function.

Remove the Sequence's Default and drop Sequence from the conformance tests,
the API snapshots and give the fuzz wrapper an explicit default instead.
✓ 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 commit removes the automatic default value for the Bitcoin transaction `Sequence` type in the rust-bitcoin library. Previously, code that asked for a default sequence number would silently get the maximum value (0xffffffff), which disables transaction replacement. The change forces callers to explicitly choose a sequence value, reducing the risk of accidental misconfiguration. It is an API-cleanup change rather than a fix for an active security bug.

Recommended action

Review downstream code that previously called `Sequence::default()` or derived `Default` on structs containing `Sequence`. Replace those with an explicit sequence value such as `Sequence::MAX` or another semantically appropriate constant. Monitor the project for any follow-up commit that adds a `Sequence::new()` constructor.

Security signals we found

01

Removal of Default impl for a consensus-relevant type (Sequence)

02

Default previously returned Sequence::MAX, which disables BIP-68/BIP-112 relative timelocks

03

No advisory, CVE, or vendor security disclosure linked to the change

04

Change is defensive API hardening, not a patch for a known vulnerability

Risk score

Why this scored 19/100

Our methodology →
Potential impact 2/30
Exploitability 1/25
Stealth signal 1/15
Affected reach 3/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.