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

Merge pull request #11069 from spesmilo/legacy_sighashes

Public commit record

What the developer wrote

Authored by ghost43

73/100 · Adequate
Merge pull request #11069 from spesmilo/legacy_sighashes

transaction: support all sighash types in legacy preimage
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This commit expands Electrum's transaction-signing code to correctly handle older, rarely-used Bitcoin signature modes (SIGHASH_NONE, SIGHASH_SINGLE, and SIGHASH_ANYONECANPAY) for pre-SegWit ('legacy') transactions. Previously these modes were rejected or only partially supported, which could prevent users from signing or verifying certain valid-but-non-standard transactions. The change also adds a 'strict' flag so callers can choose between standard-wallet policy and raw consensus behavior, and imports Bitcoin Core's official test vectors to verify correctness.

Recommended action

Review the sighash logic against Bitcoin Core's implementation to ensure no off-by-one or serialization errors remain; confirm the new test vectors pass; consider whether the `strict=False` path is exposed only through appropriate APIs to avoid surprising users with non-standard transactions.

Security signals we found

01

Correctness fix for legacy sighash preimage construction

02

Adds consensus-compatible handling of non-standard sighash types

03

Adds strict parameter to separate policy/standardness from consensus validation

04

Includes Bitcoin Core official test vectors for validation

05

Handles SIGHASH_SINGLE edge case where input index exceeds outputs

Risk score

Why this scored 31/100

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