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

Set `AnchorDescriptor` output value to CSV and P2A anchor amounts

Public commit record

What the developer wrote

Authored by Leo Nash

65/100 · Adequate
Set `AnchorDescriptor` output value to CSV and P2A anchor amounts

Co-authored-by: Matt Corallo <git@bluematt.me>
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
The short version

What changed, and why it matters

This commit changes how Lightning anchor output amounts are tracked and set in commitment transactions. Previously, anchor outputs used a fixed value constant. The patch makes the anchor value dynamic, reading it from the actual commitment transaction output. This is part of support for a newer Lightning feature called 'zero-fee commitments' where anchor amounts can vary. The change appears to be a correctness fix to ensure the wallet software constructs follow-up transactions using the real anchor value rather than a hardcoded one, which could otherwise cause transaction creation failures or fee estimation errors.

Recommended action

Review as part of normal code review. Validate that the dynamic anchor value is correctly propagated in all bump-transaction paths and that serialization/deserialization of AnchorDescriptor handles the new `value` field compatibly. Consider regression tests covering both keyed and shared P2A anchor channels.

Security signals we found

01

Changes anchor output value from hardcoded constant to transaction-derived value

02

Adds support for variable-value P2A anchors in zero-fee commitment transactions

03

Removes fixed `ANCHOR_OUTPUT_VALUE_SATOSHI` usage in `AnchorDescriptor::tx_out`

04

Distinguishes keyed anchor vs shared P2A anchor script types based on channel features

05

Touches on-chain transaction construction and fee bumping paths

Risk score

Why this scored 57/100

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