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

validation: always validate and retain dynafed header block_height

Public commit record

What the developer wrote

Authored by Byron Hambly

73/100 · Adequate
validation: always validate and retain dynafed header block_height

A dynafed header always serializes block_height as part of its identity
(CBlockHeader::Serialize/GetHash), independent of the legacy
-con_blockheightinheader option. Previously the height was only validated
in ContextualCheckBlockHeader and only reconstructed in
CBlockIndex/CDiskBlockIndex::GetBlockHeader when that option was on, so a
dynafed header with a mismatched height could be accepted, and a header
rebuilt from an accepted index no longer matched the accepted header's hash
when the option was off.

Validate and reconstruct block_height for all dynafed headers regardless of
the option. Non-dynafed headers keep the legacy option behaviour. This does
not change any consensus rule: the height was already part of every dynafed
header's hash.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This patch fixes a bug in the Elements blockchain where dynamic-federation (dynafed) block headers could contain an incorrect block height and still be accepted, and where stored header records could be rebuilt with a different hash than the original accepted header. The fix ensures dynafed headers always validate and preserve their block height, even when an older compatibility option is turned off. It is a consistency and integrity fix rather than a change to consensus rules.

Recommended action

Review and merge the patch. After deployment, nodes should re-evaluate or reconsider any dynafed headers accepted while the legacy option was off, and operators should ensure the fix is deployed before any dynafed chain reorganizations that could expose the hash-mismatch issue. No emergency action is indicated from the diff alone.

Security signals we found

01

Header hash mismatch between accepted and reconstructed dynafed headers when legacy option disabled

02

Missing height validation for dynafed headers when -con_blockheightinheader option is off

03

Potential for accepting dynafed headers with incorrect block_height

04

Fix explicitly notes this does not change consensus rules

Risk score

Why this scored 48/100

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