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

Merge rust-bitcoin/rust-bitcoin#7098: bitcoin: include hidden nodes in the `leaves` list

Public commit record

What the developer wrote

Authored by Andrew Poelstra

91/100 · Strong
Merge rust-bitcoin/rust-bitcoin#7098: bitcoin: include hidden nodes in the `leaves` list

74104e5a93846675c2e8171f2c0668a50e155a52 bitcoin: test NodeInfo round trip with hidden nodes (jrakibi)
1dbc3b7376b21190e5034cb2541a4a1751b0715e bitcoin: include hidden nodes in the `leaves` list (jrakibi)

Pull request description:

When constructing a `NodeInfo` with hidden nodes, we don’t save these hidden nodes in the `leaves` list. So serializing `NodeInfo` omits the hidden nodes and only keeps known script leaves, which breaks the round trip when deserializing.

Add the hidden node to the leaves list so it is included when serializing.

Related to #1327


ACKs for top commit:
Abeeujah:
ACK 74104e5a93846675c2e8171f2c0668a50e155a52
tcharding:
ACK 74104e5a93846675c2e8171f2c0668a50e155a52
apoelstra:
ACK 74104e5a93846675c2e8171f2c0668a50e155a52; successfully ran local tests


Tree-SHA512: e43d934edcceedf0d300a40c13841ae36f9046413463ec9524e74a2d00c5d2d929debaa72aa209201a1b71726436d0ebfab82ca38f3892ac227ccce542d38a36
✓ 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 fixes a bug in how Taproot tree data is saved to JSON or other serialized formats. Previously, deliberately hidden branches of a Taproot tree were left out of the 'leaves' list, so after saving and loading the tree back, the hidden part was missing. The fix adds a placeholder hidden leaf so round-trip serialization works correctly. It is a correctness/data-integrity bug, not a direct theft-of-funds vulnerability.

Recommended action

Treat as a routine bug fix. No immediate security response required, but downstream users relying on serialized Taproot tree representations should update to avoid silent loss of hidden-node information on save/load.

Security signals we found

01

Data integrity / serialization round-trip failure

02

Taproot Merkle tree node representation bug

03

Fix includes regression test for serde hidden-node round trip

Risk score

Why this scored 27/100

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